| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
UPSTREAM_GIT := https://github.com/Julian/jsonschema.git |
| 4 |
include /usr/share/openstack-pkg-tools/pkgos.make |
| 5 |
|
| 6 |
export PYBUILD_NAME=jsonschema |
| 7 |
export PYBUILD_TEST_ARGS=-k 'not test_ipv4_validation_of_IP_addresses_leading_zeroes_should_be_rejected_as_they_are_treated_as_octals' |
| 8 |
|
| 9 |
export PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1) |
| 10 |
export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' -e 's/+dfsg1//' | head -n 1) |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ --with python3,sphinxdoc --buildsystem=pybuild |
| 14 |
|
| 15 |
override_dh_auto_test: |
| 16 |
# We need .egg_info for tests |
| 17 |
set -e ; set -x ; for pyvers in $(PYTHON3S) ; do \ |
| 18 |
python$$pyvers -m build --skip-dependency-check --no-isolation --wheel --outdir $(CURDIR)/debian/tmp ; \ |
| 19 |
done |
| 20 |
dh_auto_test |
| 21 |
|
| 22 |
override_dh_sphinxdoc: |
| 23 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 24 |
http_proxy=127.0.0.1:9 https_proxy=127.0.0.1:9 HTTP_PROXY=127.0.0.1:9 HTTPS_PROXY=127.0.0.1:9 PYTHONPATH=$(CURDIR)/.pybuild/cpython3_$(shell py3versions -vd)_jsonschema/build PYTHON=python3 python3 -m sphinx $(SPHINXOPTS) -b html docs $(CURDIR)/debian/python-jsonschema-doc/usr/share/doc/python-jsonschema-doc/html |
| 25 |
dh_sphinxdoc |
| 26 |
endif |