1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#!/usr/bin/make -f
# run setup.py install with --install-layout=deb
export SETUP_PY_EXTRA_ARGS=--install-layout=deb
# default Python 3 version
PYTHON = $(shell py3versions -dv)
# Python 3 versions
PYTHON3 = $(shell py3versions -s)
%:
dh $@ --buildsystem=cmake
# clean targets
cmake-clean-%:
rm -rf build-$*
override_dh_auto_clean: \
$(PYTHON3:python%=cmake-clean-%)
# configure targets
cmake-configure-%:
dh_auto_configure -Bbuild-$* -- \
-DBUILD_PYTHON_BINDINGS=1 \
-DPYTHON_EXECUTABLE=/usr/bin/python$*
override_dh_auto_configure: \
$(PYTHON3:python%=cmake-configure-%)
# build targets
cmake-build-%:
dh_auto_build -Bbuild-$*
override_dh_auto_build: \
$(PYTHON3:python%=cmake-build-%)
# test targets
cmake-test-%-stamp:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test -Bbuild-$*/python-bindings
endif
touch $@
override_dh_auto_test: \
$(PYTHON3:python%=cmake-test-%-stamp)
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test \
-Bbuild-$(PYTHON)
endif
# install targets
cmake-install-%:
dh_auto_install -Bbuild-$*/python-bindings
override_dh_auto_install: \
$(PYTHON3:python%=cmake-install-%)
dh_auto_install \
-Bbuild-$(PYTHON)
override_dh_strip:
dh_strip --dbgsym-migration='python3-kdtree-dbg (<< 0.7.1+git20101123-6~)'
execute_after_dh_python3:
find debian/python3-kdtree -name '*.cpython-*dm-*so' | xargs -r rm -f
|