File: rules

package info (click to toggle)
networkx 3.4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,700 kB
  • sloc: python: 105,310; xml: 544; makefile: 131; javascript: 120; sh: 34
file content (52 lines) | stat: -rwxr-xr-x 2,288 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/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