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
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1
export PYBUILD_NAME=damo
%:
dh $@ --buildsystem=pybuild
clean:
rm -rf .pybuild
[ -f pyproject.toml.orig ] && mv -f pyproject.toml.orig pyproject.toml || :
rm -f setup.py
rm -rf src/damo
rm -rf src/damo.egg-info
find . -path '*/__pycache__/*' -delete
find . -type d -name '__pycache__' -delete
rm -rf .pytest_cache
rm -f debian/manpage/damo.1
rm -f debian/damo.substvars
rm -rf debian/damo/
rm -rf debian/.debhelper
rm -f debian/*debhelper*
rm -f debian/files
execute_before_dh_auto_configure:
# from packaging/build.sh
mv pyproject.toml pyproject.toml.orig
cp -p packaging/pyproject.toml .
cp -p packaging/setup.py .
mkdir -p src/damo
cp -p src/*.py src/damo
# remove shebang from the newly copied damo.py
sed -i '1{\@^#!/usr/bin/env python@d}' src/damo/damo.py
touch -r damo src/damo/damo.py
touch -r damo src/damo/__init__.py
# regenerate manpage
(cd debian/manpage; ./gen-manpage.sh)
override_dh_auto_test:
pytest -v
|