forked from pool/python-scikit-sparse
Accepting request 1109763 from devel:languages:python:numeric
- Clean up the SPEC file. - Convert from python_{build,install} to pyproject_{wheel,install} macros. - 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/1109763 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-scikit-sparse?expand=0&rev=6
This commit is contained in:
commit
5a6f9cb0c4
@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
@ -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
|
||||
@ -16,34 +16,34 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
%define skip_python36 1
|
||||
Name: python-scikit-sparse
|
||||
Version: 0.4.5
|
||||
Release: 0
|
||||
# For license file
|
||||
%define tag c94f8418b6c36c3ff9db4f87e00fc08bd51cfb4b
|
||||
Name: python-scikit-sparse
|
||||
Version: 0.4.12
|
||||
Release: 0
|
||||
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
|
||||
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
|
||||
@ -57,16 +57,14 @@ 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}"
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
|
3
scikit-sparse-0.4.12.tar.gz
Normal file
3
scikit-sparse-0.4.12.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e6502fea9ba561cfa5491eb222ed2c81c16263d8182a293950db20509c941166
|
||||
size 214115
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8d0cdba40cba1063474fd30bc6d3bf2b74dfb1c1fc81cf6ee45e201933d478f8
|
||||
size 209021
|
30
scipy111.patch
Normal file
30
scipy111.patch
Normal 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:
|
Loading…
Reference in New Issue
Block a user