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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpkg/pkg-info.mk
export UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')
UPSTREAM_VERSION_MAJOR = $(shell echo $(UPSTREAM_VERSION) | cut -d '.' -f 1)
UPSTREAM_VERSION_MINOR = $(shell echo $(UPSTREAM_VERSION) | cut -d '.' -f 2)
UPSTREAM_VERSION_PATCH = $(shell echo $(UPSTREAM_VERSION) | cut -d '.' -f 3)
export PYBUILD_TEST_ARGS=-k 'not test_nbytes_stored'
export PYBUILD_NAME=zarr
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
override_dh_auto_configure:
echo "version = '$(UPSTREAM_VERSION)'" > zarr/version.py
echo "version_tuple = ($(UPSTREAM_VERSION_MAJOR), $(UPSTREAM_VERSION_MINOR), $(UPSTREAM_VERSION_PATCH))" >> zarr/version.py
cat zarr/version.py
dh_auto_configure
override_dh_auto_build-indep:
dh_auto_build -i
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
cd docs && \
PYTHONPATH=$(CURDIR) http_proxy='http://127.0.0.1:9/' https_proxy='https://127.0.0.1:9/' \
LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 \
sphinx-build -N -E -T -b html . $(CURDIR)/.pybuild/docs/html/
rm -rf $(CURDIR)/.pybuild/docs/html/.doctrees
endif
override_dh_auto_test:
dh_auto_test
$(RM) -r .pybuild/*/build/fixture .pybuild/*/build/data
override_dh_auto_clean:
# does not work due to missing setuptools-scm
# dh_auto_clean
$(RM) zarr/version.py
$(RM) -r .pytest_cache .pybuild build zarr.egg-info
$(RM) -r $(shell find . -name __pycache__)
|