1
0

- 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/package/show/devel:languages:python:numeric/python-scikit-sparse?expand=0&rev=17
This commit is contained in:
Steve Kowalik 2024-07-25 06:03:43 +00:00 committed by Git OBS Bridge
commit 77d16fd25a
9 changed files with 285 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,80 @@
-------------------------------------------------------------------
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>
- Add scikit-sparse-py312.patch gh#scikit-sparse/scikit-sparse#105
-------------------------------------------------------------------
Fri Sep 8 16:56:21 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Clean up the SPEC file.
- Convert from python_{build,install} to
pyproject_{wheel,install} macros.
-------------------------------------------------------------------
Thu Aug 31 12:37:47 UTC 2023 - Markéta Machová <mmachova@suse.com>
- Update to 0.4.12
* Allow suitesparse include/library paths to be passed in to
pip install through environment variables.
* Added support for python 3.11
* Fix compilation with Cython>=3.0.0
- Add upstream scipy111.patch
-------------------------------------------------------------------
Sat Apr 24 16:29:24 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to 0.4.5
* Use PEP-517 style build-system so numpy and cython are no longer
needed prior to installation (openSUSE: we still use
setuptools here)
* Added support for python 3.9
- Remove nose -- gh#scikit-sparse/pull#66
-------------------------------------------------------------------
Fri Feb 12 14:12:27 UTC 2021 - Dirk Müller <dmueller@suse.com>
- skip python 36 build
-------------------------------------------------------------------
Wed Nov 7 11:42:47 CET 2018 - mcepl@suse.com
- Update to 0.4.4:
* Bug in solve with dense array, where base of result is not
set correctly, fixed.
* Supported versions updated to: - Python: 3.7, 3.6 - NumPy:
1.15, 1.14, 1.13 - SciPy: 1.1, 1.0, 0.19 - SuiteSparse: 5.2
-------------------------------------------------------------------
Wed Aug 8 16:38:21 UTC 2018 - jengelh@inai.de
- Trim irrelevant parts from description.
-------------------------------------------------------------------
Thu May 24 17:42:59 UTC 2018 - toddrme2178@gmail.com
- Add license file
- spec file cleanups
-------------------------------------------------------------------
Thu Apr 19 16:51:57 UTC 2018 - toddrme2178@gmail.com
- Update to version 0.4.3
* The method solve_L can now also use the L matrix of the LL' decomposition.
* Supported versions updated to Python 3.6, 3.5 and 2.7, NumPy 1.14 and 1.13 and SciPy 1.0 and 0.19.
-------------------------------------------------------------------
Thu May 25 16:14:07 UTC 2017 - toddrme2178@gmail.com
- Initial version

78
python-scikit-sparse.spec Normal file
View File

@ -0,0 +1,78 @@
#
# spec file for package python-scikit-sparse
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# For license file
%define tag c94f8418b6c36c3ff9db4f87e00fc08bd51cfb4b
Name: python-scikit-sparse
Version: 0.4.13
Release: 0
Summary: Scikits sparse matrix package
License: GPL-2.0-or-later AND LGPL-2.1-or-later
URL: https://github.com/scikit-sparse/scikit-sparse/
Source: https://files.pythonhosted.org/packages/source/s/scikit-sparse/scikit-sparse-%{version}.tar.gz
# PATCH-FIX-UPSTREAM Based on gh#scikit-sparse/scikit-sparse#123
Patch0: support-scipy-1.14.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel >= 1.23.3}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module scipy >= 0.19}
BuildRequires: %{python_module setuptools >= 18.0}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: suitesparse-devel
Requires: python-numpy >= 1.23.3
Requires: python-scipy >= 0.18
ExcludeArch: %{ix86}
# SECTION test requirements
BuildRequires: %{python_module pytest}
# /SECTION
%python_subpackages
%description
Sparse matrix tools.
This is a sparse matrix code in Python that plays well with
scipy.sparse, but that is somehow unsuitable for inclusion in scipy
proper.
There is a wrapper for the CHOLMOD library for sparse Cholesky
decomposition.
%prep
%autosetup -p1 -n scikit-sparse-%{version}
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%pytest_arch -ra --pyargs sksparse
%files %{python_files}
%doc README.md
%license LICENSE.txt
%{python_sitearch}/sksparse
%{python_sitearch}/scikit_sparse-%{version}.dist-info
%changelog

View File

@ -0,0 +1,3 @@
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

43
scikit-sparse-py312.patch Normal file
View File

@ -0,0 +1,43 @@
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"],

30
scipy111.patch Normal file
View File

@ -0,0 +1,30 @@
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, :]]
)