File: rules

package info (click to toggle)
skimage 0.26.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,720 kB
  • sloc: python: 61,600; cpp: 2,592; ansic: 1,591; xml: 1,342; javascript: 1,267; makefile: 135; sh: 16
file content (56 lines) | stat: -rwxr-xr-x 1,693 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

# See also: scikits-learn
export HOME=/tmp

# don't optimize pngs, palette changes break tests and documented examples
export NO_PNG_PKG_MANGLE := 1

PY3VER  ?= $(shell py3versions -vd)
PY3VERS ?= $(shell py3versions -vr)

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

# upstream relies on signed chars
export DEB_CFLAGS_MAINT_APPEND := -fsigned-char
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

# Assure Agg backend for matplotlib to avoid any possible complication
export MPLBACKEND := Agg

# Disable failures on warnings
export SKIMAGE_TEST_STRICT_WARNINGS := False

%:
	dh $@ --buildsystem pybuild

override_dh_installdocs-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	# hotfix SPHINXBUILD -- remove in next release
	+\
		PYTHONPATH=$(CURDIR)/.pybuild/cpython3_$(PY3VER)/build:$$(python3 -c 'import sys;print(":".join(sys.path))') \
		PYTHON=python$(PY3VER) \
		SPHINXBUILD="python$(PY3VER) -m sphinx" \
		SPHINXOPTS="-D mathjax_path=MathJax.js" \
		$(MAKE) -C doc html
endif
	dh_installdocs -A CONTRIBUTORS.md README.md CONTRIBUTING.rst SECURITY.md TODO.txt CITATION.cff

## remove .so libraries from main package, and call dh_numpy3
execute_before_dh_python3:
	-find debian/python3-skimage/usr/lib -name "*.so" -delete

	dh_numpy3 -ppython3-skimage-lib

## immediately useable documentation and exemplar scripts/data
override_dh_compress:
	dh_compress -X.py -X.html -X.pdf -X.css -X.jpg -X.txt -X.js -X.json -X.rtc

override_dh_sphinxdoc-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	dh_sphinxdoc -XMathJax.js -Xclipboard.min.js
endif

override_dh_strip_nondeterminism:
	dh_strip_nondeterminism -X.png