Patchwork [STABLE] setup: avoid procedure related to hg.exe at setup.py --pure

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Feb. 8, 2016, 12:15 p.m.
Message ID <4050e9f197c5fa5cccfe.1454933705@juju>
Download mbox | patch
Permalink /patch/13052/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Katsunori FUJIWARA - Feb. 8, 2016, 12:15 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1454933533 -32400
#      Mon Feb 08 21:12:13 2016 +0900
# Branch stable
# Node ID 4050e9f197c5fa5cccfe136bdfab517686c48ff1
# Parent  61f4d59e9a0be4e25c1aa016db1a80a540a9d337
setup: avoid procedure related to hg.exe at setup.py --pure

Before this patch, "setup.py --pure" fails on Windows, because
hgbuildscripts.run() tries to copy "hg.exe", which doesn't generated
at "setup.py --pure".

At that time, run_command('build_hgexe') invoked in
hgbuildscripts.run() does nothing and returns successfully. Therefore,
subsequent procedure assuming existence of "hg.exe" fails.

This patch avoids procedure related to "hg.exe" (= all of
hgbuildscripts.run() except for build_scripts.run() invocation) at
"setup.py --pure".
Martin von Zweigbergk - Feb. 10, 2016, 9:13 p.m.
+mercurial-devel this time

---------- Forwarded message ----------
From: Martin von Zweigbergk <martinvonz@google.com>
Date: Wed, Feb 10, 2016 at 1:12 PM
Subject: Re: [PATCH STABLE] setup: avoid procedure related to hg.exe
at setup.py --pure
To: FUJIWARA Katsunori <foozy@lares.dti.ne.jp>


I don't know anything about this, but the description makes sense and
no one else complained, so I'm queuing this for stable. Thanks.

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -304,7 +304,7 @@  class hgbuildext(build_ext):
 
 class hgbuildscripts(build_scripts):
     def run(self):
-        if os.name != 'nt':
+        if os.name != 'nt' or self.distribution.pure:
             return build_scripts.run(self)
 
         exebuilt = False