Mercurial > hg
comparison setup.py @ 8283:d6134b800797
setup: cleanup old left-over code
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sun, 03 May 2009 00:41:09 +0200 |
parents | 73fa2be69ea9 |
children | 707bc82ba0d7 |
comparison
equal
deleted
inserted
replaced
8282:c214a895f62c | 8283:d6134b800797 |
---|---|
206 Extension('mercurial.base85', ['mercurial/base85.c']), | 206 Extension('mercurial.base85', ['mercurial/base85.c']), |
207 Extension('mercurial.bdiff', ['mercurial/bdiff.c']), | 207 Extension('mercurial.bdiff', ['mercurial/bdiff.c']), |
208 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']), | 208 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']), |
209 Extension('mercurial.mpatch', ['mercurial/mpatch.c']), | 209 Extension('mercurial.mpatch', ['mercurial/mpatch.c']), |
210 Extension('mercurial.parsers', ['mercurial/parsers.c']), | 210 Extension('mercurial.parsers', ['mercurial/parsers.c']), |
211 Extension('mercurial.osutil', ['mercurial/osutil.c']), | |
211 ] | 212 ] |
212 | 213 |
213 packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert', | 214 packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert', |
214 'hgext.highlight', 'hgext.zeroconf', ] | 215 'hgext.highlight', 'hgext.zeroconf', ] |
215 | 216 |
216 try: | 217 if sys.platform == 'linux2' and os.uname()[2] > '2.6': |
217 import msvcrt | 218 # The inotify extension is only usable with Linux 2.6 kernels. |
218 ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'])) | 219 # You also need a reasonably recent C library. |
219 except ImportError: | 220 cc = new_compiler() |
220 pass | 221 if has_function(cc, 'inotify_add_watch'): |
221 | 222 ext_modules.append(Extension('hgext.inotify.linux._inotify', |
222 try: | 223 ['hgext/inotify/linux/_inotify.c'])) |
223 ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'])) | 224 packages.extend(['hgext.inotify', 'hgext.inotify.linux']) |
224 | |
225 if sys.platform == 'linux2' and os.uname()[2] > '2.6': | |
226 # The inotify extension is only usable with Linux 2.6 kernels. | |
227 # You also need a reasonably recent C library. | |
228 cc = new_compiler() | |
229 if has_function(cc, 'inotify_add_watch'): | |
230 ext_modules.append(Extension('hgext.inotify.linux._inotify', | |
231 ['hgext/inotify/linux/_inotify.c'])) | |
232 packages.extend(['hgext.inotify', 'hgext.inotify.linux']) | |
233 except ImportError: | |
234 pass | |
235 | 225 |
236 datafiles = [] | 226 datafiles = [] |
237 for root in ('templates', 'i18n'): | 227 for root in ('templates', 'i18n'): |
238 for dir, dirs, files in os.walk(root): | 228 for dir, dirs, files in os.walk(root): |
239 datafiles.append((os.path.join('mercurial', dir), | 229 datafiles.append((os.path.join('mercurial', dir), |