| 1 |
#!/usr/bin/make -f |
| 2 |
#export DH_VERBOSE = 1 |
| 3 |
export PYBUILD_NAME=pyzipper |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ --with sphinxdoc --buildsystem=pybuild |
| 7 |
|
| 8 |
ifneq ($(PYBUILD_AUTOPKGTEST),1) |
| 9 |
# Deselect test since executables are not available before installation |
| 10 |
export PYBUILD_BEFORE_TEST=cp -r {dir}/test {build_dir} |
| 11 |
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/test |
| 12 |
export PYBUILD_TEST_ARGS=-v -p no:warnings \ |
| 13 |
-k 'not test_temp_dir__forked_child \ |
| 14 |
and not test_bad_use \ |
| 15 |
and not test_create_command \ |
| 16 |
and not test_extract_command \ |
| 17 |
and not test_args_from_interpreter_flags \ |
| 18 |
and not test_main \ |
| 19 |
and not test_test_command' |
| 20 |
endif |
| 21 |
|
| 22 |
# test_main fails on Python3.13 with "AttributeError: module 'unittest' has no attribute 'makeSuite'" |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
# sphinx documentation |
| 27 |
override_dh_sphinxdoc: |
| 28 |
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) |
| 29 |
PYTHONPATH=pyzipper python3 -m sphinx $(SPHINXOPTS) -d debian/doctrees -N docs/ \ |
| 30 |
$(CURDIR)/debian/python-pyzipper-doc/usr/share/doc/python-pyzipper-doc/html |
| 31 |
dh_sphinxdoc |
| 32 |
endif |
| 33 |
|
| 34 |
execute_after_dh_link: |
| 35 |
# Fix privacy-breach-generic |
| 36 |
find debian/python-pyzipper-doc/ -name '*.html' -exec sed -i 's|https://img.shiel||g' {} \; |