Skip to content

Commit

Permalink
Merge pull request #2015 from minrk/windows-static-msvcp
Browse files Browse the repository at this point in the history
statically link msvcp on Windows wheels
  • Loading branch information
minrk committed Aug 19, 2024
2 parents f6dd539 + 99c0370 commit 860c317
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ _deps
_src
licenses
.virtual_documents
/libsodium-*
/zeromq-*
*.tar.gz
4 changes: 4 additions & 0 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ For a full changelog, consult the [git log](https://github.com/zeromq/pyzmq/comm

## 26

### 26.1.1

Windows wheels now statically link msvcp instead of bundling msvcp.dll, which could cause compatibility problems.

### 26.1.0

26.1.0 is the first release with wheels for CPython 3.13.
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ repair-wheel-command = """\
{wheel} \
"""

[tool.cibuildwheel.windows.config-settings]
# 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"

Expand Down
4 changes: 2 additions & 2 deletions tools/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def test_bundle_msvcp():
print(dlls)
# Is concrt140 needed? delvewheel doesn't detect it anymore
# check for vcruntime?
should_bundle = ["msvcp140*.dll"]
shouldnt_bundle = []
should_bundle = []
shouldnt_bundle = ["msvcp140*.dll"]

for pattern in shouldnt_bundle:
matched = [dll for dll in dlls if fnmatch(dll, pattern)]
Expand Down

0 comments on commit 860c317

Please sign in to comment.