| 1 |
#! /usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=bepasty |
| 4 |
#export PYBUILD_DISABLE=test |
| 5 |
%: |
| 6 |
dh $@ --with python3,sphinxdoc --buildsystem=pybuild |
| 7 |
|
| 8 |
override_dh_auto_clean: |
| 9 |
dh_auto_clean || true |
| 10 |
if [ -f debian/old_version.py ]; then \ |
| 11 |
mv debian/old_version.py src/bepasty/_version.py ; \ |
| 12 |
fi |
| 13 |
if [ -f debian/old_SOURCES.txt ]; then \ |
| 14 |
mv debian/old_SOURCES.txt src/bepasty.egg-info/SOURCES.txt ; \ |
| 15 |
fi |
| 16 |
|
| 17 |
override_dh_auto_build: |
| 18 |
cp src/bepasty/_version.py debian/old_version.py |
| 19 |
cp src/bepasty.egg-info/SOURCES.txt debian/old_SOURCES.txt |
| 20 |
dh_auto_build |
| 21 |
mkdir src/bepasty/static/css |
| 22 |
for S in $$(pygmentize -L style | awk -F "[ :]" '/^\*/ { print $$2}') ; \ |
| 23 |
do \ |
| 24 |
pygmentize -f html -S $$S > src/bepasty/static/css/$$S.css ; \ |
| 25 |
done |
| 26 |
cd docs ; make html PYTHONPATH=../src ; cd - |
| 27 |
cd debian ; rst2man bepasty-server.1.rst bepasty-server.1 ; cd - |
| 28 |
cd debian ; rst2man bepasty-object.1.rst bepasty-object.1 ; cd - |
| 29 |
|
| 30 |
override_dh_auto_test: |
| 31 |
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 32 |
set -ex; for py in `py3versions --supported 2>/dev/null`; do \ |
| 33 |
$${py} -m pytest -m "not needs_server" src/ ; \ |
| 34 |
done |
| 35 |
endif |