File: rules

package info (click to toggle)
pycsw 2.6.2%2Bdfsg-2
  • links: PTS, VCS
  • area: non-free
  • in suites: trixie
  • size: 10,896 kB
  • sloc: xml: 38,354; python: 11,556; makefile: 173; sh: 3
file content (40 lines) | stat: -rwxr-xr-x 1,402 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

export PYBUILD_NAME=pycsw
export PYBUILD_TEST_CUSTOM=1
export PYBUILD_TEST_ARGS=cd {dir} && PYTHONPATH={dir} {interpreter} -m pytest -v -k 'not harvesting' tests/
export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/lib/{package}

include /usr/share/dpkg/pkg-info.mk

BUILD_DATE := $(shell LC_ALL=C date -u "+%Y-%m-%d" -d "@$(SOURCE_DATE_EPOCH)")

%:
	dh  $@ --buildsystem pybuild

execute_after_dh_auto_build:
	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html # HTML generator
	ronn -r --date="$(BUILD_DATE)" --manual=pycsw debian/man/*.md
	rm -f debian/man/*.html

override_dh_auto_test:
	dh_auto_test || echo "Ignoring test failures"

execute_after_dh_install:
	# Remove pycache directories
	$(RM) -r debian/*/usr/share/pycsw/tests/__pycache__/
	$(RM) -r debian/*/usr/share/pycsw/tests/functionaltests/__pycache__/
	$(RM) -r debian/*/usr/share/pycsw/tests/unittests/__pycache__/

	# Remove empty directories
	find debian/*/usr/share/pycsw/tests -type d -empty -delete

	# Remove documentation outside usr/share/doc
	$(RM) debian/*/usr/share/pycsw/tests/README.txt
	$(RM) debian/*/usr/share/pycsw/tests/functionaltests/suites/apiso/data/README.txt
	$(RM) debian/*/usr/share/pycsw/tests/functionaltests/suites/cite/data/README.txt

override_dh_python3:
	dh_python3
	dh_python3 -p pycsw-wsgi --shebang=/usr/bin/python3 /usr/share/pycsw