diff setup.py @ 6241:a718e66836e8

setup.py: os.uname is not available on Windows
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 12 Mar 2008 15:33:43 -0700
parents 39cfcef4f463
children 0d0939b2d272
line wrap: on
line diff
--- 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