#!/usr/bin/make -f UPSTREAM_GIT := https://github.com/networkx/networkx include /usr/share/openstack-pkg-tools/pkgos.make LIB3 := $(shell python3 -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") PYTHON3 := $(shell py3versions -r) export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~bpo.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1) export PYBUILD_NAME=networkx export RES_OPTIONS=attempts:0 %: dh $@ --with python3,sphinxdoc --buildsystem=pybuild override_dh_auto_clean: dh_auto_clean # Add here commands to clean up after the build process. rm -fr build networkx/version.py test.* doc/source/templates/gallery.html fontList.cache # Make sure that there's no .pyc left find . -name '*.pyc' -exec rm {} ';' rm -f doc/file.dot doc/fontlist-v330.json doc/path.png doc/path.to.file rm -f examples/advanced/edgelist.utf-8 examples/basic/grid.edgelist examples/pygraphviz/grid.dot examples/pygraphviz/k5.dot examples/pygraphviz/k5.ps examples/pygraphviz/k5_attributes.dot rm -rf .pytest_cache rm -rf doc/reference/generated doc/modules/generated doc/reference/classes/generated doc/reference/readwrite/generated \ doc/reference/algorithms/generated doc/auto_examples \ examples/graphviz_drawing/*.dot file.dot path.png path.to.file \ examples/geospatial/graph.graphml examples/geospatial/graph.gpkg \ examples/geospatial/cache doc/modules override_dh_auto_test: PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} {interpreter} -m pytest networkx/tests --verbosity=2 -k 'not TestStronglyConnected.test_connected_raise and not TestAGraph.test_no_warnings_raised'" dh_auto_test override_dh_installexamples: dh_installexamples examples/* override_dh_compress: dh_compress -Xexamples/ -X.js -X.pdf -Xobjects.inv override_dh_missing: echo "I: Skipping dh_missing" override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) http_proxy=127.0.0.1:9 https_proxy=127.0.0.1:9 ; \ PYTHONPATH=. python3 -m sphinx -N -b html doc $(CURDIR)/debian/python3-networkx/usr/share/doc/python3-networkx/html dh_sphinxdoc endif