Show More
@@ -12,6 +12,7 b" if not hasattr(sys, 'version_info') or s" | |||||
12 | import os |
|
12 | import os | |
13 | from distutils.core import setup, Extension |
|
13 | from distutils.core import setup, Extension | |
14 | from distutils.command.install_data import install_data |
|
14 | from distutils.command.install_data import install_data | |
|
15 | from distutils.ccompiler import new_compiler | |||
15 |
|
16 | |||
16 | import mercurial.version |
|
17 | import mercurial.version | |
17 |
|
18 | |||
@@ -66,10 +67,13 b' try:' | |||||
66 | ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'])) |
|
67 | ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'])) | |
67 |
|
68 | |||
68 | if sys.platform == 'linux2' and os.uname()[2] > '2.6': |
|
69 | if sys.platform == 'linux2' and os.uname()[2] > '2.6': | |
69 |
# |
|
70 | # The inotify extension is only usable with Linux 2.6 kernels. | |
70 | ext_modules.append(Extension('hgext.inotify.linux._inotify', |
|
71 | # You also need a reasonably recent C library. | |
71 | ['hgext/inotify/linux/_inotify.c'])) |
|
72 | cc = new_compiler() | |
72 | packages.extend(['hgext.inotify', 'hgext.inotify.linux']) |
|
73 | if cc.has_function('inotify_add_watch'): | |
|
74 | ext_modules.append(Extension('hgext.inotify.linux._inotify', | |||
|
75 | ['hgext/inotify/linux/_inotify.c'])) | |||
|
76 | packages.extend(['hgext.inotify', 'hgext.inotify.linux']) | |||
73 | except ImportError: |
|
77 | except ImportError: | |
74 | pass |
|
78 | pass | |
75 |
|
79 |
General Comments 0
You need to be logged in to leave comments.
Login now