File: rules

package info (click to toggle)
pywavelets 0.5.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,036 kB
  • ctags: 7,339
  • sloc: python: 5,219; ansic: 4,935; makefile: 98
file content (43 lines) | stat: -rwxr-xr-x 1,658 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
export PYBUILD_AFTER_TEST=rm -rf {destdir}/usr/lib/python{version}/dist-packages/pywt/tests
export PYBUILD_BEFORE_TEST=cp -r {dir}/pywt/tests {destdir}/usr/lib/python{version}/dist-packages/pywt
export PYBUILD_NAME=pywt
export PYTHONWARNINGS=d

LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"

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


override_dh_auto_clean:
	dh_auto_clean
	# remove re-generated files
	rm -f ./pywt/_extensions/_pywt.c ./pywt/_extensions/_dwt.c ./pywt/_extensions/_pywt.h ./pywt/_extensions/_swt.c ./pywt/_extensions/_cwt.c

override_dh_auto_test:

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build $(SPHINXOPTS) -N -bhtml doc/source doc/build/html

override_dh_auto_install:
	dh_auto_install
	# Unfortunately, we need to run tests after install because numpy does not
	# let you run them from the source directory.
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="{interpreter} -c \"import sys ; sys.path.insert(0, '{destdir}/usr/lib/python{version}/dist-packages/') ; import pywt ; pywt.test(verbose=5)\"" dh_auto_test
endif

override_dh_fixperms_indep:
	dh_fixperms
	# Remove execution flag set by upstream for all files.
	find debian/python*-pywt -type f -exec chmod -x {} \;
override_dh_fixperms_arch:
	# Remove execution flag set by upstream also on examples.
	find debian/python-pywt-doc -type f -exec chmod -x {} \;