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
PYTHON3S:=$(shell py3versions -vr)
%:
dh $@ --buildsystem=python_distutils --with python3,sphinxdoc
override_dh_auto_clean:
set -e && for pyvers in $(PYTHON3S); do \
python$$pyvers setup.py clean; \
done
override_dh_clean:
dh_clean -O--buildsystem=python_distutils
rm -rf build python-pypump.egg-info
rm -rf docs/_build/
override_dh_auto_build:
set -e && for pyvers in $(PYTHON3S); do \
python$$pyvers setup.py build; \
done
override_dh_sphinxdoc:
python3 -m sphinx -b html docs $(CURDIR)/debian/python-pypump-doc/usr/share/doc/python-pypump-doc/html
dh_sphinxdoc
# # This version pypump-shell needs the path $HOME/.config/
# # to exist for it to build correctly, so I'm adding it
# # manually for now.
# help2man --no-info \
# -n 'sets up an environment and oauth tokens and allows for interactive testing' \
# --version-string=0.5.1 "/usr/bin/env python2.7 $(CURDIR)/pypump-shell" > $(CURDIR)/debian/pypump-shell.1
override_dh_auto_install:
set -e && for pyvers in $(PYTHON3S); do \
python$$pyvers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python3-pypump; \
done
# Remove the python-shell script, since it gets installed in another package
rm -r $(CURDIR)/debian/python3-pypump/usr/bin/
override_dh_install:
dh_install
sed -i '1 s/python/python3/' $(CURDIR)/debian/pypump-shell/usr/bin/pypump-shell
|