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
|
#!/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
%:
dh $@ --buildsystem=python_distutils --with python3,sphinxdoc
override_dh_auto_clean:
rm -rf build
find . -iname '*.pyc' -delete
for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
override_dh_auto_build:
echo "Do nothing..."
override_dh_auto_install:
pkgos-dh_auto_install --no-py2 --in-tmp
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
set -e ; for pyvers in $(PYTHON3S) ; do \
http_proxy=127.0.0.1:9 https_proxy=127.0.0.9:9 \
HTTP_PROXY=127.0.0.1:9 HTTPS_PROXY=127.0.0.1:9 \
RES_OPTIONS=attempts:0 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python$$pyvers -m pytest tests -Wignore -k "not test_signed_metadata_proper_str_bytes_handling and not test_enc1" ; \
done
endif
set -e ; set -x ; for i in `ls $(CURDIR)/debian/tmp/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/tmp/usr/bin/mdexport
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3 -m sphinx -D today="$(BUILD_DATE)" -b html docs debian/python-pysaml2-doc/usr/share/doc/python-pysaml2-doc/html
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
override_dh_auto_test:
override_dh_sphinxdoc:
dh_sphinxdoc
|