Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 #export DH_VERBOSE = 1
5
6 export PYBUILD_NAME=jupyter-cache
7
8 %:
9 dh $@ --with python3 --buildsystem=pybuild
10
11
12 # ckk 2024-03-12: We exclude these tests on Debian as they require the nbdime
13 # package which is not available. They can be re-enabled once it has been
14 # packaged
15 EXCLUDE_TESTS += not test_basic_workflow and not test_diff_nbs
16 # ckk 2024-03-12: likewise for jupytext
17 EXCLUDE_TESTS += and not test_execution_jupytext
18
19 # Set environment variables and let dh + pybuild do their automagic
20 export PYBUILD_TEST_PYTEST := 1
21 export PYBUILD_TEST_ARGS := -k "$(EXCLUDE_TESTS)"
22
23 include /usr/share/dpkg/pkg-info.mk
24
25 define create_man =
26 PYTHONPATH=$(CURDIR)/debian/python3-jupyter-cache/usr/lib/python3/dist-packages \
27 help2man \
28 --no-info \
29 --source=debian \
30 --help-option='--help' \
31 --version-option='--version' \
32 --no-discard-stderr \
33 --version-string=$(DEB_VERSION) \
34 --name=$(2) \
35 --section=$(3) \
36 --output debian/python3-jupyter-cache/usr/share/man/man$(3)/$(2).$(3) \
37 $(1)/$(2)
38 endef
39
40 override_dh_link:
41 mkdir -p debian/python3-jupyter-cache/usr/share/man/man1
42 $(call create_man,debian/python3-jupyter-cache/usr/bin,jcache,1)
43 find $(CURDIR)/debian/python3-jupyter-cache/usr/lib/python3/dist-packages -type d -name "__pycache__" -exec rm -rf {} +
44 dh_link