summaryrefslogtreecommitdiffstats
path: root/external_libs/python/zmq/backend/cython
diff options
context:
space:
mode:
Diffstat (limited to 'external_libs/python/zmq/backend/cython')
-rw-r--r--external_libs/python/zmq/backend/cython/__init__.py23
-rw-r--r--external_libs/python/zmq/backend/cython/_device.py7
-rw-r--r--external_libs/python/zmq/backend/cython/_poll.py7
-rw-r--r--external_libs/python/zmq/backend/cython/_version.py7
-rw-r--r--external_libs/python/zmq/backend/cython/checkrc.pxd23
-rw-r--r--external_libs/python/zmq/backend/cython/constants.py7
-rw-r--r--external_libs/python/zmq/backend/cython/context.pxd41
-rw-r--r--external_libs/python/zmq/backend/cython/context.py7
-rw-r--r--external_libs/python/zmq/backend/cython/error.py7
-rw-r--r--external_libs/python/zmq/backend/cython/libzmq.pxd110
-rw-r--r--external_libs/python/zmq/backend/cython/message.pxd63
-rw-r--r--external_libs/python/zmq/backend/cython/message.py7
-rw-r--r--external_libs/python/zmq/backend/cython/socket.pxd47
-rw-r--r--external_libs/python/zmq/backend/cython/socket.py7
-rw-r--r--external_libs/python/zmq/backend/cython/utils.pxd29
-rw-r--r--external_libs/python/zmq/backend/cython/utils.py7
16 files changed, 0 insertions, 399 deletions
diff --git a/external_libs/python/zmq/backend/cython/__init__.py b/external_libs/python/zmq/backend/cython/__init__.py
deleted file mode 100644
index e5358185..00000000
--- a/external_libs/python/zmq/backend/cython/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-"""Python bindings for core 0MQ objects."""
-
-# Copyright (C) PyZMQ Developers
-# Distributed under the terms of the Lesser GNU Public License (LGPL).
-
-from . import (constants, error, message, context,
- socket, utils, _poll, _version, _device )
-
-__all__ = []
-for submod in (constants, error, message, context,
- socket, utils, _poll, _version, _device):
- __all__.extend(submod.__all__)
-
-from .constants import *
-from .error import *
-from .message import *
-from .context import *
-from .socket import *
-from ._poll import *
-from .utils import *
-from ._device import *
-from ._version import *
-
diff --git a/external_libs/python/zmq/backend/cython/_device.py b/external_libs/python/zmq/backend/cython/_device.py
deleted file mode 100644
index 3368ca2c..00000000
--- a/external_libs/python/zmq/backend/cython/_device.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'_device.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/_poll.py b/external_libs/python/zmq/backend/cython/_poll.py
deleted file mode 100644
index cb1d5d77..00000000
--- a/external_libs/python/zmq/backend/cython/_poll.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'_poll.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/_version.py b/external_libs/python/zmq/backend/cython/_version.py
deleted file mode 100644
index 08262706..00000000
--- a/external_libs/python/zmq/backend/cython/_version.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'_version.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/checkrc.pxd b/external_libs/python/zmq/backend/cython/checkrc.pxd
deleted file mode 100644
index 3bf69fc3..00000000
--- a/external_libs/python/zmq/backend/cython/checkrc.pxd
+++ /dev/null
@@ -1,23 +0,0 @@
-from libc.errno cimport EINTR, EAGAIN
-from cpython cimport PyErr_CheckSignals
-from libzmq cimport zmq_errno, ZMQ_ETERM
-
-cdef inline int _check_rc(int rc) except -1:
- """internal utility for checking zmq return condition
-
- and raising the appropriate Exception class
- """
- cdef int errno = zmq_errno()
- PyErr_CheckSignals()
- if rc < 0:
- if errno == EAGAIN:
- from zmq.error import Again
- raise Again(errno)
- elif errno == ZMQ_ETERM:
- from zmq.error import ContextTerminated
- raise ContextTerminated(errno)
- else:
- from zmq.error import ZMQError
- raise ZMQError(errno)
- # return -1
- return 0
diff --git a/external_libs/python/zmq/backend/cython/constants.py b/external_libs/python/zmq/backend/cython/constants.py
deleted file mode 100644
index ea772ac0..00000000
--- a/external_libs/python/zmq/backend/cython/constants.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'constants.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/context.pxd b/external_libs/python/zmq/backend/cython/context.pxd
deleted file mode 100644
index 9c9267a5..00000000
--- a/external_libs/python/zmq/backend/cython/context.pxd
+++ /dev/null
@@ -1,41 +0,0 @@
-"""0MQ Context class declaration."""
-
-#
-# Copyright (c) 2010-2011 Brian E. Granger & Min Ragan-Kelley
-#
-# This file is part of pyzmq.
-#
-# pyzmq is free software; you can redistribute it and/or modify it under
-# the terms of the Lesser GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# pyzmq is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# Lesser GNU General Public License for more details.
-#
-# You should have received a copy of the Lesser GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-#-----------------------------------------------------------------------------
-# Code
-#-----------------------------------------------------------------------------
-
-cdef class Context:
-
- cdef object __weakref__ # enable weakref
- cdef void *handle # The C handle for the underlying zmq object.
- cdef bint _shadow # whether the Context is a shadow wrapper of another
- cdef void **_sockets # A C-array containg socket handles
- cdef size_t _n_sockets # the number of sockets
- cdef size_t _max_sockets # the size of the _sockets array
- cdef int _pid # the pid of the process which created me (for fork safety)
-
- cdef public bint closed # bool property for a closed context.
- cdef inline int _term(self)
- # helpers for events on _sockets in Socket.__cinit__()/close()
- cdef inline void _add_socket(self, void* handle)
- cdef inline void _remove_socket(self, void* handle)
-
diff --git a/external_libs/python/zmq/backend/cython/context.py b/external_libs/python/zmq/backend/cython/context.py
deleted file mode 100644
index 19f8ec7c..00000000
--- a/external_libs/python/zmq/backend/cython/context.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'context.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/error.py b/external_libs/python/zmq/backend/cython/error.py
deleted file mode 100644
index d3a4ea0e..00000000
--- a/external_libs/python/zmq/backend/cython/error.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'error.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/libzmq.pxd b/external_libs/python/zmq/backend/cython/libzmq.pxd
deleted file mode 100644
index e42f6d6b..00000000
--- a/external_libs/python/zmq/backend/cython/libzmq.pxd
+++ /dev/null
@@ -1,110 +0,0 @@
-"""All the C imports for 0MQ"""
-
-#
-# Copyright (c) 2010 Brian E. Granger & Min Ragan-Kelley
-#
-# This file is part of pyzmq.
-#
-# pyzmq is free software; you can redistribute it and/or modify it under
-# the terms of the Lesser GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# pyzmq is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# Lesser GNU General Public License for more details.
-#
-# You should have received a copy of the Lesser GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-#-----------------------------------------------------------------------------
-# Imports
-#-----------------------------------------------------------------------------
-
-#-----------------------------------------------------------------------------
-# Import the C header files
-#-----------------------------------------------------------------------------
-
-cdef extern from *:
- ctypedef void* const_void_ptr "const void *"
- ctypedef char* const_char_ptr "const char *"
-
-cdef extern from "zmq_compat.h":
- ctypedef signed long long int64_t "pyzmq_int64_t"
-
-include "constant_enums.pxi"
-
-cdef extern from "zmq.h" nogil:
-
- void _zmq_version "zmq_version"(int *major, int *minor, int *patch)
-
- ctypedef int fd_t "ZMQ_FD_T"
-
- enum: errno
- char *zmq_strerror (int errnum)
- int zmq_errno()
-
- void *zmq_ctx_new ()
- int zmq_ctx_destroy (void *context)
- int zmq_ctx_set (void *context, int option, int optval)
- int zmq_ctx_get (void *context, int option)
- void *zmq_init (int io_threads)
- int zmq_term (void *context)
-
- # blackbox def for zmq_msg_t
- ctypedef void * zmq_msg_t "zmq_msg_t"
-
- ctypedef void zmq_free_fn(void *data, void *hint)
-
- int zmq_msg_init (zmq_msg_t *msg)
- int zmq_msg_init_size (zmq_msg_t *msg, size_t size)
- int zmq_msg_init_data (zmq_msg_t *msg, void *data,
- size_t size, zmq_free_fn *ffn, void *hint)
- int zmq_msg_send (zmq_msg_t *msg, void *s, int flags)
- int zmq_msg_recv (zmq_msg_t *msg, void *s, int flags)
- int zmq_msg_close (zmq_msg_t *msg)
- int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src)
- int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src)
- void *zmq_msg_data (zmq_msg_t *msg)
- size_t zmq_msg_size (zmq_msg_t *msg)
- int zmq_msg_more (zmq_msg_t *msg)
- int zmq_msg_get (zmq_msg_t *msg, int option)
- int zmq_msg_set (zmq_msg_t *msg, int option, int optval)
- const_char_ptr zmq_msg_gets (zmq_msg_t *msg, const_char_ptr property)
- int zmq_has (const_char_ptr capability)
-
- void *zmq_socket (void *context, int type)
- int zmq_close (void *s)
- int zmq_setsockopt (void *s, int option, void *optval, size_t optvallen)
- int zmq_getsockopt (void *s, int option, void *optval, size_t *optvallen)
- int zmq_bind (void *s, char *addr)
- int zmq_connect (void *s, char *addr)
- int zmq_unbind (void *s, char *addr)
- int zmq_disconnect (void *s, char *addr)
-
- int zmq_socket_monitor (void *s, char *addr, int flags)
-
- # send/recv
- int zmq_sendbuf (void *s, const_void_ptr buf, size_t n, int flags)
- int zmq_recvbuf (void *s, void *buf, size_t n, int flags)
-
- ctypedef struct zmq_pollitem_t:
- void *socket
- int fd
- short events
- short revents
-
- int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout)
-
- int zmq_device (int device_, void *insocket_, void *outsocket_)
- int zmq_proxy (void *frontend, void *backend, void *capture)
-
-cdef extern from "zmq_utils.h" nogil:
-
- void *zmq_stopwatch_start ()
- unsigned long zmq_stopwatch_stop (void *watch_)
- void zmq_sleep (int seconds_)
- int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key)
-
diff --git a/external_libs/python/zmq/backend/cython/message.pxd b/external_libs/python/zmq/backend/cython/message.pxd
deleted file mode 100644
index 4781195f..00000000
--- a/external_libs/python/zmq/backend/cython/message.pxd
+++ /dev/null
@@ -1,63 +0,0 @@
-"""0MQ Message related class declarations."""
-
-#
-# Copyright (c) 2010-2011 Brian E. Granger & Min Ragan-Kelley
-#
-# This file is part of pyzmq.
-#
-# pyzmq is free software; you can redistribute it and/or modify it under
-# the terms of the Lesser GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# pyzmq is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# Lesser GNU General Public License for more details.
-#
-# You should have received a copy of the Lesser GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-#-----------------------------------------------------------------------------
-# Imports
-#-----------------------------------------------------------------------------
-
-from cpython cimport PyBytes_FromStringAndSize
-
-from libzmq cimport zmq_msg_t, zmq_msg_data, zmq_msg_size
-
-#-----------------------------------------------------------------------------
-# Code
-#-----------------------------------------------------------------------------
-
-cdef class MessageTracker(object):
-
- cdef set events # Message Event objects to track.
- cdef set peers # Other Message or MessageTracker objects.
-
-
-cdef class Frame:
-
- cdef zmq_msg_t zmq_msg
- cdef object _data # The actual message data as a Python object.
- cdef object _buffer # A Python Buffer/View of the message contents
- cdef object _bytes # A bytes/str copy of the message.
- cdef bint _failed_init # Flag to handle failed zmq_msg_init
- cdef public object tracker_event # Event for use with zmq_free_fn.
- cdef public object tracker # MessageTracker object.
- cdef public bint more # whether RCVMORE was set
-
- cdef Frame fast_copy(self) # Create shallow copy of Message object.
- cdef object _getbuffer(self) # Construct self._buffer.
-
-
-cdef inline object copy_zmq_msg_bytes(zmq_msg_t *zmq_msg):
- """ Copy the data from a zmq_msg_t """
- cdef char *data_c = NULL
- cdef Py_ssize_t data_len_c
- data_c = <char *>zmq_msg_data(zmq_msg)
- data_len_c = zmq_msg_size(zmq_msg)
- return PyBytes_FromStringAndSize(data_c, data_len_c)
-
-
diff --git a/external_libs/python/zmq/backend/cython/message.py b/external_libs/python/zmq/backend/cython/message.py
deleted file mode 100644
index 5e423b62..00000000
--- a/external_libs/python/zmq/backend/cython/message.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'message.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/socket.pxd b/external_libs/python/zmq/backend/cython/socket.pxd
deleted file mode 100644
index b8a331e2..00000000
--- a/external_libs/python/zmq/backend/cython/socket.pxd
+++ /dev/null
@@ -1,47 +0,0 @@
-"""0MQ Socket class declaration."""
-
-#
-# Copyright (c) 2010-2011 Brian E. Granger & Min Ragan-Kelley
-#
-# This file is part of pyzmq.
-#
-# pyzmq is free software; you can redistribute it and/or modify it under
-# the terms of the Lesser GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# pyzmq is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# Lesser GNU General Public License for more details.
-#
-# You should have received a copy of the Lesser GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-#-----------------------------------------------------------------------------
-# Imports
-#-----------------------------------------------------------------------------
-
-from context cimport Context
-
-#-----------------------------------------------------------------------------
-# Code
-#-----------------------------------------------------------------------------
-
-
-cdef class Socket:
-
- cdef object __weakref__ # enable weakref
- cdef void *handle # The C handle for the underlying zmq object.
- cdef bint _shadow # whether the Socket is a shadow wrapper of another
- # Hold on to a reference to the context to make sure it is not garbage
- # collected until the socket it done with it.
- cdef public Context context # The zmq Context object that owns this.
- cdef public bint _closed # bool property for a closed socket.
- cdef int _pid # the pid of the process which created me (for fork safety)
-
- # cpdef methods for direct-cython access:
- cpdef object send(self, object data, int flags=*, copy=*, track=*)
- cpdef object recv(self, int flags=*, copy=*, track=*)
-
diff --git a/external_libs/python/zmq/backend/cython/socket.py b/external_libs/python/zmq/backend/cython/socket.py
deleted file mode 100644
index faef8bee..00000000
--- a/external_libs/python/zmq/backend/cython/socket.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'socket.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()
diff --git a/external_libs/python/zmq/backend/cython/utils.pxd b/external_libs/python/zmq/backend/cython/utils.pxd
deleted file mode 100644
index 1d7117f1..00000000
--- a/external_libs/python/zmq/backend/cython/utils.pxd
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Wrap zmq_utils.h"""
-
-#
-# Copyright (c) 2010 Brian E. Granger & Min Ragan-Kelley
-#
-# This file is part of pyzmq.
-#
-# pyzmq is free software; you can redistribute it and/or modify it under
-# the terms of the Lesser GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# pyzmq is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# Lesser GNU General Public License for more details.
-#
-# You should have received a copy of the Lesser GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-#-----------------------------------------------------------------------------
-# Code
-#-----------------------------------------------------------------------------
-
-
-cdef class Stopwatch:
- cdef void *watch # The C handle for the underlying zmq object
-
diff --git a/external_libs/python/zmq/backend/cython/utils.py b/external_libs/python/zmq/backend/cython/utils.py
deleted file mode 100644
index fe928300..00000000
--- a/external_libs/python/zmq/backend/cython/utils.py
+++ /dev/null
@@ -1,7 +0,0 @@
-def __bootstrap__():
- global __bootstrap__, __loader__, __file__
- import sys, pkg_resources, imp
- __file__ = pkg_resources.resource_filename(__name__,'utils.so')
- __loader__ = None; del __bootstrap__, __loader__
- imp.load_dynamic(__name__,__file__)
-__bootstrap__()