File: rules

package info (click to toggle)
metakernel 0.29.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,352 kB
  • sloc: python: 5,069; makefile: 178; sh: 18
file content (28 lines) | stat: -rwxr-xr-x 1,126 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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=metakernel
export PYBUILD_VERBOSE=1
export PYBUILD_TEST_ARGS=-o cache_dir={home_dir}/.pytest_cache $${{PYBUILD_AUTOPKGTEST:+/usr/lib/python3/dist-packages/metakernel}}
export PYBUILD_BEFORE_TEST=touch {home_dir}/.bashrc && mkdir {home_dir}/.pytest_cache
export PYBUILD_AFTER_TEST=rm -rf {home_dir}/.pytest_cache

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build:
ifeq (,$(filter nodoc,${DEB_BUILD_OPTIONS} ${DEB_BUILD_PROFILES}))
	PYTHONPATH=. python3 docs/generate_help.py
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html
	# replace static files copied from python3-sphinx-bootstrap-theme with symlinks
	find build/html/_static/ -type f -print0 | xargs -0 -L 1 debian/test_and_link.sh
endif

override_dh_installdocs:
	dh_installdocs --package=python3-metakernel
	dh_installdocs --package=python-metakernel-doc --doc-main-package=python3-metakernel

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.md