Mercurial > hg
comparison setup.py @ 15163:f4bc0b9e03a4 stable
building: build inotify for sys.platform='linux*'
If Python interpreter was built under Linux 3.x kernel, it reports
sys.platform to be 'linux3' (it is fixed for Python 3, but not for 2.x).
This cancels building inotify extension, which was built only for 'linux2'
platform. Improved test checks if sys.platform begins with 'linux', and together
with test for kernel version to be greater than 2.6 it seems to cover all known
cases.
author | Nikolaj Sjujskij <sterkrig@myopera.com> |
---|---|
date | Tue, 20 Sep 2011 15:21:27 +0300 |
parents | 3818c67a501e |
children | 8df4166b6f63 |
comparison
equal
deleted
inserted
replaced
15158:7ce7177e029a | 15163:f4bc0b9e03a4 |
---|---|
364 pymodules.append('mercurial.pure.osutil') | 364 pymodules.append('mercurial.pure.osutil') |
365 else: | 365 else: |
366 extmodules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'], | 366 extmodules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'], |
367 extra_link_args=osutil_ldflags)) | 367 extra_link_args=osutil_ldflags)) |
368 | 368 |
369 if sys.platform == 'linux2' and os.uname()[2] > '2.6': | 369 if sys.platform.startswith('linux') and os.uname()[2] > '2.6': |
370 # The inotify extension is only usable with Linux 2.6 kernels. | 370 # The inotify extension is only usable with Linux 2.6 kernels. |
371 # You also need a reasonably recent C library. | 371 # You also need a reasonably recent C library. |
372 # In any case, if it fails to build the error will be skipped ('optional'). | 372 # In any case, if it fails to build the error will be skipped ('optional'). |
373 cc = new_compiler() | 373 cc = new_compiler() |
374 if hasfunction(cc, 'inotify_add_watch'): | 374 if hasfunction(cc, 'inotify_add_watch'): |