[PATCH 2 of 2] make osutil.c setup OS specific
Petr Kodl
petrkodl at gmail.com
Fri Sep 5 06:36:20 CDT 2008
# HG changeset patch
# User Petr Kodl <petrkodl at gmail.com>
# Date 1220614388 14400
# Node ID b3f687a311d851b83ba7c8ea9a6768c0d89ed105
# Parent d377fec6239540cc19eddbbb62b384587afeaf67
make osutil.c setup OS specific
diff -r d377fec62395 -r b3f687a311d8 setup.py
--- a/setup.py Fri Sep 05 07:32:32 2008 -0400
+++ b/setup.py Fri Sep 05 07:33:08 2008 -0400
@@ -101,11 +101,17 @@
packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert',
'hgext.highlight']
-ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c']))
+
+try:
+ import msvcrt
+ ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c']))
+except ImportError:
+ pass
try:
import posix
-
+ ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c']))
+
if sys.platform == 'linux2' and os.uname()[2] > '2.6':
# The inotify extension is only usable with Linux 2.6 kernels.
# You also need a reasonably recent C library.
More information about the Mercurial-devel
mailing list