8000 BLD: Include MSVCP140 runtime statically by QuLogic · Pull Request #28687 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

BLD: Include MSVCP140 runtime statically #28687

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

Merged
merged 1 commit into from
Aug 12, 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
10 changes: 9 additions & 1 deletion .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,15 @@ jobs:
CIBW_AFTER_BUILD: >-
twine check {wheel} &&
python {package}/ci/check_wheel_licenses.py {wheel}
CIBW_CONFIG_SETTINGS: setup-args="--vsenv"
# On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
# MinGW on PATH that would be picked otherwise), switch to a static build for
# runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
# and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
# keeping shared state with the rest of the Python process/extensions.
CIBW_CONFIG_SETTINGS_WINDOWS: >-
setup-args="--vsenv"
setup-args="-Db_vscrt=mt"
setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_SKIP: "*-musllinux_aarch64"
CIBW_TEST_COMMAND: >-
Expand Down
10 changes: 10 additions & 0 deletions doc/api/next_api_changes/development/28687-ES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Windows wheel runtime bundling made static
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In 3.7.0, the MSVC runtime DLL was bundled in wheels to enable importing Matplotlib on
systems that do not have it installed. However, this could cause inconsistencies with
other wheels that did the same, and trigger random crashes depending on import order. See
`this issue <https://github.com/matplotlib/matplotlib/issues/28551>`_ for further
details.

Since 3.9.2, wheels now bundle the MSVC runtime DLL statically to avoid such issues.
Loading
0