Skip to content

Commit fad4add

Browse files
committed
BLD: Include MSVCP140 runtime statically
This may prevent conflicts with other wheels that use the runtime at a different version.
1 parent 2811043 commit fad4add

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/cibuildwheel.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ jobs:
100100
CIBW_AFTER_BUILD: >-
101101
twine check {wheel} &&
102102
python {package}/ci/check_wheel_licenses.py {wheel}
103-
CIBW_CONFIG_SETTINGS: setup-args="--vsenv"
103+
CIBW_CONFIG_SETTINGS_WINDOWS: >-
104+
setup-args="--vsenv"
105+
setup-args="-Db_vscrt=mt"
106+
setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
104107
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
105108
CIBW_SKIP: "*-musllinux_aarch64"
106109
CIBW_TEST_COMMAND: >-
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Windows wheel runtime bundling made static
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
In 3.7.0, the MSVC runtime DLL was bundled in wheels to enable importing Matplotlib on
5+
systems that do not have it installed. However, this could cause inconsistencies with
6+
other wheels that did the same, and trigger random crashes depending on import order. See
7+
`this issue <https://github.com/matplotlib/matplotlib/issues/28551>`_ for further
8+
details.
9+
10+
Since 3.9.2, wheels now bundle the MSVC runtime DLL statically to avoid such issues.

0 commit comments

Comments
 (0)