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
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=sphinx-gallery
export PYBUILD_AFTER_INSTALL=rm -rf $(CURDIR)/debian/*/usr/bin
export PYBUILD_TEST_ARGS=-v -p no:warnings \
-k "not test_embed_code_links_get_data \
and not test_dummy_image \
and not test_split_code_and_text_blocks \
and not test_bug_cases_of_notebook_syntax \
and not test_jupyter_notebook \
and not test_file_is_generated"
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
override_dh_installchangelogs:
dh_installchangelogs -A CHANGES.rst
# sphinx documentation
execute_before_dh_sphinxdoc:
http_proxy='http://127.0.0.1:9/' python3 -m sphinx -d debian/doctrees \
-N -bhtml doc/ debian/python-sphinx-gallery-doc/usr/share/doc/python-sphinx-gallery-doc/html
# Fix lintian extra-license-file/zero-byte-file-in-doc-directory
find debian/python-sphinx-gallery-doc/usr -name 'LICENSE.txt' -exec rm -rf {} +;
# Fix lintian font-in-non-font-package /font-in-non-font-package
find debian/python-sphinx-gallery-doc/usr -type d -name 'webfonts' -prune -exec rm -rf {} +;
override_dh_link:
dh_link
# Removed files that prevent reproducible
find debian/python-sphinx-gallery-doc/ '(' \
-name graphviz-* \
-o -name junit-results.xml \
-o -name sg_api_usage.html \
-o -name sphx_glr_plot_2* \
-o -name sphx_glr_plot_5* \
-o -name sphx_glr_plot_6* \
-o -name sphx_glr_plot_raise_001* \
-o -name sphx_glr_plot_raise_thumb.png \
-o -name plot_8_animations.* \
-o -name sg_api_usage.rst.txt \
-o -name sphx_glr_plot_raise_thumbnail_001.png \
-o -name sphx_glr_plot_raise_thumbnail_001_2_00x.png \
-o -name sphx_glr_plot_raise_thumbnail_thumb.png \
')' -delete
# Removed directory empty
find debian/python-sphinx-gallery-doc/ -type d -empty -delete
# Fix lintian duplicate-files
jdupes -rOl debian/python-sphinx-gallery-doc/usr
override_dh_installexamples:
dh_installexamples examples/*
find debian/python3-sphinx-gallery/ -name __pycache__ -prune -exec rm -rf {} +;
|