Skip to content

Commit

Permalink
statically link msvcp on Windows
Browse files Browse the repository at this point in the history
avoids conflicts if the version is old
  • Loading branch information
minrk committed Aug 16, 2024
1 parent f6dd539 commit 793fc70
Show file tree
Hide file tree
Showing 3 changed files with 11 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
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ 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"

[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 793fc70

Please sign in to comment.