-include COPYING README Makefile MANIFEST MANIFEST.in
+### Manifest template for Catacomb/Python.
+
+## Generated build machinery.
+include COPYING auto-version mdwsetup.py pysetup.mk
+
+## Basic build stuff.
+include MANIFEST.in setup.py Makefile
+
+## C extension code.
include *.c *.h
include algorithms.py
+exclude algorithms.h
include pwsafe
-include debian/rules debian/control debian/changelog debian/copyright
+
+## Python wrapping.
recursive-include catacomb *.py
-prune py
+
+## Debian.
+include debian/rules debian/control debian/changelog debian/copyright
+
-## Makefile
-
-PYTHON = python
-prefix = /usr/local
-
-GEN = algorithms.h
-
-all: setup.py
- $(PYTHON) setup.py build
-
-clean: setup.py
- $(PYTHON) setup.py clean
- rm -rf build $(GEN)
-
-dist: setup.py
- $(PYTHON) setup.py sdist
-
-install: setup.py
- $(PYTHON) setup.py install --prefix $(prefix)
-
-.PHONY: all clean dist install
+### -*-makefile-*-
+include pysetup.mk
#! /usr/bin/python
-import os as OS
-import subprocess as SUB
-
import distutils.core as DC
import mdwsetup as MS
MS.pkg_config('catacomb', '2.1.1')
MS.pkg_config('mLib', '2.0.4')
-MS.generate('algorithms.h')
-
cat = DC.Extension('catacomb._base',
['catacomb.c', 'bytestring.c', 'buffer.c',
'rand.c', 'algorithms.c', 'pubkey.c', 'pgen.c',
library_dirs = MS.uniquify(MS.LIBDIRS),
libraries = MS.uniquify(MS.LIBS))
-DC.setup(name = 'catacomb-python',
- version = MS.auto_version(),
+MS.setup(name = 'catacomb-python',
description = 'Interface to Catacomb cryptographic library',
url = 'http://www.distorted.org.uk/~mdw/Catacomb-2.1.0',
author = 'Straylight/Edgeware',
license = 'GNU General Public License',
packages = ['catacomb'],
scripts = ['pwsafe'],
+ genfiles = [MS.Generate('algorithms.h')],
ext_modules = [cat])