File: rules

package info (click to toggle)
pyroute2 0.7.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,468 kB
  • sloc: python: 48,092; makefile: 252; javascript: 183; ansic: 81; sh: 31; awk: 17
file content (39 lines) | stat: -rwxr-xr-x 1,167 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
#!/usr/bin/make -f

UPSTREAM_GIT := https://github.com/svinota/pyroute2
include /usr/share/openstack-pkg-tools/pkgos.make

export PYBUILD_NAME=pyroute2
export python=python3

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

override_dh_auto_clean:
	rm -rf build .stestr *.egg-info .pybuild
	find . -iname '*.pyc' -delete
	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
	rm -f pyroute2/config/version.py

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	echo "No tests for now..."
#	ip -json link >$(CURDIR)/tests/test_unit/test_iproute_match/links.dump
#	set -e ; set -x ; for pyvers in $(PYTHON3S) ; do \
#		python$$pyvers -m pytest tests/test_unit -v ; \
#	done
endif

override_dh_auto_build:
	echo $$OSLO_PACKAGE_VERSION > VERSION
	$(MAKE) VERSION
	dh_auto_build

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.rst

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR)/debian/test-installs/usr/lib/python3/dist-packages python3 -m sphinx -b html docs $(CURDIR)/debian/python-pyroute2-doc/usr/share/doc/python-pyroute2-doc/html
	dh_sphinxdoc
endif