File: rules

package info (click to toggle)
myst-nb 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,848 kB
  • sloc: python: 5,905; xml: 1,236; makefile: 33
file content (44 lines) | stat: -rwxr-xr-x 1,530 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
37
38
39
40
41
42
43
44
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

include /usr/share/dpkg/pkg-info.mk
export PYBUILD_NAME = myst-nb

define create_man =
PYTHONPATH=$(CURDIR)/debian/python3-myst-nb/usr/lib/python3/dist-packages \
help2man \
  --no-info \
  --source=debian \
  --help-option='-h' \
  --no-discard-stderr \
  --version-string=$(DEB_VERSION) \
  --name=$(2) \
  --section=$(3) \
  --output debian/python3-myst-nb/usr/share/man/man$(3)/$(2).$(3) \
  $(1)/$(2)
endef

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

TEST_KEYWORDS += test_sphinx

export PYBUILD_TEST_PYTEST := 1
export PYBUILD_TEST_ARGS := -k "$(TEST_KEYWORDS)"

override_dh_link:
	ls -alh $(CURDIR)/debian/python3-myst-nb/usr/lib/python3/dist-packages
	mkdir -p debian/python3-myst-nb/usr/share/man/man1
	$(call create_man,debian/python3-myst-nb/usr/bin,mystnb-docutils-html,1)
	$(call create_man,debian/python3-myst-nb/usr/bin,mystnb-docutils-html5,1)
	$(call create_man,debian/python3-myst-nb/usr/bin,mystnb-docutils-latex,1)
	$(call create_man,debian/python3-myst-nb/usr/bin,mystnb-docutils-pseudoxml,1)
	$(call create_man,debian/python3-myst-nb/usr/bin,mystnb-docutils-xml,1)
	$(call create_man,debian/python3-myst-nb/usr/bin,mystnb-quickstart,1)
	$(call create_man,debian/python3-myst-nb/usr/bin,mystnb-to-jupyter,1)
	find $(CURDIR)/debian/python3-myst-nb/usr/lib/python3/dist-packages -type d -name "__pycache__" -exec rm -rf {} +
	dh_link

override_dh_auto_test: