diff options
author | Peter Pentchev <roam@debian.org> | 2019-01-15 11:01:14 +0200 |
---|---|---|
committer | Peter Pentchev <roam@debian.org> | 2019-01-15 11:40:38 +0200 |
commit | 257bfefa57a730e8cf8da7e35618e3d5873a6db3 (patch) | |
tree | 05b3c5c31d6b039279f8d236eb0646053fb08ce0 | |
parent | 5fbccc0de66b92b98c0fd48a1d863b827155196d (diff) |
Only use the Python buildsystem when available.
-rw-r--r-- | debian/control | 1 | ||||
-rwxr-xr-x | debian/rules | 15 |
2 files changed, 14 insertions, 2 deletions
diff --git a/debian/control b/debian/control index d801dc3..e2b79b5 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Build-Depends: debhelper-compat (= 12), dh-python, libpcre3-dev, +Build-Depends-Indep: pypy, pypy-setuptools, pypy-six, diff --git a/debian/rules b/debian/rules index 121cad0..8f89201 100755 --- a/debian/rules +++ b/debian/rules @@ -105,11 +105,22 @@ override_dh_installchangelogs: override_dh_auto_clean: dh_auto_clean - dh_auto_clean -D '${PY}' --buildsystem pybuild + if dpkg-query -W -f '$${Package}\n' | fgrep -qxe python-setuptools -e python3-setuptools -e pypy-setuptools; then \ + dh_auto_clean -D '${PY}' --buildsystem pybuild; \ + fi rm -rf -- '${PY}/.pytest_cache' '${PY}/confget.egg-info' override_dh_missing: dh_missing --fail-missing %: - dh $@ --with python2,python3,pypy + set -e; \ + unset with; \ + for pkg in python2 python3 pypy; do \ + if dpkg-query -W "$${pkg%2}-setuptools" > /dev/null 2>&1; then \ + with="$$with,$$pkg"; \ + fi; \ + done; \ + with="$${with:+--with $${with#,}}"; \ + echo "Running 'dh $@ $$with'"; \ + dh $@ $$with |