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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#!/usr/bin/make -f
# -*- coding: utf-8 -*-
#export DH_VERBOSE=1
VERSION = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
PY2VERSIONS = $(shell pyversions -vr)
PY3VERSIONS = $(shell py3versions -vr)
%:
dh $@ --with python2,python3,sphinxdoc
override_dh_auto_build:
dh_auto_build
set -e; for version in $(PY3VERSIONS); do \
python$$version setup.py build; \
done
make -C docs html
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
set -e; for version in $(PY2VERSIONS) $(PY3VERSIONS); do \
python$$version -c 'import SimPy; SimPy.test()'; \
done
endif
override_dh_install:
dh_install --fail-missing
override_dh_installchangelogs:
dh_installchangelogs
# install the upstream changelog at the right place in the doc package
dh_installchangelogs -ppython-simpy-doc docs/source/Manuals/HISTORY.rst
override_dh_compress:
dh_compress -X.py -X.txt
override_dh_auto_install:
# Replace broken shebangs with /usr/bin/python
find build/ -name '*.py' -exec sed -i -e '1s|^#!.*python.*|#!/usr/bin/python|' '{}' ';'
dh_auto_install
set -e; for version in $(PY3VERSIONS); do \
python$$version setup.py install --no-compile -O0 --install-layout=deb --root $(CURDIR)/debian/tmp; \
done
# Remove deprecated python3 gui stuff
cd $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/SimPy && \
rm GUIDebug.py SimGUI.py SimPlot.py SimulationGUIDebug.py tkconsole.py tkprogressbar.py
override_dh_auto_clean:
dh_auto_clean
set -e; for version in $(PY3VERSIONS); do \
python$$version setup.py clean; \
done
rm -rf SimPy/__pycache__/
rm -rf docs/html
|