File: rules

package info (click to toggle)
python-momepy 0.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 51,428 kB
  • sloc: python: 11,098; makefile: 35; sh: 11
file content (39 lines) | stat: -rwxr-xr-x 1,503 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/pysal/momepy
include /usr/share/openstack-pkg-tools/pkgos.make

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)

TEST_EXPR := not test_Theil and not test_Gini and not test_Alignment
ifeq ($(DEB_HOST_ARCH),i386)
# Fails due to x87 excess precision, but the graph is indexed by floats so
# it's hard to fix the test properly.
TEST_EXPR += and not test_gdf_to_nx_angles
endif

export PYBUILD_NAME=monepy
export PYBUILD_TEST_ARGS=momepy/tests -v -k '$(TEST_EXPR)'

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

override_dh_auto_clean:
	rm -rf build .stestr *.egg-info docs/generated
	rm -rf debian/python3-monepy
	find . -iname '*.pyc' -delete
	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
	dh_auto_clean

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html docs debian/python-momepy-doc/usr/share/doc/python-momepy-doc/html
	dh_sphinxdoc
endif

# Not sure why, but this package doesn't get installed automatically... :/
# Let's get it in manually.
override_dh_auto_install:
	dh_auto_install
	mkdir -p $(CURDIR)/debian/python3-momepy/usr/lib/python3/dist-packages
	cp -axuf .pybuild/cpython3_`py3versions -dv`_monepy/build/momepy* $(CURDIR)/debian/python3-momepy/usr/lib/python3/dist-packages