summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorGard Spreemann <gspreemann@gmail.com>2018-08-07 00:35:02 +0200
committerGard Spreemann <gspreemann@gmail.com>2018-08-07 13:33:31 +0200
commitbd28fe4a568bdc79e4767778ac02a1b8aa5a0692 (patch)
tree6501aafae647010365033beea8f9a00f959efa6a /debian/rules
parent2cd92e2b4ce913dc42a8be0f3915814b6d90518a (diff)
Python (3) bindings for all supported Python versions, in line with policy.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules22
1 files changed, 21 insertions, 1 deletions
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