From 4002a7d421ff10780c28a3643683af7a9754f87f Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Wed, 23 Nov 2022 23:40:23 +0100 Subject: BLD: enable building NumPy with Meson This enables building with NumPy on Linux and macOS. Windows support should be complete to, but is untested as of now and may need a few tweaks. This contains: - A set of `meson.build` files and related code generation script tweaks, header templates, etc. - One CI job on Linux - Basic docs on using Meson to build NumPy (not yet integrated in the html docs, it's too early for that - this is for early adopters right now). The build should be complete, with the major exception of SIMD support. The full test suite passes. See gh-22546 for the tracking issue with detailed notes on the plan for switching NumPy to Meson as its build system. Co-authored-by: Stefan van der Walt --- numpy/core/setup.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'numpy/core/setup.py') diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 10b8c093e..6f0a4417a 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -45,6 +45,8 @@ NPY_DISABLE_SVML = (os.environ.get('NPY_DISABLE_SVML', "0") == "1") # in time is only in build. -- Charles Harris, 2013-03-30 class CallOnceOnly: + # NOTE: we don't need any of this in the Meson build, + # it takes care of caching def __init__(self): self._check_types = None self._check_ieee_macros = None @@ -177,6 +179,8 @@ def check_math_capabilities(config, ext, moredefs, mathlibs): else: return 1 + # NOTE: not needed in Meson build, we set the minimum + # compiler version to 8.4 to avoid this bug # GH-14787: Work around GCC<8.4 bug when compiling with AVX512 # support on Windows-based platforms def check_gh14787(fn): @@ -427,6 +431,8 @@ def check_types(config_cmd, ext, build_dir): return private_defines, public_defines +# NOTE: this isn't needed in the Meson build, +# and we won't support a MATHLIB env var def check_mathlib(config_cmd): # Testing the C math library mathlibs = [] -- cgit v1.2.1