File: rules

package info (click to toggle)
indexed-gzip 1.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 584 kB
  • sloc: ansic: 2,069; python: 982; makefile: 22; sh: 12
file content (42 lines) | stat: -rwxr-xr-x 1,436 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
#!/usr/bin/make -f

# this figures out the last merge point from 'master' into the Debian branch and
# then described this commit relative to the last release tag (V...)
# If this should make any sense the local upstream branch must track upstream's
# master or whatever other source branch.
gitver = $(shell [ -x /usr/bin/git ] && git describe --tags --match 'v[0-9].*' $$(git merge-base -a HEAD upstream) | sed -e 's/^v//' -e 's/-/+git/')

export DH_VERBOSE = 1
export PYBUILD_NAME = indexed-gzip

# one ring to rule them all ...
%:
	dh $@ --with python3 --buildsystem=pybuild


clean::
	python3 setup.py clean
	dh_clean
	# Ahhhhhhh!
	rm -rf .pybuild build .pytest_cache
	-rm -rf indexed_gzip.egg-info/
	# tests leave a bit of trash behind
	-rm -f ctest_*.gz
	-rm -rf runtests

# explicitely run the tests via distutils,as the maintainer appears to be
# too stupid to understand how to get pybuild to not fail on test invocation
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Tests are compatible with the develop build, doing that so it loads the pre-conditions
	mkdir -p $(CURDIR)/runtests && cp -a $(CURDIR)/build/* $(CURDIR)/runtests
	python3 setup.py develop --install-dir $(CURDIR)/runtests
	cd $(CURDIR)/runtests && PYTHONPATH=$(CURDIR) python3 -m indexed_gzip.tests && cd $(CURDIR)
	# Cleanup
	rm -rf $(CURDIR)/runtests
endif

override_dh_install:
	dh_install
	# to get the ABI dependency
	dh_numpy3