debian: Rebuild for newer Pythons.
[getdate-python] / setup.py
CommitLineData
6f110c11 1#! /usr/bin/python
2
e58b9b2f 3import subprocess as SUB
6f110c11 4
e58b9b2f
MW
5import distutils.core as DC
6import mdwsetup as MS
6f110c11 7
e58b9b2f
MW
8if 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)
6f110c11 12
e58b9b2f
MW
13getdate = DC.Extension('getdate',
14 ['module.c', 'getdate.c'])
15
16DC.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])