From 38888a710cbcddae24bcf54bb245cb4e6733df309df01063f1f31b0ec3f87dfe Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 8 Sep 2023 16:52:23 +0000 Subject: [PATCH 1/2] Accepting request 1109521 from home:mcalabkova:branches:devel:languages:python:numeric - 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 OBS-URL: https://build.opensuse.org/request/show/1109521 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-scikit-sparse?expand=0&rev=12 --- python-scikit-sparse.changes | 10 ++++++++++ python-scikit-sparse.spec | 12 +++++------- scikit-sparse-0.4.12.tar.gz | 3 +++ scikit-sparse-0.4.5.tar.gz | 3 --- scipy111.patch | 30 ++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 scikit-sparse-0.4.12.tar.gz delete mode 100644 scikit-sparse-0.4.5.tar.gz create mode 100644 scipy111.patch diff --git a/python-scikit-sparse.changes b/python-scikit-sparse.changes index d2da649..02a1513 100644 --- a/python-scikit-sparse.changes +++ b/python-scikit-sparse.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 31 12:37:47 UTC 2023 - Markéta Machová + +- 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 diff --git a/python-scikit-sparse.spec b/python-scikit-sparse.spec index 52d5bee..8f7d524 100644 --- a/python-scikit-sparse.spec +++ b/python-scikit-sparse.spec @@ -1,7 +1,7 @@ # # spec file for package python-scikit-sparse # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,10 +17,8 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 -%define skip_python36 1 Name: python-scikit-sparse -Version: 0.4.5 +Version: 0.4.12 Release: 0 # For license file %define tag c94f8418b6c36c3ff9db4f87e00fc08bd51cfb4b @@ -29,6 +27,8 @@ License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: Development/Languages/Python 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 https://github.com/scikit-sparse/scikit-sparse/pull/102 Fix breaking changes in isspmatrix of scipy >=1.11.0 +Patch: scipy111.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel >= 1.13.3} @@ -57,9 +57,7 @@ There is a wrapper for the CHOLMOD library for sparse Cholesky decomposition. %prep -%setup -q -n scikit-sparse-%{version} -# no need for nose here -- gh#scikit-sparse/pull#66 -sed -i 's/from nose.tools import assert_raises/from pytest import raises as assert_raises/' sksparse/test_cholmod.py +%autosetup -p1 -n scikit-sparse-%{version} %build export CFLAGS="%{optflags}" diff --git a/scikit-sparse-0.4.12.tar.gz b/scikit-sparse-0.4.12.tar.gz new file mode 100644 index 0000000..8c7383c --- /dev/null +++ b/scikit-sparse-0.4.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6502fea9ba561cfa5491eb222ed2c81c16263d8182a293950db20509c941166 +size 214115 diff --git a/scikit-sparse-0.4.5.tar.gz b/scikit-sparse-0.4.5.tar.gz deleted file mode 100644 index 6737c46..0000000 --- a/scikit-sparse-0.4.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d0cdba40cba1063474fd30bc6d3bf2b74dfb1c1fc81cf6ee45e201933d478f8 -size 209021 diff --git a/scipy111.patch b/scipy111.patch new file mode 100644 index 0000000..76bcdcd --- /dev/null +++ b/scipy111.patch @@ -0,0 +1,30 @@ +From 179e69774584163a7827b5ee23f1e0096d7eeec3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20J=C3=A4ger?= +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: From 51c122573eb427eaa3b536c02b57d3ddbc74d134d9327a4936268b33a67afdef Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 8 Sep 2023 16:56:55 +0000 Subject: [PATCH 2/2] - Clean up the SPEC file. - Convert from python_{build,install} to pyproject_{wheel,install} macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-scikit-sparse?expand=0&rev=13 --- python-scikit-sparse.changes | 7 +++++++ python-scikit-sparse.spec | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/python-scikit-sparse.changes b/python-scikit-sparse.changes index 02a1513..258a8ea 100644 --- a/python-scikit-sparse.changes +++ b/python-scikit-sparse.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Sep 8 16:56:21 UTC 2023 - Matej Cepl + +- 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á diff --git a/python-scikit-sparse.spec b/python-scikit-sparse.spec index 8f7d524..7f4dc77 100644 --- a/python-scikit-sparse.spec +++ b/python-scikit-sparse.spec @@ -16,34 +16,34 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +# For license file +%define tag c94f8418b6c36c3ff9db4f87e00fc08bd51cfb4b Name: python-scikit-sparse Version: 0.4.12 Release: 0 -# For license file -%define tag c94f8418b6c36c3ff9db4f87e00fc08bd51cfb4b Summary: Scikits sparse matrix package License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: Development/Languages/Python 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 https://github.com/scikit-sparse/scikit-sparse/pull/102 Fix breaking changes in isspmatrix of scipy >=1.11.0 -Patch: scipy111.patch +Patch0: scipy111.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel >= 1.13.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 -# SECTION test requirements -BuildRequires: %{python_module pytest} -# /SECTION Requires: python-numpy >= 1.12 Requires: python-scipy >= 0.18 ExcludeArch: %{ix86} - +# SECTION test requirements +BuildRequires: %{python_module pytest} +# /SECTION %python_subpackages %description @@ -61,10 +61,10 @@ decomposition. %build export CFLAGS="%{optflags}" -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitearch} %check