| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=fabio |
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 5 |
|
| 6 |
TESTS_TO_EXCLUDE="not test_00 and \ |
| 7 |
not test_openimage and \ |
| 8 |
not test_frames_abort_iteration and \ |
| 9 |
not test_frames_full_iteration and \ |
| 10 |
not test_frames_random_access" |
| 11 |
#export PYBUILD_TEST_ARGS=fabio -k ${TESTS_TO_EXCLUDE} |
| 12 |
#export PYBUILD_TEST_ARGS={interpreter} run_tests.py -v -m --installed |
| 13 |
export PYBUILD_AFTER_TEST=rm -vf {build_dir}/profile.log |
| 14 |
export LC_ALL=C.UTF-8 |
| 15 |
|
| 16 |
%: |
| 17 |
dh $@ --with python3 --buildsystem=pybuild |
| 18 |
|
| 19 |
execute_before_dh_clean: |
| 20 |
# remove the cython generated files distributed by upstream |
| 21 |
rm -f $(patsubst %.pyx,%.c,$(wildcard fabio/ext/*.pyx)) |
| 22 |
rm -rf doc/build/html |
| 23 |
rm -rf build/man |
| 24 |
rm -rf *.egg-info |
| 25 |
rm -rf doc/build |
| 26 |
|
| 27 |
override_dh_auto_build-arch: |
| 28 |
PYBUILD_BUILD_ARGS="-Ccompile-args=--verbose" dh_auto_build |
| 29 |
|
| 30 |
override_dh_auto_build-indep: override_dh_auto_build-arch |
| 31 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 32 |
env PYTHONPATH=$(shell pybuild --build -i python3 -s custom --build-args 'echo {build_dir}') \ |
| 33 |
SPHINXBUILD="python3 -m sphinx" \ |
| 34 |
SPHINXOPTS="-D mathjax_path=MathJax.js" \ |
| 35 |
$(MAKE) -C doc html |
| 36 |
endif |
| 37 |
|
| 38 |
override_dh_auto_test: export http_proxy=http://127.0.0.1:9/ |
| 39 |
override_dh_auto_test: export https_proxy=https://127.0.0.1:9/ |
| 40 |
override_dh_auto_test: export no_proxy=localhost |
| 41 |
override_dh_auto_test: |
| 42 |
dh_auto_test |
| 43 |
|
| 44 |
execute_after_dh_auto_install: |
| 45 |
# install scripts into fabio-viewer |
| 46 |
mkdir -p debian/fabio-viewer/usr/bin |
| 47 |
cp debian/python3-fabio/usr/bin/* debian/fabio-viewer/usr/bin |
| 48 |
rm -rf debian/python3-fabio/usr/bin |
| 49 |
|
| 50 |
override_dh_sphinxdoc: |
| 51 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 52 |
dh_installdocs -p python-fabio-doc "doc/build/html" --doc-main-package=python3-fabio |
| 53 |
dh_sphinxdoc -p python-fabio-doc -XMathJax.js |
| 54 |
endif |
| 55 |
|
| 56 |
override_dh_python3: |
| 57 |
dh_python3 --depends-section=all |