Skip to content

Commit

Permalink
disable IPC in Windows wheels
Browse files Browse the repository at this point in the history
I suspect this may be the same crash that caused us to disable it in 24.
  • Loading branch information
minrk committed Aug 20, 2024
1 parent 10bbde9 commit e410df8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
10 changes: 10 additions & 0 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" = "bundled"
"cmake.define.POLLER" = "select"

# mac-arm target is 10.15
[[tool.cibuildwheel.overrides]]
Expand Down
7 changes: 6 additions & 1 deletion tools/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit e410df8

Please sign in to comment.