File: rules

package info (click to toggle)
python-pysaml2 7.5.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 39,604 kB
  • sloc: xml: 388,184; python: 66,155; makefile: 148; sh: 80
file content (47 lines) | stat: -rwxr-xr-x 1,832 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
#!/usr/bin/make -f

UPSTREAM_GIT := https://github.com/IdentityPython/pysaml2
include /usr/share/openstack-pkg-tools/pkgos.make

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

#export http_proxy=127.0.0.1:9
#export https_proxy=127.0.0.1:9

export PYBUILD_NAME=pysaml2
export PYBUILD_TEST_ARGS=tests -v -Wignore -k "not test_signed_metadata_proper_str_bytes_handling and not test_enc1 and not test_encrypted_response_6 and not test_validate_cert_chains and not test_validate_with_root_cert"

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

override_dh_auto_clean:
	rm -rf build src/*.egg-info .pytest_cache tests/subject.db.db tests/subject_data.db.db eptid.db
	find . -iname '*.pyc' -delete
	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
	dh_auto_clean

# This file ends-up in the package, and makes the package
# unreproducible. Let's delete it.
execute_after_dh_auto_test:
	find .pybuild -type f -name eptid.db -delete

#override_dh_install:
#	dh_install
#	set -e ; set -x ; for i in `ls $(CURDIR)/debian/python3-pysaml2/usr/bin/*.py` ; do \
#		DEST_FILE=`echo $$i | sed s/\\.py\\$$//` ; \
#		mv $$i $$DEST_FILE ; \
#	done
#	sed -i 's| #!/usr/bin/env python|#!/usr/bin/env python3|' $(CURDIR)/debian/python3-pysaml2/usr/bin/mdexport

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/python3-pysaml2/usr/bin
	cp .pybuild/cpython3_`py3versions -dv 2>/dev/null`_pysaml2/scripts/* debian/python3-pysaml2/usr/bin

override_dh_sphinxdoc:
	PYTHONPATH=`pwd`/.pybuild/cpython3_`py3versions -dv 2>/dev/null`_pysaml2/build python3 -m sphinx -D today="$(BUILD_DATE)" -b html docs debian/python-pysaml2-doc/usr/share/doc/python-pysaml2-doc/html
	dh_sphinxdoc

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3