Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statically link msvcp on Windows wheels #2015

Merged
merged 4 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading