Commit 6fa986b9 authored by Julian Taylor's avatar Julian Taylor

pypy support

* build with pybuild, requires b-d on python3 >= 3.3.0-2
* add pypy-zmq package built with cffi
* clean-all.patch: add -a option to setup.py clean
parent 22d224cd
pyzmq (13.1.0-2) UNRELEASED; urgency=low
* provide pypy-zmq package
* bump cython build depend version to required >= 0.16 (Closes: #721711)
* run nose with zmq.tests to avoid autopkgtest issues if optional
dependencies are missing
......
......@@ -9,11 +9,13 @@ Build-Depends: cython (>= 0.16),
debhelper (>= 8.1~),
dpkg-dev (>= 1.16.1~),
libzmq3-dev,
pypy (>= 2.0.0),
python-all-dbg (>= 2.6.6-3~),
python-all-dev (>= 2.6.6-3~),
python-nose,
python-numpy,
python-setuptools,
python3 (>= 3.3.0-2),
python3-all-dbg (>= 3.2),
python3-all-dev (>= 3.2)
Standards-Version: 3.9.4
......@@ -105,3 +107,21 @@ Description: Python3 bindings for 0MQ library - debugging files
transport protocols and more.
.
This package contains the extension built for the Python3 debug interpreter.
Package: pypy-zmq
Architecture: any
Depends: pypy (>= 2.0.0), ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
Description: PyPy bindings for 0MQ library
Python bindings for 0MQ. 0MQ is a small, fast, and free
software library that gives you message-passing concurrency
for applications in most common languages.
.
The 0MQ lightweight messaging kernel is a library which
extends the standard socket interfaces with features
traditionally provided by specialised messaging middleware
products. 0MQ sockets provide an abstraction of asynchronous
message queues, multiple messaging patterns, message
filtering (subscriptions), seamless access to multiple
transport protocols and more.
.
This package contains the extension built for the PyPy interpreter.
Description: support clean -a required by dh_auto_clean
also clean up pyc in buildutils
Author: Julian Taylor <jtaylor.debian@googlemail.com>
Forwarded: not-needed
--- a/setup.py
+++ b/setup.py
@@ -716,16 +716,34 @@ class GitRevisionCommand(Command):
class CleanCommand(Command):
"""Custom distutils command to clean the .so and .pyc files."""
+ user_options = [('all', 'a',
+ "remove all build output, not just temporary by-products")
+ ]
- user_options = [ ]
+ boolean_options = ['all']
def initialize_options(self):
+ self.all = None
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
self._clean_me = []
- self._clean_trees = []
+ self._clean_trees = []
+ for root, dirs, files in list(os.walk('buildutils')):
+ for f in files:
+ if os.path.splitext(f)[-1] == '.pyc':
+ self._clean_me.append(pjoin(root, f))
+
for root, dirs, files in list(os.walk('zmq')):
for f in files:
if os.path.splitext(f)[-1] in ('.pyc', '.so', '.o', '.pyd'):
self._clean_me.append(pjoin(root, f))
+ # remove generated cython files
+ if self.all and os.path.splitext(f)[-1] == '.c':
+ self._clean_me.append(pjoin(root, f))
+
for d in dirs:
if d == '__pycache__':
self._clean_trees.append(pjoin(root, d))
@@ -736,13 +754,6 @@ class CleanCommand(Command):
bundled = glob(pjoin('zmq', 'libzmq*'))
self._clean_me.extend(bundled)
-
-
-
- def finalize_options(self):
- pass
-
- def run(self):
for clean_me in self._clean_me:
try:
os.unlink(clean_me)
workaround-gevent.patch
noncopysend-test.patch
clean-all.patch
#!/usr/bin/make -f
PY3VERS = $(shell py3versions -rv)
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
export PYBUILD_DESTDIR_python2=debian/python-zmq/
export PYBUILD_DESTDIR_python2-dbg=debian/python-zmq-dbg/
export PYBUILD_DESTDIR_python3=debian/python3-zmq/
export PYBUILD_DESTDIR_python3-dbg=debian/python3-zmq-dbg/
export PYBUILD_DESTDIR_pypy=debian/pypy-zmq/
export PYBUILD_OPTION=--verbose
export DH_VERBOSE=1
%:
dh $@ --with python2,python3
override_dh_auto_build:
dh_auto_build
set -e && for pyv in $(PY3VERS); do \
python$$pyvers setup.py build ; \
python$${pyv}-dbg setup.py build ; \
done
override_dh_auto_clean:
-dh_auto_clean
if [ -d zmq ]; then \
find zmq -name '*.c' -delete; \
find zmq -name '*.so' -delete; \
fi
rm -rf build
find $(CURDIR) -name "*.pyc" -delete
rm -f conf/*.pickle
rm -f conf/*.json
dh $@ --with python2,python3 --buildsystem=pybuild
override_dh_install:
# Install everything excluding the *_d.so debug extensions to python-zmq
dh_install -X"*_d.so" "debian/tmp/usr/lib/python2.*" -p python-zmq
# Install the debug extensions to python-zmq-dbg
dh_install "usr/lib/python2.*/*-packages/zmq/*/*_d.so" -p python-zmq-dbg
# Install python3 files
set -e && for pyv in $(PY3VERS); do \
python$$pyv setup.py install --install-layout=deb \
--force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq; \
python$${pyv}-dbg setup.py install --install-layout=deb \
--force --no-compile -O0 --root=$(CURDIR)/debian/python3-zmq-dbg; \
done
dh_install
# remove a couple of header files already in python3-zmq
find debian/python3-zmq-dbg/usr/lib/ ! -type d ! -name '*.so' -delete
# only for pypy
find debian/python-zmq-dbg/usr/lib/ ! -type d ! -name '*.so' -delete
# cffi is only used for pypy
rm -rf debian/python-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
rm -rf debian/python-dbg-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
rm -rf debian/python3-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
rm -rf debian/python3-dbg-zmq/usr/lib/python*/dist-packages/zmq/cffi_core/
# cython core is only used for cpython
rm -rf debian/pypy-zmq/usr/lib/python*/dist-packages/zmq/core/
# Continue with regular dh_install
dh_install
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-set -e; \
for python in $(shell pyversions -r); do \
for build in \ -dbg; do \
find zmq -name '*.so' -delete; \
$$python$$build setup.py build_ext --inplace; \
$$python$$build setup.py test; \
done; \
done
-set -e; \
for python in $(PY3VERS); do \
for build in \ -dbg; do \
find zmq -name '*.so' -delete; \
python$$python$$build setup.py build_ext --inplace; \
python$$python$$build setup.py test; \
done; \
done
endif
override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
dh_strip -Xpython3 --dbg-package=python-zmq-dbg
dh_strip -X"python2.*" --dbg-package=python3-zmq-dbg
endif
get-orig-source:
cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
uscan \
--verbose \
--rename \
--destdir $(CURDIR) \
--watchfile debian/watch \
--force-download
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment