[PATCH STABLE] setup: fix build_hgexe for mingw32 compiler
Adrian Buehlmann
adrian at cadifra.com
Wed Jul 25 09:50:50 CDT 2012
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1343227822 -7200
# Branch stable
# Node ID 450330d3276f34576b98fd2d940c257f4bdef73b
# Parent ffc49100151b68c0bcd061b900d9993e9e1a0d7d
setup: fix build_hgexe for mingw32 compiler
Fixes
python setup.py build_hgexe -i --compiler=mingw32
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -342,11 +342,17 @@
def build_extensions(self):
if os.name != 'nt':
return
+ if isinstance(self.compiler, HackedMingw32CCompiler):
+ self.compiler.compiler_so = self.compiler.compiler # no -mdll
+ self.compiler.dll_libraries = [] # no -lmsrvc90
objects = self.compiler.compile(['mercurial/exewrapper.c'],
output_dir=self.build_temp)
dir = os.path.dirname(self.get_ext_fullpath('dummy'))
target = os.path.join(dir, 'hg')
+ pythonlib = ("python%d%d" %
+ (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
self.compiler.link_executable(objects, target,
+ libraries=[pythonlib],
output_dir=self.build_temp)
class hginstallscripts(install_scripts):
More information about the Mercurial-devel
mailing list