Accepting request 1189518 from devel:languages:python:numeric

- Update to 0.4.13:
  * Fix breaking changes in isspmatrix of scipy >=1.11.0, discontinuing
    compatibility with csc_array
  * remove numpy build restrictions
- Drop patches scikit-sparse-py312.patch, scipy111.patch:
  * Included upstream.
- Add patch support-scipy-1.14.patch:
  * Do not call a now removed method in scipy.

OBS-URL: https://build.opensuse.org/request/show/1189518
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-scikit-sparse?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2024-07-25 13:39:47 +00:00 committed by Git OBS Bridge
commit df14f9348c
7 changed files with 45 additions and 85 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Jul 25 06:03:00 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.4.13:
* Fix breaking changes in isspmatrix of scipy >=1.11.0, discontinuing
compatibility with csc_array
* remove numpy build restrictions
- Drop patches scikit-sparse-py312.patch, scipy111.patch:
* Included upstream.
- Add patch support-scipy-1.14.patch:
* Do not call a now removed method in scipy.
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Feb 18 15:19:40 UTC 2024 - Ben Greiner <code@bnavigator.de> Sun Feb 18 15:19:40 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@ -19,20 +19,17 @@
# For license file # For license file
%define tag c94f8418b6c36c3ff9db4f87e00fc08bd51cfb4b %define tag c94f8418b6c36c3ff9db4f87e00fc08bd51cfb4b
Name: python-scikit-sparse Name: python-scikit-sparse
Version: 0.4.12 Version: 0.4.13
Release: 0 Release: 0
Summary: Scikits sparse matrix package Summary: Scikits sparse matrix package
License: GPL-2.0-or-later AND LGPL-2.1-or-later License: GPL-2.0-or-later AND LGPL-2.1-or-later
Group: Development/Languages/Python
URL: https://github.com/scikit-sparse/scikit-sparse/ URL: https://github.com/scikit-sparse/scikit-sparse/
Source: https://files.pythonhosted.org/packages/source/s/scikit-sparse/scikit-sparse-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/s/scikit-sparse/scikit-sparse-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/scikit-sparse/scikit-sparse/pull/102 Fix breaking changes in isspmatrix of scipy >=1.11.0 # PATCH-FIX-UPSTREAM Based on gh#scikit-sparse/scikit-sparse#123
Patch0: scipy111.patch Patch0: support-scipy-1.14.patch
# PATCH-FIX-UPSTREAM scikit-sparse-py312.patch gh#scikit-sparse/scikit-sparse#105
Patch1: scikit-sparse-py312.patch
BuildRequires: %{python_module Cython} BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel >= 1.13.3} BuildRequires: %{python_module numpy-devel >= 1.23.3}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module scipy >= 0.19} BuildRequires: %{python_module scipy >= 0.19}
BuildRequires: %{python_module setuptools >= 18.0} BuildRequires: %{python_module setuptools >= 18.0}
@ -40,7 +37,7 @@ BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: suitesparse-devel BuildRequires: suitesparse-devel
Requires: python-numpy >= 1.13.3 Requires: python-numpy >= 1.23.3
Requires: python-scipy >= 0.18 Requires: python-scipy >= 0.18
ExcludeArch: %{ix86} ExcludeArch: %{ix86}
# SECTION test requirements # SECTION test requirements
@ -76,6 +73,6 @@ export CFLAGS="%{optflags}"
%doc README.md %doc README.md
%license LICENSE.txt %license LICENSE.txt
%{python_sitearch}/sksparse %{python_sitearch}/sksparse
%{python_sitearch}/scikit_sparse-%{version}*-info %{python_sitearch}/scikit_sparse-%{version}.dist-info
%changelog %changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e6502fea9ba561cfa5491eb222ed2c81c16263d8182a293950db20509c941166
size 214115

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb2190ca40e6bfa87bc81c0ee98277e173de7a7ae540d62784ed2bad7b7de25a
size 214199

View File

@ -1,43 +0,0 @@
From 60e672ee846e081658e4d74525ab5584358fefdb Mon Sep 17 00:00:00 2001
From: Christian Glusa <caglusa@sandia.gov>
Date: Sun, 26 Nov 2023 17:55:43 -0700
Subject: [PATCH] remove numpy build restrictions, add Python 3.12 build to
github action
---
.github/workflows/ci_test.yml | 2 +-
pyproject.toml | 7 +------
setup.py | 2 +-
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 682d8bc..bf7703e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -25,11 +25,6 @@ requires = [
"setuptools>=40.8.0",
"wheel",
"Cython>=0.22",
- 'numpy==1.13.3; python_version=="3.6"',
- 'numpy==1.14.5; python_version=="3.7"',
- 'numpy==1.17.3; python_version=="3.8"',
- 'numpy==1.19.3; python_version=="3.9"',
- 'numpy==1.23.1; python_version=="3.10"',
- 'numpy==1.23.5; python_version=="3.11"',
+ 'numpy>=1.13.3; python_version>="3.6"',
]
build-backend = "setuptools.build_meta"
\ No newline at end of file
diff --git a/setup.py b/setup.py
index f7e7af1..e7ec38b 100644
--- a/setup.py
+++ b/setup.py
@@ -55,7 +55,7 @@
setup(
install_requires=["numpy>=1.13.3", "scipy>=0.19"],
- python_requires=">=3.6, <3.12",
+ python_requires=">=3.6",
packages=find_packages(),
package_data={
"": ["test_data/*.mtx.gz"],

View File

@ -1,30 +0,0 @@
From 179e69774584163a7827b5ee23f1e0096d7eeec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20J=C3=A4ger?= <jaeger@mfk.fau.de>
Date: Tue, 29 Aug 2023 16:15:42 +0200
Subject: [PATCH] Fix breaking changes in isspmatrix of scipy >=1.11.0,
discontinuing compatibility with csc_array
Details see https://github.com/scipy/scipy/pull/18528
---
sksparse/cholmod.pyx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sksparse/cholmod.pyx b/sksparse/cholmod.pyx
index 861029d..9eceb8c 100644
--- a/sksparse/cholmod.pyx
+++ b/sksparse/cholmod.pyx
@@ -403,12 +403,12 @@ cdef void _error_handler(
warnings.warn(full_msg, CholmodWarning)
def _check_for_csc(m):
- if not sparse.isspmatrix_csc(m):
+ if not sparse.isspmatrix_csc(m) or isinstance(m, sparse.csc_array):
warnings.warn("converting matrix of class %s to CSC format"
% (m.__class__.__name__,),
CholmodTypeConversionWarning)
m = m.tocsc()
- assert sparse.isspmatrix_csc(m)
+ assert sparse.isspmatrix_csc(m) or isinstance(m, sparse.csc_array)
return m
cdef class Common:

24
support-scipy-1.14.patch Normal file
View File

@ -0,0 +1,24 @@
From ebbbaa4882eeac8fd4a2f4bf8c94c9e6b967cf54 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Thu, 25 Jul 2024 15:35:29 +1000
Subject: [PATCH] Switch to csc_matrix.T.conjugate() from .H
With scipy 1.14 csc_matrix.H has been removed, after being deprecated in
1.12. T.conjugate() is the replacement method, switch to it.
---
tests/test_cholmod.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sksparse/test_cholmod.py b/sksparse/test_cholmod.py
index ed2af70..95bdb18 100644
--- a/sksparse/test_cholmod.py
+++ b/sksparse/test_cholmod.py
@@ -94,7 +94,7 @@ def complex_matrix():
def factor_of(factor, matrix):
return np.allclose(
- (factor.L() * factor.L().H).todense(), matrix.todense()[factor.P()[:, np.newaxis], factor.P()[np.newaxis, :]]
+ (factor.L() * factor.L().T.conjugate()).todense(), matrix.todense()[factor.P()[:, np.newaxis], factor.P()[np.newaxis, :]]
)