File: rules

package info (click to toggle)
python-pint 0.24.4-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,924 kB
  • sloc: python: 19,983; makefile: 149
file content (27 lines) | stat: -rwxr-xr-x 1,331 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
#!/usr/bin/make -f

export PYBUILD_NAME=pint
# See https://github.com/hgrecco/pint/issues/1898
export PYBUILD_TEST_ARGS=\
-k "not test_load_definitions_stage_2 \
and not test_dataset_operation_with_unit \
and not test_quantification" \
--pyargs pint

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

override_dh_installdocs:
	dh_installdocs
	dh_installdocs -A AUTHORS

override_dh_sphinxdoc:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html docs debian/python-pint-doc/usr/share/doc/python-pint-doc/html
	dh_sphinxdoc
	$(RM) -r $(CURDIR)/debian/python-pint-doc/usr/share/doc/python-pint-doc/html/_static/__pycache__
	$(RM) -r $(CURDIR)/debian/python-pint-doc/usr/share/doc/python-pint-doc/html/_static/vendor
	$(RM) $(CURDIR)/debian/python-pint-doc/usr/share/doc/python-pint-doc/html/_static/vendor/fontawesome/5.13.0/LICENSE.txt
	find $(CURDIR)/debian/python-pint-doc/usr/share/doc/python-pint-doc/html -type f -print0 | xargs --no-run-if-empty -0 sed -i 's|https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js|file:///usr/share/javascript/requirejs/require.min.js|g'
	find $(CURDIR)/debian/python-pint-doc/usr/share/doc/python-pint-doc/html -type f -print0 | xargs --no-run-if-empty -0 sed -i 's|https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js||g'
endif