File: rules

package info (click to toggle)
nitime 0.12.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,532 kB
  • sloc: python: 10,162; makefile: 110; sh: 41
file content (66 lines) | stat: -rwxr-xr-x 1,736 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/default.mk
PACKAGE_NAME = python3-nitime
PACKAGE_ROOT_DIR = debian/${PACKAGE_NAME}
INSTALL_PATH = $(CURDIR)/debian/tmp
PYTHON=$(shell py3versions --default)

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# override matplotlib config directory
export MPLCONFIGDIR=$(CURDIR)/build
export HOME=$(CURDIR)/build

ifneq (,$(findstring $(DEB_HOST_ARCH_BITS),32))
export PYBUILD_TEST_ARGS=-k "not ( \
		test_UniformTime_index_at \
		or test_basic_slicing \
		or test_index_at_20101206 \
		or test_timearray_math_functions \
	)" --pyargs nitime
else
export PYBUILD_TEST_ARGS=--pyargs nitime
endif
# skip some test on 32-bit systems.

%:
	dh $@ --buildsystem pybuild

execute_after_dh_auto_install:
	mkdir -p $(MPLCONFIGDIR)  # just in case
	# Prune duplicate LICENSE file
	find debian/ -name LICENSE -delete
	# Remove stray coverage.xml report(s).
	rm -vf $(INSTALL_PATH)/usr/lib/python*/dist-packages/coverage.xml
	# Only now lets build docs
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	export PYTHONPATH=$$(/bin/ls -d $(INSTALL_PATH)/usr/lib/$(PYTHON)/*-packages); \
	$(MAKE) -C doc html-no-exec
	# TODO: remove -no-exec when doc/examples/filtering_fmri.py is fixed
	-rm doc/_build/html/_static/jquery.js
	-rm doc/_build/html/_static/underscore.js
	-rm -r doc/_build/html/_sources
	for f in `find . -name "*.html"`; do \
		sed -i -e '/cloudflare/d' -e '/jsdelivr/d' $$f; \
	done
endif

## immediately useable documentation
## and exemplar data (they are small excerpts anyway)
override_dh_compress:
	dh_compress \
		-X.py \
		-X.html \
		-X.css \
		-X.jpg \
		-X.txt \
		-X.js \
		-X.json \
		-X.rtc \
		-X.par \
		-X.bin

get-orig-source:
	-uscan --upstream-version 0 --rename