Show More
@@ -65,6 +65,7 from distutils.command.build_py import b | |||
|
65 | 65 | from distutils.command.install_scripts import install_scripts |
|
66 | 66 | from distutils.spawn import spawn, find_executable |
|
67 | 67 | from distutils.ccompiler import new_compiler |
|
68 | from distutils import cygwinccompiler | |
|
68 | 69 | from distutils.errors import CCompilerError, DistutilsExecError |
|
69 | 70 | from distutils.sysconfig import get_python_inc |
|
70 | 71 | from distutils.version import StrictVersion |
@@ -429,6 +430,20 else: | |||
|
429 | 430 | extmodules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'], |
|
430 | 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 | 447 | if sys.platform.startswith('linux') and os.uname()[2] > '2.6': |
|
433 | 448 | # The inotify extension is only usable with Linux 2.6 kernels. |
|
434 | 449 | # You also need a reasonably recent C library. |
General Comments 0
You need to be logged in to leave comments.
Login now