debian/control: Add Build-Depends for `dh-python'.
[mLib-python] / setup.py
index b84fb43..66aafc5 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -6,24 +6,23 @@ import mdwsetup as MS
 
 MS.pkg_config('mLib', '2.1.0')
 
-MS.derive('base64.pyx', 'codec.pyx.in',
-          {'CLASS': 'Base64', 'PREFIX': 'base64'})
-MS.derive('base32.pyx', 'codec.pyx.in',
-          {'CLASS': 'Base32', 'PREFIX': 'base32'})
-MS.derive('hex.pyx', 'codec.pyx.in',
-          {'CLASS': 'Hex', 'PREFIX': 'hex'})
-
 mLib = DC.Extension('mLib', ['mLib.pyx', 'atom-base.c', 'array.c'],
                     ##extra_compile_args = ['-O0'],
                     include_dirs = MS.uniquify(MS.INCLUDEDIRS),
                     library_dirs = MS.uniquify(MS.LIBDIRS),
                     libraries = MS.uniquify(MS.LIBS))
 
-DC.setup(name = 'mLib-python',
-         version = MS.auto_version(),
+MS.setup(name = 'mLib-python',
          description = 'Python interface to mLib utilities library',
          author = 'Straylight/Edgeware',
          author_email = 'mdw@distorted.org.uk',
          license = 'GNU General Public License',
          ext_modules = [mLib],
+         genfiles = [MS.Derive('base64.pyx', 'codec.pyx.in',
+                               {'CLASS': 'Base64', 'PREFIX': 'base64'}),
+                     MS.Derive('base32.pyx', 'codec.pyx.in',
+                               {'CLASS': 'Base32', 'PREFIX': 'base32'}),
+                     MS.Derive('hex.pyx', 'codec.pyx.in',
+                               {'CLASS': 'Hex', 'PREFIX': 'hex'})],
+         cleanfiles = ['mLib.c'],
          cmdclass = { 'build_ext': PXD.build_ext })