Accepting request 1030992 from devel:languages:python:numeric

- Add skip-32bit-archs.patch skiping a failing test on 32bit arch
  (gh#pydata/sparse#490).
- Also remove conditional python_module definition.

OBS-URL: https://build.opensuse.org/request/show/1030992
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sparse?expand=0&rev=11
This commit is contained in:
2022-10-25 09:20:12 +00:00
committed by Git OBS Bridge
3 changed files with 33 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Oct 21 08:39:20 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Add skip-32bit-archs.patch skiping a failing test on 32bit arch
(gh#pydata/sparse#490).
- Also remove conditional python_module definition.
-------------------------------------------------------------------
Thu Jul 14 17:53:01 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@@ -16,7 +16,6 @@
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-sparse
Version: 0.13.0
@@ -26,6 +25,9 @@ License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/pydata/sparse
Source: https://files.pythonhosted.org/packages/source/s/sparse/sparse-%{version}.tar.gz
# PATCH-FIX-UPSTREAM skip-32bit-archs.patch gh#pydata/sparse#490 mcepl@suse.com
# Skip some tests on 32bit architecture
Patch0: skip-32bit-archs.patch
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module dask-array}

23
skip-32bit-archs.patch Normal file
View File

@@ -0,0 +1,23 @@
---
sparse/tests/test_coo.py | 3 +++
1 file changed, 3 insertions(+)
--- a/sparse/tests/test_coo.py
+++ b/sparse/tests/test_coo.py
@@ -1,6 +1,7 @@
import contextlib
import operator
import pickle
+import platform
import sys
from functools import reduce
@@ -14,6 +15,8 @@ from sparse import COO
from sparse._settings import NEP18_ENABLED
from sparse._utils import assert_eq, random_value_array, html_table
+pytestmark = pytest.mark.skipif(platform.architecture()[0] == '32bit',
+ reason='Fails on 32bit arch (gh#pydata/sparse#490)')
@pytest.fixture(scope="module", params=["f8", "f4", "i8", "i4"])
def random_sparse(request):