File: rules

package info (click to toggle)
rasterio 1.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,092 kB
  • sloc: python: 19,840; makefile: 276; sh: 164
file content (74 lines) | stat: -rwxr-xr-x 2,800 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
67
68
69
70
71
72
73
74
#!/usr/bin/make -f

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)

export PYBUILD_NAME=rasterio
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=--ignore tests/test_env.py \
                         --ignore tests/test_io.py \
                         --ignore tests/test_merge.py \
                         --ignore tests/test_rio_blocks.py \
                         --ignore tests/test_rio_bounds.py \
                         --ignore tests/test_rio_calc.py \
                         --ignore tests/test_rio_clip.py \
                         --ignore tests/test_rio_convert.py \
                         --ignore tests/test_rio_edit_info.py \
                         --ignore tests/test_rio_gcp.py \
                         --ignore tests/test_rio_helpers.py \
                         --ignore tests/test_rio_info.py \
                         --ignore tests/test_rio_insp.py \
                         --ignore tests/test_rio_main.py \
                         --ignore tests/test_rio_mask.py \
                         --ignore tests/test_rio_merge.py \
                         --ignore tests/test_rio_options.py \
                         --ignore tests/test_rio_overview.py \
                         --ignore tests/test_rio_rasterize.py \
                         --ignore tests/test_rio_rm.py \
                         --ignore tests/test_rio_sample.py \
                         --ignore tests/test_rio_shapes.py \
                         --ignore tests/test_rio_stack.py \
                         --ignore tests/test_rio_warp.py \
                         --ignore tests/test_session.py \
                         --ignore tests/test_warp.py \
                         --ignore tests/test_warpedvrt.py

%:
	dh $@ --with python3,numpy3 --buildsystem pybuild

override_dh_clean:
	dh_clean

	$(RM) rasterio/*.c
	$(RM) rasterio/_*.cpp
	$(RM) VERSION.txt
	$(RM) gdal-config.txt
	$(RM) .coverage

override_dh_auto_test:
# Ignore test failures on problematic architectures only
ifneq (,$(filter $(DEB_BUILD_ARCH),armel mips64el mipsel alpha hurd-i386 i64 kfreebsd-amd64 kfreebsd-i386 riscv64 sh4 sparc64 x32))
	dh_auto_test || echo "Ignoring test failures"
else
	dh_auto_test
endif

override_dh_install:
	dh_install

	$(RM) -r debian/python3-rasterio/usr/bin

	$(RM) -r debian/*/usr/lib/python*/dist-packages/.hypothesis/

override_dh_python3:
	dh_python3 -ppython3-rasterio -prasterio

override_dh_numpy3:
	dh_numpy3 -ppython3-rasterio

debian/rasterio.1:
	help2man rasterio -N -L en_US.utf8 -n "command line tools for reading/writing geospatial raster data" >debian/rasterio.1