File: rules

package info (click to toggle)
python-pyzipper 0.3.6-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,112 kB
  • sloc: python: 9,552; makefile: 37
file content (36 lines) | stat: -rwxr-xr-x 1,165 bytes parent folder | download
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
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=pyzipper

%:
	dh $@ --with sphinxdoc --buildsystem=pybuild

ifneq ($(PYBUILD_AUTOPKGTEST),1)
# Deselect test since executables are not available before installation
export PYBUILD_BEFORE_TEST=cp -r {dir}/test {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/test
export PYBUILD_TEST_ARGS=-v -p no:warnings \
	-k 'not test_temp_dir__forked_child \
		and not test_bad_use \
		and not test_create_command \
		and not test_extract_command \
                and not test_args_from_interpreter_flags \
                and not test_main \
		and not test_test_command'
endif

# test_main fails on Python3.13 with "AttributeError: module 'unittest' has no attribute 'makeSuite'"



# sphinx documentation
override_dh_sphinxdoc:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=pyzipper python3 -m sphinx $(SPHINXOPTS) -d debian/doctrees -N docs/ \
		$(CURDIR)/debian/python-pyzipper-doc/usr/share/doc/python-pyzipper-doc/html
	dh_sphinxdoc
endif

execute_after_dh_link:
# Fix privacy-breach-generic
	find debian/python-pyzipper-doc/ -name '*.html' -exec sed -i 's|https://img.shiel||g' {} \;