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
|
#!/usr/bin/make -f
# export DH_VERBOSE = 1
%:
dh $@ --buildsystem=pybuild
execute_before_dh_auto_build:
# Ensure the intersphinx cache directory exists and the inventory file is present
mkdir -p docs/_build/intersphinx_cache
cp -a debian/additions/intersphinx-objects.inv docs/_build/intersphinx_cache/objects.inv
# Build HTML documentation
mkdir -p docs/_build/html
sphinx-build -W -b html -D html_theme=default \
docs docs/_build/html
execute_after_dh_auto_install:
# Use debhelper to obtain the upstream version
# See patches/0001-change-auto-version.patch for more info
sed -i "s/@DEB_VERSION@/$$(head -1 debian/changelog | \
grep -Po '\(\K[^~+-]+')/" \
debian/python3-py-ecc/usr/lib/python3.*/dist-packages/py_ecc/__init__.py
execute_after_dh_sphinxdoc:
# Delete the documentation "_sources" directory, which we don't want to
# ship in the binary package once it has been converted to HTML.
rm -rf debian/python3-py-ecc/usr/share/doc/python3-py-ecc/html/_sources/
# Generating the documentation links depend on recent database of links. As
# Debian builds don't have network access, use this rules target to fetch the
# file into the Debian packaging sources when preparing new package updates.
download-intersphinx-links:
curl -L https://docs.python.org/3.10/objects.inv -o debian/additions/intersphinx-objects.inv
|