debian/rules: Build using the provided Makefile.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 17 Nov 2019 04:23:00 +0000 (04:23 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 25 Nov 2019 17:31:22 +0000 (17:31 +0000)
There were several problems with the old system.  Firstly, it only
actually worked by accident: setting an explicit build directory caused
Debhelper to search there for a makefile (which it didn't find, for
obvious reasons) and fall back to the Python distutils system.  That
would be OK, but only because there's only been one Python version I've
wanted to support in Debian for ages; but that's likely to change.  And
it won't run tests properly.

Instead, delete the `-B' option (which will break the upcoming tests).
Now Debhelper will build via the Makefile.  Set the `PYTHONS'
environment variable to the Python versions supported in Debian.  And
set the prefix correctly during installation.

debian/rules

index 4339423..f718ebd 100755 (executable)
@@ -1,2 +1,7 @@
 #! /usr/bin/make -f
-%:; dh $@ --parallel -Bdebian/build --with python2
+%:; dh $@ --parallel --with python2
+
+export PYTHONS := $(shell pyversions -r)
+
+override_dh_auto_install:
+       dh_auto_install -- prefix=/usr