#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export SHELL = /bin/bash DOCDIR:=$(CURDIR)/debian/python-gevent-doc/usr/share/doc/python-gevent-doc export GEVENTSETUP_EMBED_CARES = 0 export GEVENTSETUP_EMBED_LIBEV = 0 export GEVENTSETUP_EMBED_LIBUV = 0 %: dh $@ --buildsystem=pybuild ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) execute_after_dh_auto_build: PYTHONPATH=../src/ make --directory docs/ html SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build endif execute_after_auto_clean: rm -f $(CURDIR)/deps/c-ares/Makefile \ $(CURDIR)/deps/c-ares/ares_build.h \ $(CURDIR)/deps/c-ares/ares_config.h \ $(CURDIR)/deps/c-ares/libcares.pc \ $(CURDIR)/deps/c-ares/stamp-h1 \ $(CURDIR)/deps/c-ares/stamp-h2 rm -f $(CURDIR)/deps/libev/Makefile \ $(CURDIR)/deps/libev/libtool \ $(CURDIR)/deps/libev/stamp-h1 rm -f $(CURDIR)/src/gevent/_abstract_linkable.c \ $(CURDIR)/src/gevent/_greenlet_primitives.c \ $(CURDIR)/src/gevent/_hub_local.c \ $(CURDIR)/src/gevent/_hub_primitives.c \ $(CURDIR)/src/gevent/_ident.c \ $(CURDIR)/src/gevent/_imap.c \ $(CURDIR)/src/gevent/_tracer.c \ $(CURDIR)/src/gevent/_waiter.c \ $(CURDIR)/src/gevent/event.c \ $(CURDIR)/src/gevent/greenlet.c \ $(CURDIR)/src/gevent/queue.c rm -rf $(CURDIR)/src/gevent.egg-info/ rm -f $(CURDIR)/src/gevent/*.html \ $(CURDIR)/src/gevent/libev/corecext.html \ $(CURDIR)/src/gevent/resolver/cares.html execute_after_dh_auto_install-arch: # Share the stable-ABI extensions built for the oldest supported Python. # dh_python3 adds the multiarch suffix after merging the versioned paths. set -e; \ versions=($$(py3versions -s | tr ' ' '\n' | sort -V)); \ for backend in libev libuv; do \ files=(debian/tmp/usr/lib/$${versions[0]}/dist-packages/gevent/$$backend/_corecffi.abi3*.so); \ test "$${#files[@]}" -eq 1; test -f "$${files[0]}"; \ for version in "$${versions[@]:1}"; do \ rm -f debian/tmp/usr/lib/$$version/dist-packages/gevent/$$backend/_corecffi.abi3*.so; \ done; \ done execute_after_dh_install-arch: : # remove the compat stuff for 2/3 rm -v -f debian/python3-gevent/usr/lib/python3*/dist-packages/gevent/_{util_py,ssl,fileobject,socket}2* # remove debug files from main package find debian/python3-gevent -name '*.cpython-3?d*-*.so' -delete override_dh_compress: dh_compress -X.js -X_static/* -X _sources/* -X_sources/*/* -X.inv override_dh_auto_test: # dont fail (for now), until https://github.com/gevent/gevent/issues/1833 is addressed # CPython tracemalloc is incompatible with subinterpreters (gh-134604). -http_proxy= https_proxy= PYTHONTRACEMALLOC=0 PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} {interpreter} -m gevent.tests -u-network --verbose --debug" dh_auto_test ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) execute_after_dh_installdocs-indep: # remove privacy tracking links sed -i 's|https://www.paypal.com/.*.gif||' \ $(DOCDIR)/html/sfc.html sed -i 's|"https://travis-ci.org/.*"|""|' \ $(DOCDIR)/html/install.html sed -i 's|"https://coveralls.io/.*"|""|' \ $(DOCDIR)/html/install.html sed -i 's|"https://ci.appveyor.com/.*"|""|' \ $(DOCDIR)/html/install.html endif ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) execute_after_dh_installexamples-indep: # remove privacy tracking links sed -i 's|http.*/jquery.min.js|file://usr/share/javascript/jquery/jquery.min.js|' \ $(DOCDIR)/examples/webchat/templates/index.html endif override_dh_missing: dh_missing --fail-missing -X.c -X.h -X.pxd -X.pyc -X.pyx