python-pyzmq: update to 26.2.0
This commit is contained in:
committed by
مهدي شينون (Mehdi Chinoune)
parent
8c11deb554
commit
a15e237ed5
@@ -1,39 +0,0 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 049771d..619588c 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -30,6 +30,7 @@
|
||||
from subprocess import PIPE, CalledProcessError, Popen, check_call
|
||||
from sysconfig import get_config_var
|
||||
from traceback import print_exc
|
||||
+from sysconfig import _POSIX_BUILD
|
||||
|
||||
from packaging.version import Version as V
|
||||
from setuptools import Command, setup
|
||||
@@ -152,7 +153,7 @@
|
||||
# is this necessary?
|
||||
if sys.platform.startswith('freebsd'):
|
||||
settings['libraries'].append('pthread')
|
||||
- elif sys.platform.startswith('win'):
|
||||
+ elif sys.platform.startswith('win') and not _POSIX_BUILD:
|
||||
# link against libzmq in build dir:
|
||||
if sys.version_info < (3, 9, 2):
|
||||
# bpo-39825: EXT_SUFFIX is wrong from sysconfig prior to 3.9.2 / 3.8.7
|
||||
@@ -513,7 +514,7 @@
|
||||
)
|
||||
line()
|
||||
|
||||
- if sys.platform.startswith('win'):
|
||||
+ if sys.platform.startswith('win') and not _POSIX_BUILD:
|
||||
# fetch libzmq.dll into local dir
|
||||
local_dll = localpath('zmq', libzmq_name + '.dll')
|
||||
if not zmq_prefix and not os.path.exists(local_dll):
|
||||
@@ -609,7 +610,7 @@
|
||||
libzmq.define_macros.append(('ZMQ_IOTHREADS_USE_POLL', 1))
|
||||
libzmq.define_macros.append(('ZMQ_POLL_BASED_ON_POLL', 1))
|
||||
|
||||
- if sys.platform.startswith('win'):
|
||||
+ if sys.platform.startswith('win') and not _POSIX_BUILD:
|
||||
# include defines from zeromq msvc project:
|
||||
libzmq.define_macros.append(('FD_SETSIZE', 16384))
|
||||
libzmq.define_macros.append(('DLL_EXPORT', 1))
|
||||
@@ -3,60 +3,46 @@
|
||||
_realname=pyzmq
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=25.1.2
|
||||
pkgrel=3
|
||||
pkgver=26.2.0
|
||||
pkgrel=1
|
||||
pkgdesc="Python bindings for zeromq, written in Cython (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url="https://www.zeromq.org/languages/python"
|
||||
msys2_repository_url="https://github.com/zeromq/pyzmq"
|
||||
msys2_references=(
|
||||
'pypi: pyzmq'
|
||||
)
|
||||
license=('spdx:LGPL-3.0-or-later' 'spdx:BSD-3-Clause')
|
||||
license=('spdx:BSD-3-Clause')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-zeromq")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-scikit-build-core"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-packaging"
|
||||
"${MINGW_PACKAGE_PREFIX}-cython"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("https://github.com/zeromq/${_realname}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
|
||||
"001-mingw-python.patch"
|
||||
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz"
|
||||
"002-mingw-win-compat.patch")
|
||||
sha256sums=('4df6361aa20dad1572ef83b441d0ef43125e86e139b30e215cad95883166ee4d'
|
||||
'47d65c3cc3d0f79c49f75afa0013b1b512484ad63534453248810607bfeceabf'
|
||||
sha256sums=('070672c258581c8e4f640b5159297580a9974b026043bd4ab0470be9ed324f1f'
|
||||
'c2e01fbdb3fc7c9eda0b5be128027536c6338b349eb1550da6067b3bde2acd3b')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i ${srcdir}/001-mingw-python.patch
|
||||
patch -p1 -i ${srcdir}/002-mingw-win-compat.patch
|
||||
|
||||
cd "${srcdir}"
|
||||
rm -rf python-build-${MSYSTEM} | true
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
${MINGW_PREFIX}/bin/python setup.py build --zmq=${MINGW_PREFIX}
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
||||
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
|
||||
sed -i 's|except socket.error, e:|except socket.error as e:|' zmq/eventloop/ioloop.py
|
||||
sed -i 's|except gevent.Timeout, t:|except gevent.Timeout as t:|' zmq/green/core.py
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python setup.py install \
|
||||
--prefix=${MINGW_PREFIX} --root=${pkgdir} --optimize=1 --skip-build
|
||||
|
||||
find "${pkgdir}/" -type d -empty -delete
|
||||
|
||||
rm -rf build
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/*.whl
|
||||
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
# fix absolute paths in config files
|
||||
|
||||
Reference in New Issue
Block a user