3 from distutils.core import setup, Extension
6 def needs_update_p(target, deps):
7 if not OS.path.exists(target): return True
11 if ts.st_mtime < s.st_mtime: return True
14 if needs_update_p('getdate.c', ['getdate.y']):
15 OS.system('bison -o getdate.c getdate.y')
17 setup(name = 'getdate',
19 description = 'Date/time parser',
20 author = 'Mark Wooding',
21 author_email = 'mdw@distorted.org.uk',
22 license = 'GNU General Public License',
23 ext_modules = [Extension('getdate', ['module.c', 'getdate.c'])])