File: rules

package info (click to toggle)
twine 6.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 824 kB
  • sloc: python: 4,153; makefile: 23; sh: 6
file content (30 lines) | stat: -rwxr-xr-x 988 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
export PYBUILD_NAME=twine

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build --buildsystem=pybuild
ifeq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),)
	# For sphinxcontrib.programoutput:
	mkdir .pybuild/bin
	printf '#!/bin/sh\nset -euf\nPYTHONPATH=$(CURDIR) exec python3 -m twine "$$@"\n' > .pybuild/bin/twine
	chmod +x .pybuild/bin/twine
	PATH=$(CURDIR)/.pybuild/bin:$$PATH twine --help  # Sanity chcek
	PATH=$(CURDIR)/.pybuild/bin:$$PATH python3 -m sphinx -b html docs docs/_build/html
	PATH=$(CURDIR)/.pybuild/bin:$$PATH python3 -m sphinx -b man docs docs/_build/man
	sed  's/.TH "TWINE" "1" /.TH "TWINE" "3" /g' < docs/_build/man/twine.1 > docs/_build/man/twine.3 # Set the file to section3
	rm docs/_build/man/twine.1
endif

override_dh_auto_test:
	TERM= dh_auto_test -- \
	  --test-pytest \
	  --test-args '--ignore tests/test_integration.py'

override_dh_compress:
	dh_compress -X.html

override_dh_python3:
	dh_python3 --accept-upstream-versions