- Add upstream patch fix-test-max-threads-unset.patch

- Remove upstreamed patch numexpr-pr485-allow-numpy1.patch
- Update to 2.10.1:
  - The default number of 'safe' threads has been upgraded to 16
    (instead of previous 8). That means that if your CPU has > 16
    cores, the default is to use 16. You can always override this with
    the "NUMEXPR_MAX_THREADS" environment variable.
  - NumPy 1.23 is now the minimum supported.
  - Preliminary support for Python 3.13. Thanks to Karolina Surma.
  - Fix tests on nthreads detection (closes: #479). Thanks to
    @avalentino.
  - The build process has been modernized and now uses the
    pyproject.toml file for more of the configuration options.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numexpr?expand=0&rev=41
This commit is contained in:
2024-11-12 11:40:48 +00:00
committed by Git OBS Bridge
parent 2a06e6c5c6
commit 748c0a6b1a
6 changed files with 44 additions and 37 deletions

View File

@@ -18,25 +18,24 @@
%{?sle15_python_module_pythons}
Name: python-numexpr
Version: 2.10.0
Version: 2.10.1
Release: 0
Summary: Numerical expression evaluator for NumPy
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pydata/numexpr/
Source: https://files.pythonhosted.org/packages/source/n/numexpr/numexpr-%{version}.tar.gz
# PATCH-FIX-UPSTREAM numexpr-pr485-allow-numpy1.patch gh#pydata/numexpr#485, see also comments in gh#pydata/numexpr#478
Patch0: numexpr-pr485-allow-numpy1.patch
BuildRequires: %{python_module devel >= 3.7}
# Until numpy 2 is in Factory, keep allowing to build with numpy 1.x. See Patch0
BuildRequires: %{python_module numpy-devel >= 1.19.3}
# PATCH-FIX-UPSTREAM: fix-test-max-threads-unset.patch gh#pydata/numexpr#491
Patch0: fix-test-max-threads-unset.patch
BuildRequires: %{python_module numpy-devel >= 1.23}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: python-rpm-macros
Requires: python-numpy >= 1.19.3
Requires: python-numpy >= 1.23
%python_subpackages
%description
@@ -58,11 +57,17 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%install
%pyproject_install
# Remove devel files
%{python_expand #
find %{buildroot}%{$python_sitearch} -name *.hpp -type f -delete
find %{buildroot}%{$python_sitearch} -name *.cpp -type f -delete
}
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
mkdir tester
pushd tester
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python -B -c "import sys;import numexpr;sys.exit(0 if numexpr.test().wasSuccessful() else 1)"
}