File: rules

package info (click to toggle)
osmnx 1.2.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 728 kB
  • sloc: python: 3,795; sh: 73; makefile: 43
file content (44 lines) | stat: -rwxr-xr-x 1,421 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
40
41
42
43
44
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=osmnx

default:
	@uscan --no-conf --dehs --report || true

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

override_dh_prep:
	chmod a-x tests/test_osmnx.py
	chmod 0755 tests/lint_test.sh
	dh_prep -O--buildsystem=pybuild

override_dh_auto_test:
	PYTHONPATH=$(CURDIR) PYTHONDONTWRITEBYTECODE=1 \
		python3-coverage run --source osmnx -m pytest --verbose debian/tests/test_osmnx_offline.py

DEB_SPHINXDOC_SRCDIR=$(CURDIR)/docs/source
DEB_SPHINXDOC_BUILDDIR=$(CURDIR)/_BUILD/doc
DEB_SPHINXDOC_PKGDOCDIR=/usr/share/doc/python-$(PYBUILD_NAME)-doc
DEB_SPHINXDOC_DOCDIR=$(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/$(DEB_SPHINXDOC_PKGDOCDIR)
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	python3 -m sphinx -M latexpdf $(DEB_SPHINXDOC_SRCDIR) $(DEB_SPHINXDOC_BUILDDIR)
	python3 -m sphinx -M html     $(DEB_SPHINXDOC_SRCDIR) $(DEB_SPHINXDOC_BUILDDIR)
	cp -prd -t $(DEB_SPHINXDOC_DOCDIR) $(DEB_SPHINXDOC_BUILDDIR)/latex/OSMnx.pdf $(DEB_SPHINXDOC_BUILDDIR)/html
	dh_sphinxdoc $(DEB_SPHINXDOC_PKGDOCDIR)/html
endif

override_dh_installchangelogs:
	dh_installchangelogs --keep CHANGELOG.md

override_dh_installexamples:
	dh_installexamples  -XREADME.md -X.yml -X.sh

override_dh_compress:
	dh_compress -Xtests -X.pdf -X.ipynb

override_dh_auto_clean:
	dh_auto_clean -O--buildsystem=pybuild
	chmod a+x tests/test_osmnx.py