# HG changeset patch # User Martin Geisler # Date 2009-05-02 22:41:09 # Node ID d6134b800797e5082e909802e55d03dba1bcad19 # Parent c214a895f62c8937742bff9b8ea255fd6751aa64 setup: cleanup old left-over code diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -208,30 +208,20 @@ ext_modules=[ Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']), Extension('mercurial.mpatch', ['mercurial/mpatch.c']), Extension('mercurial.parsers', ['mercurial/parsers.c']), + Extension('mercurial.osutil', ['mercurial/osutil.c']), ] packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert', 'hgext.highlight', 'hgext.zeroconf', ] -try: - import msvcrt - ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'])) -except ImportError: - pass - -try: - 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. - # You also need a reasonably recent C library. - cc = new_compiler() - if has_function(cc, 'inotify_add_watch'): - ext_modules.append(Extension('hgext.inotify.linux._inotify', - ['hgext/inotify/linux/_inotify.c'])) - packages.extend(['hgext.inotify', 'hgext.inotify.linux']) -except ImportError: - pass +if sys.platform == 'linux2' and os.uname()[2] > '2.6': + # The inotify extension is only usable with Linux 2.6 kernels. + # You also need a reasonably recent C library. + cc = new_compiler() + if has_function(cc, 'inotify_add_watch'): + ext_modules.append(Extension('hgext.inotify.linux._inotify', + ['hgext/inotify/linux/_inotify.c'])) + packages.extend(['hgext.inotify', 'hgext.inotify.linux']) datafiles = [] for root in ('templates', 'i18n'):