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
|
#! /usr/bin/make -f
# Disable internet access
export http_proxy=127.0.0.1:9
export https_proxy=127.0.0.1:9
# Fix pytest order which need rootdir to be set where the tests folder is
# as pytest's nodeid is relative to the rootdir and upstream use that to order
# tests.
# Also a cache is created in the rootdir, explicitly keep it at the original
# location.
# See also: https://github.com/streamlink/streamlink/pull/5888
export PYBUILD_TEST_ARGS=--rootdir=. -o cache_dir=$(CURDIR)/.pytest_cache
%:
dh $@ --buildsystem=pybuild
# Add LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 to have reproducible builds
# sphinx: some strings are localized, see #998059
# lxml: lxml crashes when LC_ALL uses special encodings (running
# reprotest would cause a segfault).
export LC_ALL=C.UTF-8
export LANGUAGE=C.UTF-8
# Build docs with intersphinx disabled as it requires internet
override_dh_auto_build:
PYTHONPATH=$(CURDIR)/src make --directory=docs NO_INTERSPHINX=1 html man
sed -i 's/^\.ft C$$/.ft CW/' docs/_build/man/streamlink.1
dh_auto_build
# Explicitly uses CHANGELOG.md instead of docs/changelog.md (the default
# file used by dh_installchangelogs)
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.md
# Needed to prevent docs/changelog.html from being compressed
override_dh_compress:
dh_compress -X.html
override_dh_link:
dh_link
jdupes -rl debian/python3-streamlink-doc/usr/share/doc/python3-streamlink/html
# Needed to correctly include non-windows dependencies
override_dh_python3:
dh_python3 --depends-section=':platform_system != "Windows"'
|