#!/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 override_dh_auto_build: python setup.py build python3 setup.py build override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) # tests/ dir is not copied, so we do that, else we cant run the tests in the build dir cp -r $(CURDIR)/tqdm/tests/ $(CURDIR)/$(LIB2)/tqdm/ # run perf tests in a separate, non-failing, line nosetests --verbose -Itests_perf.py $(LIB2)/tqdm/ -nosetests --verbose $(LIB2)/tqdm/tests/tests_perf.py rm -rf $(CURDIR)/$(LIB2)/tqdm/tests/ cp -r $(CURDIR)/tqdm/tests/ $(CURDIR)/$(LIB3)/tqdm/ # run perf tests in a separate, non-failing, line nosetests3 --verbose -Itests_perf.py $(LIB3)/tqdm/ -nosetests3 --verbose $(LIB3)/tqdm/tests/tests_perf.py rm -rf $(CURDIR)/$(LIB3)/tqdm/tests/ endif override_dh_auto_install: python setup.py install --root=debian/python-tqdm --install-layout=deb python3 setup.py install --root=debian/python3-tqdm --install-layout=deb # cli tools and manpage re provided only by the py3k package rm -rf $(CURDIR)/debian/python-tqdm/usr/bin rm -rf $(CURDIR)/debian/*/usr/man override_dh_installman: dh_installman -ppython3-tqdm tqdm/tqdm.1 override_dh_installdocs: dh_installdocs -A CONTRIBUTING.md README.rst override_dh_installexamples: dh_installexamples -A examples/* override_dh_compress: dh_compress -X.py