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
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
include /usr/share/dpkg/pkg-info.mk
export SETUPTOOLS_SCM_PRETEND_VERSION=${DEB_VERSION_UPSTREAM}
export HOME=$(CURDIR)
export PYBUILD_NAME=spopt
export PYBUILD_TEST_ARGS=-s -v
export PYBUILD_BEFORE_TEST=cp -r {dir}/spopt/tests/data {build_dir}/spopt/tests \
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
# Build sphinx HTML documentation
override_dh_auto_build:
dh_auto_build
PYTHONPATH=. \
https_proxy='https://127.0.0.1:9/' \
no_proxy=localhost python3 -m sphinx -N -bhtml -d \
debian/doctrees docs/ debian/html
#override_dh_auto_test:
override_dh_link:
dh_link
#Fixe duplicate-files
jdupes -rl debian/python-spopt-doc/usr
#Fixe privacy-breach-generic
find debian/python-spopt-doc/ -name '*.html' -exec sed -i 's|src="https://cdn||g' {} \;
#Fixe privacy-breach-logo
find debian/python-spopt-doc/ -name '*.html' -exec sed -i 's|https://mybinder.org/badge_logo.svg||g' {} \;
#Fixe font-in-non-font-package
find debian/python-spopt-doc/ -name '*glyphicons-*' -delete
#Fixe embedded-javascript-library
find debian/python-spopt-doc/usr/share/doc -name '*.js' -delete
find debian/python-spopt-doc/usr/share/doc -type d -empty -delete
|