File: rules

package info (click to toggle)
python-gevent 20.9.0-2
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 21,000 kB
  • sloc: python: 158,152; ansic: 72,855; sh: 5,235; makefile: 1,574; javascript: 108; awk: 18
file content (97 lines) | stat: -rwxr-xr-x 3,258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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  $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=../src/ make --directory docs/ html SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build

override_dh_auto_clean:
	dh_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

override_dh_install:
	dh_install -O--parallel -O--buildsystem=pybuild
	: # 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'| xargs -r rm -f

override_dh_compress:
	dh_compress -X.js -X_static/* -X _sources/* -X_sources/*/* -X.inv

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip -p python3-gevent --dbg-package=python3-gevent-dbg
endif

# TODO: check for failures, but disable for now
override_dh_auto_test:
#	chmod +x $(CURDIR)/src/greentest/testrunner.py
#	cd $(CURDIR)/src/greentest && PYTHONPATH=../.. ./testrunner.py

override_dh_installdocs-arch:
	dh_installdocs -ppython3-gevent-dbg --link-doc=python3-gevent
	dh_installdocs -a

override_dh_installdocs-indep:
	dh_installdocs -i
	# 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

override_dh_installexamples-indep:
	dh_installexamples -i
	# 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

override_dh_missing:
	dh_missing --list-missing -X.c -X.h -X.pxd -X.pyc -X.pyx

.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_install \
	override_dh_compress override_dh_strip override_dh_auto_test \
	override_dh_installdocs-arch override_dh_installdocs-indep \
	override_dh_installexamples-indep override_dh_missing