3
PY3VERS = $(shell py3versions -rv)
4
DPKG_EXPORT_BUILDFLAGS = 1
5
include /usr/share/dpkg/buildflags.mk
9
dh $@ --with python2,python3
11
override_dh_auto_build:
13
set -e && for pyv in $(PY3VERS); do \
14
python$$pyvers setup.py build ; \
15
python$${pyv}-dbg setup.py build ; \
5
18
override_dh_auto_clean:
7
find zmq -name '*.c' -delete
21
find zmq -name '*.c' -delete; \
22
find zmq -name '*.so' -delete; \
25
find $(CURDIR) -name "*.pyc" -delete
9
29
override_dh_install:
10
30
# Install everything excluding the *_d.so debug extensions to python-zmq
11
dh_install -X"*_d.so" "debian/tmp/*" -p python-zmq
31
dh_install -X"*_d.so" "debian/tmp/usr/lib/python2.*" -p python-zmq
13
33
# Install the debug extensions to python-zmq-dbg
14
dh_install "usr/lib/python*/*-packages/zmq/*/*_d.so" -p python-zmq-dbg
34
dh_install "usr/lib/python2.*/*-packages/zmq/*/*_d.so" -p python-zmq-dbg
36
# Install python3 files
37
set -e && for pyv in $(PY3VERS); do \
38
python$$pyv setup.py install --install-layout=deb \
39
--force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq; \
40
python$${pyv}-dbg setup.py install --install-layout=deb \
41
--force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq-dbg; \
43
# remove a couple of header files already in python3-zmq
44
find debian/python3-zmq-dbg/usr/lib/ ! -type d ! -name '*.so' -delete
16
47
# Continue with regular dh_install
19
50
override_dh_auto_test:
20
# Almost all tests are broken because OpenPGM doesn't seem to be initialized
21
# correctly or there is not support for OpenPGM in libzmq0. I don't know if
22
# #566126 have something to do with this, anyway the affected tests are:
23
# zmq/tests/test_context.py
24
# zmq/tests/test_pair.py
25
# zmq/tests/test_poll.py
26
# zmq/tests/test_pubsub.py
27
# zmq/tests/test_reqrep.py
28
# zmq/tests/test_socket.py
29
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
30
# for python in $(shell pyversions -r); do \
31
# $$python setup.py test; \
32
# $$python-dbg setup.py test; \
51
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
53
for python in $(shell pyversions -r); do \
54
for build in \ -dbg; do \
55
find zmq -name '*.so' -delete; \
56
$$python$$build setup.py build_ext --inplace; \
57
$$python$$build setup.py test; \
61
for python in $(PY3VERS); do \
62
for build in \ -dbg; do \
63
find zmq -name '*.so' -delete; \
64
python$$python$$build setup.py build_ext --inplace; \
65
python$$python$$build setup.py test; \
37
71
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
38
dh_strip --dbg-package=python-zmq-dbg
39
find debian/python-zmq-dbg/usr/lib/debug -name '*_d.so' -delete
72
dh_strip -Xpython3 --dbg-package=python-zmq-dbg
73
dh_strip -X"python2.*" --dbg-package=python3-zmq-dbg