setup.py: os.uname is not available on Windows
authorBryan O'Sullivan <bos@serpentine.com>
Wed, 12 Mar 2008 15:33:43 -0700
changeset 6241 a718e66836e8
parent 6240 6679405e95da
child 6242 a375ffc2aa1b
setup.py: os.uname is not available on Windows
setup.py
--- a/setup.py	Wed Mar 12 15:31:10 2008 -0700
+++ b/setup.py	Wed Mar 12 15:33:43 2008 -0700
@@ -61,15 +61,15 @@
 
 packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert']
 
-if sys.platform == 'linux2' and os.uname()[2] > '2.6':
-    # the inotify extension is only usable with Linux 2.6 kernels
-    ext_modules.append(Extension('hgext.inotify.linux._inotify',
-                                 ['hgext/inotify/linux/_inotify.c']))
-    packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
-
 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
+        ext_modules.append(Extension('hgext.inotify.linux._inotify',
+                                     ['hgext/inotify/linux/_inotify.c']))
+        packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
 except ImportError:
     pass