setup.py
changeset 20622 352abbb0be88
parent 19724 2b2a2e858fb7
child 20644 779ceb84f4f7
equal deleted inserted replaced
20621:5beb49fd5958 20622:352abbb0be88
   464                 getattr(self, i).remove('-mno-cygwin')
   464                 getattr(self, i).remove('-mno-cygwin')
   465             except ValueError:
   465             except ValueError:
   466                 pass
   466                 pass
   467 
   467 
   468 cygwinccompiler.Mingw32CCompiler = HackedMingw32CCompiler
   468 cygwinccompiler.Mingw32CCompiler = HackedMingw32CCompiler
   469 
       
   470 if sys.platform.startswith('linux') and os.uname()[2] > '2.6':
       
   471     # The inotify extension is only usable with Linux 2.6 kernels.
       
   472     # You also need a reasonably recent C library.
       
   473     # In any case, if it fails to build the error will be skipped ('optional').
       
   474     cc = new_compiler()
       
   475     if hasfunction(cc, 'inotify_add_watch'):
       
   476         inotify = Extension('hgext.inotify.linux._inotify',
       
   477                             ['hgext/inotify/linux/_inotify.c'],
       
   478                             ['mercurial'],
       
   479                             depends=common_depends)
       
   480         inotify.optional = True
       
   481         extmodules.append(inotify)
       
   482         packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
       
   483 
   469 
   484 packagedata = {'mercurial': ['locale/*/LC_MESSAGES/hg.mo',
   470 packagedata = {'mercurial': ['locale/*/LC_MESSAGES/hg.mo',
   485                              'help/*.txt']}
   471                              'help/*.txt']}
   486 
   472 
   487 def ordinarypath(p):
   473 def ordinarypath(p):