File: rules

package info (click to toggle)
fiona 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,172 kB
  • ctags: 1,169
  • sloc: python: 5,130; makefile: 157; sh: 68
file content (43 lines) | stat: -rwxr-xr-x 1,622 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

# Enable hardening build flags, except:
#  pie: causes build failure
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie

export LC_ALL=C.UTF-8
export LANG=C.UTF-8
LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")

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

export PYBUILD_NAME=fiona
export PYBUILD_AFTER_BUILD_python2 = PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' sphinx-build -N -bhtml -D today="$(BUILD_DATE)" docs/ build/html 
export PYBUILD_TEST_NOSE=1
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests
#fio_load and cli are excluded as these only work after installation
export PYBUILD_TEST_ARGS=--exclude test_geopackage --exclude fiona --exclude test_filter_vsi --exclude cli --exclude fio_load --exclude test_fio_info --exclude test_fio_ls --exclude test_unicode

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

override_dh_clean:
	dh_clean
	rm -rf fiona/*.so gdal-config.txt fiona/*.c VERSION.txt fiona/*.cpp Fiona.egg-info/ fiona/ogrext.pyx

override_dh_auto_test:
# Ignore test failures on problematic architectures only
ifneq (,$(findstring $(DEB_BUILD_ARCH),"hurd-i386 kfreebsd-amd64 kfreebsd-i386 ppc64"))
	dh_auto_test || echo "Ignoring test failures"
else
	dh_auto_test
endif

override_dh_install:
	dh_install
	rm -rf debian/python-fiona/usr/bin
	rm -rf debian/python3-fiona/usr/bin

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