#!/usr/bin/make -f UPSTREAM_GIT := https://github.com/rohe/pysaml2.git 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" %: 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