Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7be8675

Browse files
authored
Merge pull request#28687 from QuLogic/static-msvc
BLD: Include MSVCP140 runtime statically
2 parents3ed3d7b +8a62afa commit7be8675

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

‎.github/workflows/cibuildwheel.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,15 @@ 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+
# On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
104+
# MinGW on PATH that would be picked otherwise), switch to a static build for
105+
# runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
106+
# and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
107+
# keeping shared state with the rest of the Python process/extensions.
108+
CIBW_CONFIG_SETTINGS_WINDOWS:>-
109+
setup-args="--vsenv"
110+
setup-args="-Db_vscrt=mt"
111+
setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
104112
CIBW_MANYLINUX_X86_64_IMAGE:manylinux2014
105113
CIBW_SKIP:"*-musllinux_aarch64"
106114
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)

[8]ページ先頭

©2009-2025 Movatter.jp