Mercurial > public > mercurial-scm > hg-stable
diff setup.py @ 6239:39cfcef4f463
Add inotify extension
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 12 Mar 2008 15:30:11 -0700 |
parents | f077815932ce |
children | a718e66836e8 |
line wrap: on
line diff
--- a/setup.py Wed Mar 12 22:20:10 2008 +0100 +++ b/setup.py Wed Mar 12 15:30:11 2008 -0700 @@ -59,6 +59,14 @@ Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']) ] +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'])) @@ -73,7 +81,7 @@ description='Scalable distributed SCM', license='GNU GPL', scripts=['hg'], - packages=['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert'], + packages=packages, ext_modules=ext_modules, data_files=[(os.path.join('mercurial', root), [os.path.join(root, file_) for file_ in files])