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 51 52 53 54 55 56 57
|
export LC_ALL=C.UTF-8
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests/data {build_dir}
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=-k 'not test_pickleable_member_roundtrip and not test_pickleable_roundtrip'
export PYBUILD_NAME=cogent3
ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf mipsel s390x mips64el))
export PYBUILD_DISABLE=test
endif
include /usr/share/dpkg/default.mk
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
override_dh_clean:
for f in `find -name '*.c'` ; do \
head -n 1 "$$f" | grep -q '^/\* Generated by Cython' && rm "$$f" ; \
done
rm -rf build build-stamp
rm -rf doc/_build
dh_clean
execute_after_dh_auto_build:
ifeq (,$(filter $(DEB_HOST_ARCH), armel mipsel))
set -x; cd doc; PYTHONPATH=$(CURDIR) http_proxy='127.0.0.1:9' $(MAKE) html
find doc/_build -name "*.doctree*" -delete
rm -f doc/_build/html/_sources/COGENT_LICENSE.txt
rm -f doc/_build/html/_static/jquery.js
rm -f doc/_build/html/_static/underscore.js
rm -rf doc/_build/html/_images/math/
endif
override_dh_sphinxdoc-indep:
dh_sphinxdoc -i
sed -i 's%https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js%file:///usr/share/javascript/requirejs/require.min.js%' `find $(CURDIR)/debian/python-cogent-doc/usr/share/doc/python-cogent-doc/html/ -type f -name "*.html"`
execute_after_dh_shlibdeps:
dh_numpy3
override_dh_compress:
dh_compress --exclude=.js --exclude=.fasta --exclude=.txt --exclude=.pdb
execute_after_dh_installdocs:
rm -rf debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/html/_sources
find debian -name doctrees -type d | xargs rm -rf
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
|