##// END OF EJS Templates
setup: disable -mno-cygwin if building under mingw32...
Bryan O'Sullivan -
r17121:d13f47c8 default
parent child Browse files
Show More
@@ -65,6 +65,7 b' from distutils.command.build_py import b'
65 from distutils.command.install_scripts import install_scripts
65 from distutils.command.install_scripts import install_scripts
66 from distutils.spawn import spawn, find_executable
66 from distutils.spawn import spawn, find_executable
67 from distutils.ccompiler import new_compiler
67 from distutils.ccompiler import new_compiler
68 from distutils import cygwinccompiler
68 from distutils.errors import CCompilerError, DistutilsExecError
69 from distutils.errors import CCompilerError, DistutilsExecError
69 from distutils.sysconfig import get_python_inc
70 from distutils.sysconfig import get_python_inc
70 from distutils.version import StrictVersion
71 from distutils.version import StrictVersion
@@ -429,6 +430,20 b' else:'
429 extmodules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'],
430 extmodules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'],
430 extra_link_args=osutil_ldflags))
431 extra_link_args=osutil_ldflags))
431
432
433 # the -mno-cygwin option has been deprecated for years
434 Mingw32CCompiler = cygwinccompiler.Mingw32CCompiler
435
436 class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler):
437 def __init__(self, *args, **kwargs):
438 Mingw32CCompiler.__init__(self, *args, **kwargs)
439 for i in 'compiler compiler_so linker_exe linker_so'.split():
440 try:
441 getattr(self, i).remove('-mno-cygwin')
442 except ValueError:
443 pass
444
445 cygwinccompiler.Mingw32CCompiler = HackedMingw32CCompiler
446
432 if sys.platform.startswith('linux') and os.uname()[2] > '2.6':
447 if sys.platform.startswith('linux') and os.uname()[2] > '2.6':
433 # The inotify extension is only usable with Linux 2.6 kernels.
448 # The inotify extension is only usable with Linux 2.6 kernels.
434 # You also need a reasonably recent C library.
449 # You also need a reasonably recent C library.
General Comments 0
You need to be logged in to leave comments. Login now