From 793fc70fd03c49269893687112f29e21ffa45d72 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 16 Aug 2024 13:38:03 +0200 Subject: [PATCH 1/4] statically link msvcp on Windows avoids conflicts if the version is old --- .gitignore | 3 +++ pyproject.toml | 6 ++++++ tools/test_wheel.py | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 33da4cf2c..735266120 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ _deps _src licenses .virtual_documents +/libsodium-* +/zeromq-* +*.tar.gz diff --git a/pyproject.toml b/pyproject.toml index 5838f6fe4..299b19cf4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/tools/test_wheel.py b/tools/test_wheel.py index 435c43f2c..dca9ee389 100644 --- a/tools/test_wheel.py +++ b/tools/test_wheel.py @@ -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)] From af94faaede99daa9af261ed1c7992bf36b59d3b0 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 16 Aug 2024 14:03:38 +0200 Subject: [PATCH 2/4] copy matplotlib's windows link flags --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 299b19cf4..f0802b530 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -183,6 +183,7 @@ repair-wheel-command = """\ # 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_INIT" = "ucrt.lib;vcruntime.lib;/nodefaultlib:libucrt.lib;/nodefaultlib:libvcruntime.lib" [tool.cibuildwheel.windows.environment] ZMQ_PREFIX = "bundled" From 2759b6271fd2eb28253bde69e5854b6921b4dd24 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 16 Aug 2024 14:12:09 +0200 Subject: [PATCH 3/4] maybe not INIT --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f0802b530..1f48ecac0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -183,7 +183,7 @@ repair-wheel-command = """\ # 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_INIT" = "ucrt.lib;vcruntime.lib;/nodefaultlib:libucrt.lib;/nodefaultlib:libvcruntime.lib" +"cmake.define.CMAKE_SHARED_LINKER_FLAGS" = "ucrt.lib;vcruntime.lib;/nodefaultlib:libucrt.lib;/nodefaultlib:libvcruntime.lib" [tool.cibuildwheel.windows.environment] ZMQ_PREFIX = "bundled" From 99c0370e42acf4d8baf45956ccc1a3c1b61b08ed Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 19 Aug 2024 08:26:15 +0200 Subject: [PATCH 4/4] update changelog for 26.1.1 --- docs/source/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/changelog.md b/docs/source/changelog.md index f8be834f5..cc4aaa078 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -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.