Files
python-numpy/fix-meson-multiple-python-versions.patch
Dirk Mueller adcc16f741 Accepting request 1198038 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 2.1.0
  * Support for Python 3.13.
  * Preliminary support for free threaded Python 3.13.
  * Support for the array-api 2023.12 standard.
  ## New functions
  * A new function np.unstack(array, axis=...) was added, which
    splits an array into a tuple of arrays along an axis. It serves
    as the inverse of numpy.stack. (gh-26579)
  ## Deprecations
  * The fix_imports keyword argument in numpy.save is deprecated.
    Since NumPy 1.17, numpy.save uses a pickle protocol that no
    longer supports Python 2, and ignored fix_imports keyword. This
    keyword is kept only for backward compatibility. It is now
    deprecated. (gh-26452)
  * Passing non-integer inputs as the first argument of bincount is
    now deprecated, because such inputs are silently cast to
    integers with no warning about loss of precision. (gh-27076)
  ## Expired deprecations
  * Scalars and 0D arrays are disallowed for numpy.nonzero and
    numpy.ndarray.nonzero. (gh-26268)
  * set_string_function internal function was removed and
    PyArray_SetStringFunction was stubbed out. (gh-26611)
  ## C API changes
  * API symbols now hidden but customizable
  * Many shims removed from npy_3kcompat.h
  * New PyUFuncObject field process_core_dims_func
  ## New Features
  * Preliminary Support for Free-Threaded CPython 3.13
  * f2py can generate freethreading-compatible C extensions
  ## Improvements
  * histogram auto-binning now returns bin sizes >=1 for integer
    input data
  * ndarray shape-type parameter is now covariant and bound to
    tuple[int, ...]
  * np.quantile with method closest_observation chooses nearest
    even order statistic
  * lapack_lite is now thread safe
  * The numpy.printoptions context manager is now thread and
    async-safe
  * Type hinting numpy.polynomial
  * Improved numpy.dtypes type hints
  ## Performance improvements and changes
  * ma.cov and ma.corrcoef are now significantly faster
  ## Changes
  * ma.corrcoef may return a slightly different result
  * Cast-safety fixes in copyto and full
- Release 2.0.1
  ## Improvements
  * np.quantile with method closest_observation chooses nearest
    even order statistic

OBS-URL: https://build.opensuse.org/request/show/1198038
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=165
2024-08-31 12:31:00 +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