| 1 |
#! /usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=aiodogstatsd |
| 4 |
|
| 5 |
# need packaging async_asgi_testclient and pytest-mockservers |
| 6 |
export PYBUILD_TEST_ARGS=--ignore=tests/test_contrib_starlette.py \ |
| 7 |
--ignore=tests/test_client.py \ |
| 8 |
--ignore=tests/test_contrib_aiohttp.py |
| 9 |
|
| 10 |
export PYBUILD_TEST_PYTEST=1 |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ --buildsystem=pybuild |
| 14 |
|
| 15 |
override_dh_auto_build: |
| 16 |
dh_auto_build |
| 17 |
ifeq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),) |
| 18 |
PYTHONPATH=. http_proxy='127.0.0.1:9' mkdocs build --clean --site-dir build/html |
| 19 |
endif |
| 20 |
find build/html -type f -name sitemap.xml.gz -delete |
| 21 |
|
| 22 |
override_dh_compress: |
| 23 |
dh_compress -X.ttf -X.svg -X.eot -X.woff |
| 24 |
|
| 25 |
|
| 26 |
override_dh_installdocs: |
| 27 |
dh_installdocs |
| 28 |
for html in `find debian -name "*.html"` ; do \ |
| 29 |
sed -i \ |
| 30 |
-e 's#https://cdnjs.cloudflare.com/ajax/libs/highlight.js/[^/]*/styles/github\.min\.css#file:///usr/share/javascript/highlight.js/styles/github.css#' \ |
| 31 |
-e 's#https://cdnjs.cloudflare.com/ajax/libs/highlight.js/[^/]*/highlight\.min\.js#file:///usr/share/javascript/highlight.js/highlight.min.js#' \ |
| 32 |
$${html} ; \ |
| 33 |
done |