diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2c67ccf14..7a0c66cd9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,45 +33,45 @@ jobs: fail-fast: true matrix: include: - - os: macos-13 - python: 3.7 - - - os: macos-13 - python: 3.11 - zmq: bundled - - - os: macos-13 - python: pypy-3.9 - zmq: bundled - - - os: ubuntu-20.04 - python: 3.7 - zmq: bundled - tornado: none - - - os: ubuntu-22.04 - python: pypy-3.9 - zmq: bundled - - - os: ubuntu-22.04 - python: pypy-3.7 - - - os: ubuntu-22.04 - python: 3.9 - tornado: head - - - os: ubuntu-22.04 - python: "3.10" - - - os: ubuntu-22.04 - python: "3.11" - - - os: ubuntu-22.04 - python: "3.8" - zmq: head - - - os: ubuntu-22.04 - python: "3.12" +# - os: macos-13 +# python: 3.7 +# +# - os: macos-13 +# python: 3.11 +# zmq: bundled +# +# - os: macos-13 +# python: pypy-3.9 +# zmq: bundled +# +# - os: ubuntu-20.04 +# python: 3.7 +# zmq: bundled +# tornado: none +# +# - os: ubuntu-22.04 +# python: pypy-3.9 +# zmq: bundled +# +# - os: ubuntu-22.04 +# python: pypy-3.7 +# +# - os: ubuntu-22.04 +# python: 3.9 +# tornado: head +# +# - os: ubuntu-22.04 +# python: "3.10" +# +# - os: ubuntu-22.04 +# python: "3.11" +# +# - os: ubuntu-22.04 +# python: "3.8" +# zmq: head +# +# - os: ubuntu-22.04 +# python: "3.12" - os: windows-2022 python: "3.7" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 31fa51df8..c3cb33b3f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -95,43 +95,43 @@ jobs: fail-fast: false matrix: include: - - os: macos-11 - name: mac-cpython - cibw: - build: "cp*" - - - os: macos-11 - name: mac-pypy - cibw: - build: "pp*" - - - os: macos-11 - name: mac-arm - cibw: - arch: universal2 - build: "cp*" - - - name: manylinux-x86_64 - cibw: - arch: x86_64 - build: "*manylinux*" - - - name: manylinux-i686 - cibw: - arch: i686 - build: "*manylinux*" - - # additional manylinux variants, not specified in pyproject.toml: - # build with newer 2_28 for cpython >= 3.10, pypy 3.9 - - name: manylinux-x86_64-2_28 - cibw: - arch: x86_64 - build: "cp31*-manylinux* pp39-manylinux*" - manylinux_x86_64_image: manylinux_2_28 - - - name: musllinux - cibw: - build: "*musllinux*" +# - os: macos-11 +# name: mac-cpython +# cibw: +# build: "cp*" +# +# - os: macos-11 +# name: mac-pypy +# cibw: +# build: "pp*" +# +# - os: macos-11 +# name: mac-arm +# cibw: +# arch: universal2 +# build: "cp*" +# +# - name: manylinux-x86_64 +# cibw: +# arch: x86_64 +# build: "*manylinux*" +# +# - name: manylinux-i686 +# cibw: +# arch: i686 +# build: "*manylinux*" +# +# # additional manylinux variants, not specified in pyproject.toml: +# # build with newer 2_28 for cpython >= 3.10, pypy 3.9 +# - name: manylinux-x86_64-2_28 +# cibw: +# arch: x86_64 +# build: "cp31*-manylinux* pp39-manylinux*" +# manylinux_x86_64_image: manylinux_2_28 +# +# - name: musllinux +# cibw: +# build: "*musllinux*" - name: win32 os: windows-2019 diff --git a/buildutils/bundle.py b/buildutils/bundle.py index 6ee4d9694..3a53996e2 100644 --- a/buildutils/bundle.py +++ b/buildutils/bundle.py @@ -11,7 +11,6 @@ import hashlib import os -import platform import shutil import sys import zipfile @@ -28,49 +27,19 @@ # Constants # ----------------------------------------------------------------------------- -bundled_version = (4, 3, 4) +bundled_version = (4, 3, 5) vs = '%i.%i.%i' % bundled_version x, y, z = bundled_version libzmq = "zeromq-%s.zip" % vs download_url = f"https://github.com/zeromq/libzmq/releases/download/v{vs}" libzmq_url = f"{download_url}/{libzmq}" -libzmq_checksum = ( - "sha256:622bf650f7dab6de098c84d491052ad5a6d3e57550cd09cc259e0ab24ec83ec3" -) +libzmq_checksum = "sha1:a8a8b800cbb3e13db0246473362d4d1f17813879" HERE = os.path.dirname(__file__) ROOT = os.path.dirname(HERE) - -# msvc 142 builds have a problem: -# on _some_ (unclear which!) systems due to the implementation of runtime detection of AF_UNIX -# in 4.3.4 -vcversion = 141 -# until that's fixed, we shouldn't ship 142 builds, -# which in turn means we can't support IPC in wheels - -if platform.architecture()[0] == '64bit': - msarch = '-x64' - # vcversion = 142 -else: - msarch = '' - # vcversion = 141 - -libzmq_dll = f"libzmq-v{vcversion}{msarch}-{x}_{y}_{z}.zip" -libzmq_dll_url = f"{download_url}/{libzmq_dll}" - -libzmq_dll_checksums = { - "libzmq-v140-4_3_4.zip": "sha256:05b7c42fe8d5feb2795d32f71f7d900083530ee6fdd15575bfc8d1b3fb8643f7", - "libzmq-v140-x64-4_3_4.zip": "sha256:d5d75bd502d7935af3cf80734f81069be78420331c54814d0aab6d64adf450ae", - "libzmq-v141-4_3_4.zip": "sha256:acfc997f036018b8dc8ab5b3a1d1444bba6ba5621e91c756d07cd9447db19672", - "libzmq-v141-x64-4_3_4.zip": "sha256:4bb29d6fed20bd175a82317676c7e940356cd358b624efae8569c7ee11c45636", - "libzmq-v142-x64-4_3_4.zip": "sha256:61ae77d70bd55ffb85c3b30b6a4aeb40b0c69aaf492a9e691404d7f0192969e2", -} - -libzmq_dll_checksum = libzmq_dll_checksums.get(libzmq_dll) - # ----------------------------------------------------------------------------- # Utilities # ----------------------------------------------------------------------------- @@ -217,28 +186,6 @@ def stage_platform_hpp(zmqroot): shutil.copy(pjoin(platform_dir, 'platform.hpp'), platform_hpp) -def fetch_libzmq_dll(savedir): - """Download binary release of libzmq for windows - - vcversion specifies the MSVC runtime version to use - """ - - dest = pjoin(savedir, 'zmq.h') - if os.path.exists(dest): - info("already have %s" % dest) - return - path = fetch_archive( - savedir, libzmq_dll_url, fname=libzmq_dll, checksum=libzmq_dll_checksum - ) - archive = zipfile.ZipFile(path) - to_extract = [] - for name in archive.namelist(): - if not name.endswith(".exe"): - to_extract.append(name) - archive.extractall(savedir, members=to_extract) - archive.close() - - def check_checksums(): """Check all the checksums!""" _failed = False @@ -260,13 +207,6 @@ def less_fatal(msg): fname=libzmq, checksum=libzmq_checksum, ) - for dll, checksum in libzmq_dll_checksums.items(): - fetch_archive( - savedir, - f"{download_url}/{dll}", - fname=dll, - checksum=checksum, - ) if not _failed: print("All ok!") return _failed diff --git a/buildutils/include_darwin/platform.hpp b/buildutils/include_darwin/platform.hpp index 7a6ec7d29..6fe3afea7 100644 --- a/buildutils/include_darwin/platform.hpp +++ b/buildutils/include_darwin/platform.hpp @@ -33,7 +33,7 @@ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the `fork' function. */ +/* fork is available */ #define HAVE_FORK 1 /* Define to 1 if you have the `freeifaddrs' function. */ @@ -93,9 +93,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 @@ -118,7 +115,7 @@ #define HAVE_SOCKET 1 /* Define to 1 if stdbool.h conforms to C99. */ -/* #undef HAVE_STDBOOL_H */ +#define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 @@ -126,6 +123,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 @@ -181,7 +181,7 @@ #define PACKAGE_NAME "zeromq" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "zeromq 4.3.4" +#define PACKAGE_STRING "zeromq 4.3.5" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "zeromq" @@ -190,19 +190,22 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.3.4" +#define PACKAGE_VERSION "4.3.5" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 -/* Define to 1 if you can safely include both and . */ +/* Define to 1 if you can safely include both and . This + macro is obsolete. */ #define TIME_WITH_SYS_TIME 1 /* Version number of package */ -#define VERSION "4.3.4" +#define VERSION "4.3.5" /* Enable militant API assertions */ /* #undef ZMQ_ACT_MILITANT */ @@ -227,7 +230,7 @@ #define ZMQ_HAVE_ATOMIC_INTRINSICS 1 /* Using curve encryption */ -#define ZMQ_HAVE_CURVE 1 +/* #undef ZMQ_HAVE_CURVE */ /* Have Cygwin */ /* #undef ZMQ_HAVE_CYGWIN */ @@ -292,6 +295,9 @@ /* Whether O_CLOEXEC is defined and functioning. */ #define ZMQ_HAVE_O_CLOEXEC 1 +/* Build with zmq_ppoll */ +#define ZMQ_HAVE_PPOLL 1 + /* Whether pthread_setname_np() has 1 argument */ #define ZMQ_HAVE_PTHREAD_SETNAME_1 1 @@ -382,6 +388,13 @@ /* Use 'select' I/O thread polling system */ /* #undef ZMQ_IOTHREAD_POLLER_USE_SELECT */ +/* Automatically close libsodium randombytes. Not threadsafe without + getrandom() */ +/* #undef ZMQ_LIBSODIUM_RANDOMBYTES_CLOSE */ + +/* kevent udata type is intptr_t */ +/* #undef ZMQ_NETBSD_KEVENT_UDATA_INTPTR_T */ + /* Use 'poll' zmq_poll(er)_* API polling system */ #define ZMQ_POLL_BASED_ON_POLL 1 @@ -418,9 +431,6 @@ /* Use radix tree implementation to manage subscriptions */ /* #undef ZMQ_USE_RADIX_TREE */ -/* Using tweetnacl for curve encryption */ -#define ZMQ_USE_TWEETNACL 1 - /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ diff --git a/pyproject.toml b/pyproject.toml index 9e465d905..388ab5a19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,17 +129,17 @@ ZMQ_PREFIX = "/usr/local" MACOSX_DEPLOYMENT_TARGET = "10.9" [tool.cibuildwheel.windows] -before-all = [ - "python setup.py fetch_libzmq --dll", - "xcopy /i libzmq-dll C:\\libzmq-dll", -] +# before-all = [ +# "python setup.py fetch_libzmq --dll", +# "xcopy /i libzmq-dll C:\\libzmq-dll", +# ] repair-wheel-command = """ delvewheel repair \ -v \ - --add-path=C:/libzmq-dll \ --wheel-dir={dest_dir} \ {wheel} """ + # --add-path=C:/libzmq-dll \ [tool.cibuildwheel.windows.environment] ZMQ_PREFIX = "libzmq-dll" diff --git a/tools/install_libzmq.sh b/tools/install_libzmq.sh index cdf36a0c8..fdf7c716d 100644 --- a/tools/install_libzmq.sh +++ b/tools/install_libzmq.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # script to install libzmq/libsodium for use in wheels set -ex -LIBSODIUM_VERSION="1.0.18" +LIBSODIUM_VERSION="1.0.19" LIBZMQ_VERSION="$(python3 -m buildutils.bundle)" @@ -39,7 +39,7 @@ curl -L -O "https://download.libsodium.org/libsodium/releases/libsodium-${LIBSOD curl -L -O "https://github.com/zeromq/libzmq/releases/download/v${LIBZMQ_VERSION}/zeromq-${LIBZMQ_VERSION}.tar.gz" tar -xzf libsodium-${LIBSODIUM_VERSION}.tar.gz -cd libsodium-${LIBSODIUM_VERSION} +cd libsodium-*/ ./configure --prefix="$PREFIX" make -j4 make install @@ -50,30 +50,10 @@ which ldconfig && ldconfig || true tar -xzf zeromq-${LIBZMQ_VERSION}.tar.gz cd zeromq-${LIBZMQ_VERSION} -# patch CURVE crash bug https://github.com/zeromq/libzmq/issues/4241 -# FIXME: switch to `--disable-libsodium_randombytes_close` -# when we bump bundle libzmq to 4.3.5 - -patch -p1 <