File: rules

package info (click to toggle)
python-cartopy 0.18.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,204 kB
  • sloc: python: 15,593; makefile: 160; javascript: 65; sh: 6
file content (54 lines) | stat: -rwxr-xr-x 1,738 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Workaround for proj_api.h deprecation in PROJ 6.0.0
export DEB_CFLAGS_MAINT_APPEND=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H

export PYBUILD_NAME = cartopy
export PYBUILD_INSTALL_ARGS = --install-data=/usr/share/cartopy
export PYBUILD_TEST_PYTEST = 1
# Testing is restricted to test cases which do not require network access.
# See: https://github.com/SciTools/cartopy/issues/797.
# Testing of the plot feature (cartopy/tests/mpl/*) is disabled due to a bug in
# the matplotlib Debian package. See Bug-Debian #838301.
export PYBUILD_TEST_ARGS = --pyargs -m "not network and not natural_earth"

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

override_dh_auto_clean:
	dh_auto_clean || true
	$(RM) -r .pybuild
	$(RM) -r __pycache__

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifneq (,$(filter $(DEB_BUILD_ARCH),s390x ppc64))
	xvfb-run -a -n 1 -s "-screen 0 1280x1024x24 -dpi 96" dh_auto_test || echo "Ignoring test failures"
else
	xvfb-run -a -n 1 -s "-screen 0 1280x1024x24 -dpi 96" dh_auto_test
endif
endif

override_dh_auto_install:
	mkdir -p debian/python-cartopy-data/usr/share/cartopy/data
	dh_auto_install
	$(RM) -r debian/python3-cartopy/usr/lib/python3*/dist-packages/cartopy/data
	$(RM) -r debian/python3-cartopy/usr/lib/python3*/dist-packages/cartopy/tests/mpl/baseline_images

override_dh_install:
	dh_install

	# Remove documentation outside usr/share/doc
	$(RM) debian/*/usr/share/cartopy/data/shapefiles/gshhs/README.TXT

	# Don't include test output
	$(RM) -r debian/*/usr/lib/python*/dist-packages/cartopy_test_output

override_dh_python3:
	dh_python3
	dh_numpy3