#!/usr/bin/make -f export PYBUILD_NAME=cherrypy3 include /usr/share/dpkg/default.mk include /usr/share/dpkg/pkg-info.mk export SETUPTOOLS_SCM_PRETEND_VERSION = $(DEB_VERSION_UPSTREAM) %: dh $@ --buildsystem pybuild --with python2,python3,sphinxdoc # test suite results currently ignored. See README.source. override_dh_auto_test: -PYBUILD_TEST_ARGS="cherrypy/test cherrypy/wsgiserver -l " dh_auto_test # Upstream recommends nosetests -s, but also supports pytest. To use nosetests # uncomment the below override and comment out the PYBUILD_TEST_ARGS above. # override_dh_auto_test: # PYBUILD_DISABLE_python3=test \ # PYBUILD_SYSTEM=custom \ # PYBUILD_TEST_ARGS="nosetests -s" \ # dh_auto_test --buildsystem=pybuild # PYBUILD_DISABLE_python2=test \ # PYBUILD_SYSTEM=custom \ # PYBUILD_TEST_ARGS="nosetests3 -s" \ # dh_auto_test --buildsystem=pybuild override_dh_auto_build: cp -a man/cherryd.1 debian/cherryd.1 cp -a man/cherryd.1 debian/cherryd3.1 dh_auto_build override_dh_install: find debian/python*-cherrypy3/ -name LICENSE.md -exec rm {} \; dh_install # Make python 2&3 cherrypy3 co-installable: mv debian/python3-cherrypy3/usr/bin/cherryd debian/python3-cherrypy3/usr/bin/cherryd3 # Only install the tutorial in the -doc package: rm -r debian/python*-cherrypy3/usr/lib/python*/dist-packages/cherrypy/tutorial # Don't install the tests: rm -r debian/python*-cherrypy3/usr/lib/python*/dist-packages/cherrypy/test override_dh_compress: dh_compress -X.py -X.pdf override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) http_proxy='http://127.0.0.1:9/' PYTHONPATH=. /usr/share/sphinx/scripts/python3/sphinx-build -N -q -E -b html docs/ debian/python-cherrypy3-doc/usr/share/doc/python-cherrypy3-doc/html/ dh_sphinxdoc endif