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

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Mon Feb 8 12:15:05 UTC 2016


# HG changeset patch
# User FUJIWARA Katsunori <foozy at 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".

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


More information about the Mercurial-devel mailing list