debian, build: Big overhaul.
[getdate-python] / setup.py
1 #! /usr/bin/python
2
3 import subprocess as SUB
4
5 import distutils.core as DC
6 import mdwsetup as MS
7
8 if MS.needs_update_p('getdate.c', ['getdate.y']):
9 rc = SUB.call(['bison', '-o', 'getdate.c', 'getdate.y'])
10 if rc:
11 raise MS.SubprocessFailure, ('bison', rc)
12
13 getdate = DC.Extension('getdate',
14 ['module.c', 'getdate.c'])
15
16 DC.setup(name = 'getdate-python',
17 version = MS.auto_version(),
18 description = 'Date/time parser',
19 author = 'Mark Wooding',
20 author_email = 'mdw@distorted.org.uk',
21 license = 'GNU General Public License',
22 ext_modules = [getdate])