python-pyzmq: fix build with Cython 0.24

This commit is contained in:
Alessio Sergi 2016-06-30 12:42:24 +02:00
parent 848dfcdaa4
commit 4217a79121
2 changed files with 35 additions and 5 deletions

View File

@ -0,0 +1,33 @@
From 659f9211aad1565543e26ef6877456d017c9d5bb Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Tue, 8 Mar 2016 09:17:05 +0100
Subject: [PATCH] remove unused, deprecated `_handle`
Cython 0.24 may not support property assignment
---
zmq/backend/cython/context.pyx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git zmq/backend/cython/context.pyx zmq/backend/cython/context.pyx
index 2cb7409..3595c10 100644
--- zmq/backend/cython/context.pyx
+++ zmq/backend/cython/context.pyx
@@ -108,16 +108,12 @@ cdef class Context:
if self._n_sockets:
# move last handle to closed socket's index
self._sockets[idx] = self._sockets[self._n_sockets]
-
-
+
@property
def underlying(self):
"""The address of the underlying libzmq context"""
return <size_t> self.handle
-
- # backward-compat, though nobody is using it
- _handle = underlying
-
+
cdef inline int _term(self):
cdef int rc=0
if self.handle != NULL and not self.closed and getpid() == self._pid:

View File

@ -1,15 +1,15 @@
# Template file for 'python-pyzmq'
pkgname=python-pyzmq
version=15.2.0
revision=1
revision=2
wrksrc="pyzmq-${version}"
build_style=python-module
make_build_args="--zmq=${XBPS_CROSS_BASE}/usr"
python_versions="2.7 3.4"
pycompile_module="zmq"
hostmakedepends="pkg-config python-devel python3.4-devel python-Cython
python3.4-Cython zeromq-devel"
makedepends="${hostmakedepends/pkg-config/}"
pycompile_module="zmq"
short_desc="Python2 bindings for the ZeroMQ messaging library"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/zeromq/pyzmq"
@ -22,9 +22,6 @@ pre_build() {
[global]
skip_check_zmq = True
EOF
# remove shebangs
find zmq/eventloop/minitornado -type f -name '*.py' -exec sed -i '/^#!.*python$/d' {} +
}
python3.4-pyzmq_package() {