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 45 46
|
#!/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
rm -f test_unit
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
# ip -json link >$(CURDIR)/tests/test_unit/test_iproute_match/links.dump
ln -s tests/test_unit test_unit
ifneq (,$(filter s390x, $(DEB_HOST_ARCH)))
export MY_PYTEST_IGNORE="--ignore tests/test_unit/test_nlmsg/test_map_adapter.py --ignore tests/test_unit/test_nlmsg/test_marshal.py"
endif
set -e ; set -x ; for pyvers in $(PYTHON3S) ; do \
python$$pyvers -m pytest tests/test_unit -v $$MY_PYTEST_IGNORE ; \
python$$pyvers -m pytest tests/test_neutron -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
|