chiark / gitweb /
debian/rules: Build using the provided Makefile.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 27 Nov 2019 21:04:53 +0000 (21:04 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 14:23:48 +0000 (15:23 +0100)
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 f2ab49c87bc9bb57e318c16335d09437d6d1b543..bbbe5a07a2dcaa84b47b02618c77d59569afc0f9 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