From bd28fe4a568bdc79e4767778ac02a1b8aa5a0692 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Tue, 7 Aug 2018 00:35:02 +0200 Subject: Python (3) bindings for all supported Python versions, in line with policy. --- debian/rules | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 3047cf7e..a8813459 100755 --- a/debian/rules +++ b/debian/rules @@ -7,24 +7,44 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) TMPBIN:=debian/tmp/usr/bin +PY3VERS:=$(shell py3versions -vs) +FIRST_PY3VER:=$(word 1, $(PY3VERS)) +REMAINING_PY3VERS:=$(filter-out $(FIRST_PY3VER), $(PY3VERS)) + %: # The --buildirectory=build is there so that we can easily get a hold # of documentation and examples, which are not installed by upstream. dh $@ --with=python3 --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh $@ --with=python3 --builddirectory=build$$py3ver ; \ + done override_dh_auto_configure: - dh_auto_configure -- -DWITH_GUDHI_BENCHMARK=true -DWITH_GUDHI_EXAMPLE=true -DWITH_GUDHI_PYTHON=true -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=true + dh_auto_configure -- -DWITH_GUDHI_BENCHMARK=true -DWITH_GUDHI_EXAMPLE=true -DWITH_GUDHI_PYTHON=true -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=true -DPython_ADDITIONAL_VERSIONS=$(FIRST_PY3VER) + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_configure --builddirectory=build$$py3ver -- -DWITH_GUDHI_BENCHMARK=false -DWITH_GUDHI_EXAMPLE=false -DWITH_GUDHI_PYTHON=true -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=false -DPython_ADDITIONAL_VERSIONS=$$py3ver ; \ + done override_dh_auto_build-indep: make -C build doxygen dh_auto_build --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_build --builddirectory=build$$py3ver ; \ + done override_dh_auto_test: dh_auto_test --no-parallel --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_test --no-parallel --builddirectory=build$$py3ver ; \ + done override_dh_auto_install: find example -type f \( -name '*.cpp' -o \( -name '*.txt' -a ! -iname 'cmake*' \) \) -exec sh -c 'install -D -m 644 $$0 debian/tmp/usr/share/doc/libgudhi-examples/$$0' {} \; + dh_auto_install --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_install --builddirectory=build$$py3ver ; \ + done # Remove installed information about Miniball header. rm debian/tmp/usr/include/gudhi/Miniball.COPYRIGHT -- cgit v1.2.3