Overhaul build system using new `cfd' machinery.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 15 Jun 2013 23:12:54 +0000 (00:12 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 16 Jun 2013 19:43:55 +0000 (20:43 +0100)
.gitignore
.links
MANIFEST.in
Makefile
setup.py [changed mode: 0644->0755]

index 678cbf1..98bd1e8 100644 (file)
@@ -7,8 +7,7 @@ deb-build
 build-stamp
 COPYING
 algorithms.h
-RELEASE
 auto-version
 mdwsetup.py
 *.pyc
-python-build-stamp-*
+pysetup.mk
diff --git a/.links b/.links
index e25ac67..4e00440 100644 (file)
--- a/.links
+++ b/.links
@@ -1,3 +1,4 @@
 COPYING
 auto-version
 mdwsetup.py
+pysetup.mk
index af5f781..813894a 100644 (file)
@@ -1,7 +1,20 @@
-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
+
index 7a24b27..b9f9347 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,2 @@
-## 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
old mode 100644 (file)
new mode 100755 (executable)
index 927d1d2..5f4c373
--- a/setup.py
+++ b/setup.py
@@ -1,16 +1,11 @@
 #! /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',
@@ -21,8 +16,7 @@ cat = DC.Extension('catacomb._base',
                    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',
@@ -30,4 +24,5 @@ DC.setup(name = 'catacomb-python',
          license = 'GNU General Public License',
          packages = ['catacomb'],
          scripts = ['pwsafe'],
+         genfiles = [MS.Generate('algorithms.h')],
          ext_modules = [cat])