Files
python-numpy/fix-meson-multiple-python-versions.patch
Matej Cepl 8fc76b3557 looks like I managed to patch numba
- Update to 2.2.2
  * New functions matvec and vecmat
  * Many improved annotations
  * Improved support for the new StringDType
  * Improved support for free threaded Python
  * Fixes for f2py
  ## Deprecations
  * _add_newdoc_ufunc is now deprecated. ufunc.__doc__ = newdoc should 
    be used instead.
  ## Expired deprecations
  * bool(np.array([])) and other empty arrays will now raise an error. 
    Use arr.size > 0 instead to check whether an array has no elements.
  ## Compatibility notes
  * numpy.cov now properly transposes single-row (2d array) design 
    matrices when rowvar=False. Previously, single-row design matrices 
    would return a scalar in this scenario, which is not correct, so 
    this is a behavior change and an array of the appropriate shape 
    will now be returned.
  ## New Features
  * New functions for matrix-vector and vector-matrix products
  * np.complexfloating[T, T] can now also be written as np.complexfloating[T]
  * UFuncs now support __dict__ attribute and allow overriding __doc__ 
    (either directly or via ufunc.__dict__["__doc__"]). __dict__ can be 
    used to also override other properties, such as __module__ or 
    __qualname__.
  * The “nbit” type parameter of np.number and its subtypes now defaults 
    to typing.Any. This way, type-checkers will infer annotations such 
    as x: np.floating as x: np.floating[Any], even in strict mode.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=182
2025-03-18 13:28:14 +00:00

54 lines
2.1 KiB
Diff

From 59694be29a71b17ad1ce58c865a5524c50bfedee Mon Sep 17 00:00:00 2001
From: Ralf Gommers <ralf.gommers@gmail.com>
Date: Fri, 16 Feb 2024 22:18:43 +0100
Subject: [PATCH] TST: fix Cython compile test which invokes `meson`
Closes gh-24956
[skip circle]
---
numpy/core/tests/test_cython.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Index: numpy-1.26.4/numpy/core/tests/test_cython.py
===================================================================
--- numpy-1.26.4.orig/numpy/core/tests/test_cython.py
+++ numpy-1.26.4/numpy/core/tests/test_cython.py
@@ -37,6 +37,13 @@ def install_temp(tmpdir_factory):
srcdir = os.path.join(os.path.dirname(__file__), 'examples', 'cython')
build_dir = tmpdir_factory.mktemp("cython_test") / "build"
os.makedirs(build_dir, exist_ok=True)
+ # Ensure we use the correct Python interpreter even when `meson` is
+ # installed in a different Python environment (see gh-24956)
+ native_file = str(build_dir / 'interpreter-native-file.ini')
+ with open(native_file, 'w') as f:
+ f.write("[binaries]\n")
+ f.write(f"python = '{sys.executable}'")
+
try:
subprocess.check_call(["meson", "--version"])
except FileNotFoundError:
@@ -44,17 +51,20 @@ def install_temp(tmpdir_factory):
if sys.platform == "win32":
subprocess.check_call(["meson", "setup",
"--buildtype=release",
- "--vsenv", str(srcdir)],
+ "--vsenv", "--native-file", native_file,
+ str(srcdir)],
cwd=build_dir,
)
else:
- subprocess.check_call(["meson", "setup", str(srcdir)],
+ subprocess.check_call(["meson", "setup",
+ "--native-file", native_file, str(srcdir)],
cwd=build_dir
)
subprocess.check_call(["meson", "compile", "-vv"], cwd=build_dir)
sys.path.append(str(build_dir))
+
def test_is_timedelta64_object(install_temp):
import checks