File: rules

package info (click to toggle)
python-psutil 5.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,512 kB
  • sloc: python: 18,651; ansic: 15,029; makefile: 441; javascript: 153
file content (36 lines) | stat: -rwxr-xr-x 1,056 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
#!/usr/bin/make -f

PY3VERS := $(shell py3versions -s)

export PYBUILD_AFTER_BUILD=$(MAKE) -C docs html PYTHON=python3

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

override_dh_auto_install:
	set -e ; \
	for python in $(PY3VERS); do \
		$$python setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-psutil; \
		$$python-dbg setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-psutil-dbg; \
	done


override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="PYTHONWARNINGS=all PSUTIL_TESTING=1 PSUTIL_DEBUG=1 PYTHONPATH={build_dir} {interpreter} psutil/tests/runner.py || true" dh_auto_test
endif

override_dh_installchangelogs:
	dh_installchangelogs HISTORY.rst

override_dh_installdocs:
	dh_installdocs -X.DS_Store
	dh_installdocs -ppython-psutil-doc docs/_build/html README.rst

override_dh_compress:
	dh_compress -X.py

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip -ppython3-psutil --dbg-package=python3-psutil-dbg
endif