#!/usr/bin/make -f export DH_VERBOSE=1 # How to recursively find all files with the same name in a given folder rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) ALL_PYX := $(call rwildcard,pynx/,*.pyx) #NOTA: No space before * export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin/ {destdir}/usr/pynx/ export PYBUILD_DISABLE=test export PYBUILD_NAME=pynx %: dh $@ --buildsystem=pybuild execute_after_dh_clean: rm -f $(patsubst %.pyx,%.c,${ALL_PYX}) execute_after_dh_auto_install: # install scripts python3 setup.py install_scripts -d debian/pynx/usr/bin override_dh_auto_test: export http_proxy=127.0.0.1:9 override_dh_auto_test: export https_proxy=127.0.0.1:9 override_dh_auto_test: dh_auto_test -- -s custom --test-args="PYTHONPATH={build_dir} {interpreter} pynx/scripts/pynx_test.py" override_dh_sphinxdoc: # do not build until sphinx_link is available in Debian ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYBUILD_SYSTEM=custom \ PYBUILD_BUILD_ARGS="cd doc && PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' {interpreter} -m sphinx -N -bhtml . build/html" dh_auto_build # HTML generator dh_installdocs "doc/build/html" -p python-pynx-doc dh_sphinxdoc -O--buildsystem=pybuild endif