From d4ee89de5751bfafd38bc4696544d6725aae887b Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 20 Aug 2024 14:01:45 +0200 Subject: [PATCH] disable IPC in Windows wheels I suspect this may be the same crash that caused us to disable it in 24. --- docs/source/changelog.md | 10 ++++++++++ pyproject.toml | 8 +++++--- tools/test_wheel.py | 7 ++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/source/changelog.md b/docs/source/changelog.md index cc4aaa078..2e7607651 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -7,6 +7,16 @@ For a full changelog, consult the [git log](https://github.com/zeromq/pyzmq/comm ## 26 +### 26.2 + +Re-disable IPC in Windows wheels. + +Installing pyzmq from source on Windows should build with IPC enabled. + +IPC support via epoll on Windows was disabled in pyzmq 24 due to crashes, +this was reintroduced somewhat unintentionally via the new build system in 26.0, +but unfortunately the crashes remain, so IPC is disabled again in 26.2. + ### 26.1.1 Windows wheels now statically link msvcp instead of bundling msvcp.dll, which could cause compatibility problems. diff --git a/pyproject.toml b/pyproject.toml index 41b700903..94ec0412b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -178,14 +178,16 @@ repair-wheel-command = """\ """ [tool.cibuildwheel.windows.config-settings] +"cmake.define.ZMQ_PREFIX" = "bundled" # statically link MSVCP # see https://github.com/zeromq/pyzmq/issues/2012 # and https://github.com/matplotlib/matplotlib/pull/28687 "cmake.define.CMAKE_MSVC_RUNTIME_LIBRARY" = "MultiThreaded" "cmake.define.CMAKE_SHARED_LINKER_FLAGS" = "ucrt.lib;vcruntime.lib;/nodefaultlib:libucrt.lib;/nodefaultlib:libvcruntime.lib" - -[tool.cibuildwheel.windows.environment] -ZMQ_PREFIX = "bundled" +# disable IPC/epoll on Windows +# due to https://github.com/zeromq/pyzmq/issues/1981 +"cmake.define.ZMQ_HAVE_IPC" = "OFF" +"cmake.define.POLLER" = "select" # mac-arm target is 10.15 [[tool.cibuildwheel.overrides]] diff --git a/tools/test_wheel.py b/tools/test_wheel.py index dca9ee389..ba41657cb 100644 --- a/tools/test_wheel.py +++ b/tools/test_wheel.py @@ -20,7 +20,12 @@ def test_has(feature): import zmq - assert zmq.has(feature) + if feature == 'ipc' and sys.platform.startswith('win32'): + # IPC support is broken in enough cases on Windows + # that we can't ship wheels with it (for now) + assert not zmq.has(feature) + else: + assert zmq.has(feature) def test_simple_socket():