From 127c0a5a0874b91b6854c885f1954ca3360ec743a4bd551fff1f222019172d55 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 19 Apr 2024 22:24:54 +0000 Subject: [PATCH 1/2] Accepting request 1169176 from home:bnavigator:numpy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update to 2.10.0 * Support for NumPy 2.0.0. This is still experimental, so please report any issues you find. Thanks to Clément Robert and Thomas Caswell for the work. * Avoid erroring when OMP_NUM_THREADS is empty string. Thanks to Patrick Hoefler. * Do not warn if OMP_NUM_THREAD set. OBS-URL: https://build.opensuse.org/request/show/1169176 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numexpr?expand=0&rev=36 --- numexpr-2.10.0.tar.gz | 3 +++ numexpr-2.9.0.tar.gz | 3 --- python-numexpr.changes | 11 +++++++++++ python-numexpr.spec | 7 ++++--- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 numexpr-2.10.0.tar.gz delete mode 100644 numexpr-2.9.0.tar.gz diff --git a/numexpr-2.10.0.tar.gz b/numexpr-2.10.0.tar.gz new file mode 100644 index 0000000..26cf30d --- /dev/null +++ b/numexpr-2.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c89e930752639df040539160326d8f99a84159bbea41943ab8e960591edaaef0 +size 103563 diff --git a/numexpr-2.9.0.tar.gz b/numexpr-2.9.0.tar.gz deleted file mode 100644 index ed610cf..0000000 --- a/numexpr-2.9.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f21d12f6c432ce349089eb95342babf6629aebb3fddf187a4492d3aadaadaaf0 -size 103155 diff --git a/python-numexpr.changes b/python-numexpr.changes index a358f39..63f169a 100644 --- a/python-numexpr.changes +++ b/python-numexpr.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Apr 19 11:57:33 UTC 2024 - Ben Greiner + +- Update to 2.10.0 + * Support for NumPy 2.0.0. This is still experimental, so please + report any issues you find. Thanks to Clément Robert and Thomas + Caswell for the work. + * Avoid erroring when OMP_NUM_THREADS is empty string. Thanks to + Patrick Hoefler. + * Do not warn if OMP_NUM_THREAD set. + ------------------------------------------------------------------- Tue Feb 6 09:32:12 UTC 2024 - Dirk Müller diff --git a/python-numexpr.spec b/python-numexpr.spec index 217e86a..a23fb30 100644 --- a/python-numexpr.spec +++ b/python-numexpr.spec @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-numexpr -Version: 2.9.0 +Version: 2.10.0 Release: 0 Summary: Numerical expression evaluator for NumPy License: MIT @@ -26,14 +26,15 @@ Group: Development/Languages/Python URL: https://github.com/pydata/numexpr/ Source: https://files.pythonhosted.org/packages/source/n/numexpr/numexpr-%{version}.tar.gz BuildRequires: %{python_module devel >= 3.7} -BuildRequires: %{python_module numpy-devel >= 1.13.3} +# Until numpy 2 is in Factory, keep allowing to build with numpy 1.x. See comments in pyproject.toml for scipy and pandas +BuildRequires: %{python_module numpy-devel >= 1.19.3} 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.13.3 +Requires: python-numpy >= 1.19.3 %python_subpackages %description From 9c5d2728809ba00488d9b0d44f1e6b4d3b71bae00397588abe033dc39668d4df Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 23 Apr 2024 14:04:37 +0000 Subject: [PATCH 2/2] Accepting request 1169641 from home:mcalabkova:branches:devel:languages:python:numeric - Add patch revert-to-numpy1.patch to restore compatibility with numpy v1 * revert of upstream commit, drop when numpy v2 comes to Factory OBS-URL: https://build.opensuse.org/request/show/1169641 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numexpr?expand=0&rev=37 --- python-numexpr.changes | 6 ++++++ python-numexpr.spec | 4 +++- revert-to-numpy1.patch | 31 +++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 revert-to-numpy1.patch diff --git a/python-numexpr.changes b/python-numexpr.changes index 63f169a..aad4abd 100644 --- a/python-numexpr.changes +++ b/python-numexpr.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 22 09:57:01 UTC 2024 - Markéta Machová + +- Add patch revert-to-numpy1.patch to restore compatibility with numpy v1 + * revert of upstream commit, drop when numpy v2 comes to Factory + ------------------------------------------------------------------- Fri Apr 19 11:57:33 UTC 2024 - Ben Greiner diff --git a/python-numexpr.spec b/python-numexpr.spec index a23fb30..12106f7 100644 --- a/python-numexpr.spec +++ b/python-numexpr.spec @@ -25,6 +25,8 @@ 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 revert of https://github.com/pydata/numexpr/commit/beedecb3990d604d0f272c1a2f9a1d117f6120ba to enable numpy v1 again, drop when numpy is updated to v2 +Patch0: revert-to-numpy1.patch BuildRequires: %{python_module devel >= 3.7} # Until numpy 2 is in Factory, keep allowing to build with numpy 1.x. See comments in pyproject.toml for scipy and pandas BuildRequires: %{python_module numpy-devel >= 1.19.3} @@ -44,7 +46,7 @@ can be accelerated and use less memory than doing the same calculation in Python. %prep -%setup -q -n numexpr-%{version} +%autosetup -p1 -n numexpr-%{version} # wrong-file-end-of-line-encoding sed -i 's/\r$//' ANNOUNCE.rst AUTHORS.txt README.rst RELEASE_NOTES.rst site.cfg.example # remove unwanted shebang diff --git a/revert-to-numpy1.patch b/revert-to-numpy1.patch new file mode 100644 index 0000000..d9a4ab4 --- /dev/null +++ b/revert-to-numpy1.patch @@ -0,0 +1,31 @@ +From beedecb3990d604d0f272c1a2f9a1d117f6120ba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= +Date: Mon, 1 Apr 2024 14:43:52 +0200 +Subject: Revert: [PATCH] BLD: fix compiling against numpy 2.0 + +--- + numexpr/interpreter.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: numexpr-2.10.0/numexpr/interpreter.cpp +=================================================================== +--- numexpr-2.10.0.orig/numexpr/interpreter.cpp ++++ numexpr-2.10.0/numexpr/interpreter.cpp +@@ -1203,7 +1203,7 @@ NumExpr_run(NumExprObject *self, PyObjec + Py_INCREF(dtypes[0]); + } else { // constant, like in '"foo"' + dtypes[0] = PyArray_DescrNewFromType(NPY_STRING); +- PyDataType_SET_ELSIZE(dtypes[0], (npy_intp)self->memsizes[1]); ++ dtypes[0]->elsize = (int)self->memsizes[1]; + } // no string temporaries, so no third case + } + if (dtypes[0] == NULL) { +@@ -1449,7 +1449,7 @@ NumExpr_run(NumExprObject *self, PyObjec + /* Get the sizes of all the operands */ + dtypes_tmp = NpyIter_GetDescrArray(iter); + for (i = 0; i < n_inputs+1; ++i) { +- self->memsizes[i] = PyDataType_ELSIZE(dtypes_tmp[i]); ++ self->memsizes[i] = dtypes_tmp[i]->elsize; + } + + /* For small calculations, just use 1 thread */