#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk PYTHON3 := $(shell py3versions -sv) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) %: dh $@ --with python3 --buildsystem=pybuild override_dh_auto_clean: rm -rf build/ .pybuild/ rm -f greenlet.egg-info/PKG-INFO find . \( -type f -or -type l \) \( -name '*.py[co]' -or -name '*.so' -or -name '*.log' \) -delete cd doc && make clean build-python%: python$* setup.py build override_dh_auto_build: $(PYTHON3:%=build-python%) dh_auto_build cd doc && PYTHONPATH=.. make html SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build install-python%: python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb override_dh_auto_install: $(PYTHON3:%=install-python%) dh_auto_install if [ -d $(CURDIR)/debian/tmp/usr/include/python3.7/ ]; then \ mv $(CURDIR)/debian/tmp/usr/include/python3.7/ \ $(CURDIR)/debian/tmp/usr/include/python3.7m/ ; \ fi override_dh_install: dh_install # remove debug files from main package $(RM) $(CURDIR)/debian/python3-greenlet/usr/lib/python3*/*-packages/*.cpython-3?d*-*.so override_dh_auto_test: $(PYTHON3:%=test-%-stamp) test-%-stamp: ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) rm -rf build/test-$* mkdir build/test-$* python$* setup.py install_lib -d build/test-$* ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el)) -PYTHONPATH=build/test-$* python$* run-tests.py -n else PYTHONPATH=build/test-$* python$* run-tests.py -n endif endif touch test-python-$*-stamp override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -p python3-greenlet --dbg-package=python3-greenlet-dbg endif override_dh_compress: dh_compress -X.html .PHONY: override_dh_auto_clean override_dh_auto_build \ override_dh_auto_install override_dh_install override_dh_auto_test \ override_dh_strip override_dh_compress