#!/usr/bin/make -f LIB2 := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") LIB3 := $(shell python3 -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") %: dh $@ --with python2,python3,sphinxdoc override_dh_auto_build: dh_auto_build $(MAKE) -C docs html override_dh_auto_install: python setup.py install --root=debian/python-requests-cache --install-layout=deb python3 setup.py install --root=debian/python3-requests-cache --install-layout=deb #override_dh_auto_test: #ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) # # we can't use unittest discover -s tests as tests for redis/mongo are # # trying to use the system-installed redis/mongo instance, which is unsafe # sleep 10 # PYTHONPATH=$$LIB2:tests python -m unittest -v test_cache test_custom_dict test_dbdict test_monkey_patch test_thread_safety # PYTHONPATH=$$LIB3:tests python3 -m unittest -v test_cache test_custom_dict test_dbdict test_monkey_patch test_thread_safety #endif override_dh_installexamples: dh_installexamples -ppython-requests-cache-doc example.py sandbox.py override_dh_installdocs: dh_installdocs -ppython-requests-cache-doc docs/_build/html dh_installdocs -A README.rst override_dh_installchangelogs: dh_installchangelogs -A HISTORY.rst