From 02755b33d0d2b2650084f54361ff64ae55c93a34 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 22 Aug 2020 00:16:49 -0400 Subject: [PATCH] Disable FH4 so that we don't require VCRUNTIME140_1.dll. For more details, see: https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/ https://github.com/joerick/cibuildwheel/issues/423#issuecomment-677763904 --- .github/workflows/cibuildwheel.yml | 2 ++ setup.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 5dd2d0dea942..f484793f1450 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -39,6 +39,7 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 CIBW_MANYLINUX_I686_IMAGE: manylinux1 CIBW_BEFORE_BUILD: pip install numpy==1.15 + MPL_DISABLE_FH4: "yes" - name: Build wheels for CPython 3.6 run: | @@ -48,6 +49,7 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 CIBW_MANYLINUX_I686_IMAGE: manylinux1 CIBW_BEFORE_BUILD: pip install numpy==1.15 + MPL_DISABLE_FH4: "yes" if: > startsWith(github.ref, 'refs/heads/v3.3') || startsWith(github.ref, 'refs/tags/v3.3') diff --git a/setup.py b/setup.py index 5d8486dc9a20..5fef78641607 100644 --- a/setup.py +++ b/setup.py @@ -169,6 +169,14 @@ def build_extensions(self): self.compiler.compiler_so.remove('-Wstrict-prototypes') except (ValueError, AttributeError): pass + if (self.compiler.compiler_type == 'msvc' and + os.environ.get('MPL_DISABLE_FH4')): + # Disable FH4 Exception Handling implementation so that we don't + # require VCRUNTIME140_1.dll. For more details, see: + # https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/ + # https://github.com/joerick/cibuildwheel/issues/423#issuecomment-677763904 + for ext in self.extensions: + ext.extra_compile_args.append('/d2FH4-') env = self.add_optimization_flags() for package in good_packages: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy