forked from pool/python-jsonpickle
Accepting request 1136659 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1136659 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jsonpickle?expand=0&rev=13
This commit is contained in:
12
enable_gmpy_test.patch
Normal file
12
enable_gmpy_test.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
Index: jsonpickle-3.0.2/tests/ecdsa_test.py
|
||||
===================================================================
|
||||
--- jsonpickle-3.0.2.orig/tests/ecdsa_test.py
|
||||
+++ jsonpickle-3.0.2/tests/ecdsa_test.py
|
||||
@@ -7,6 +7,7 @@ import pytest
|
||||
from helper import SkippableTest
|
||||
|
||||
import jsonpickle
|
||||
+import jsonpickle.ext.gmpy
|
||||
|
||||
|
||||
@pytest.fixture(scope='module', autouse=True)
|
||||
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 29 13:52:24 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- Add patch to enable the gmpy test correctly:
|
||||
* enable_gmpy_test.patch
|
||||
- Disable BuildRequies pandas and scikit-learn in SLE where
|
||||
they're not available and only used for tests
|
||||
- Use python-bson instead of python-pymongo in SLE
|
||||
- Do not search for tests recursively in SLE but explicitly name
|
||||
the directory/files containing tests. This solves an issue
|
||||
building the package without pandas in SLE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 13 16:18:51 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-jsonpickle
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# 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
|
||||
@@ -24,6 +24,7 @@ Summary: Python library for serializing any arbitrary object graph into J
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/jsonpickle/jsonpickle
|
||||
Source: https://files.pythonhosted.org/packages/source/j/jsonpickle/jsonpickle-%{version}.tar.gz
|
||||
Patch1: enable_gmpy_test.patch
|
||||
BuildRequires: %{python_module base >= 3.7}
|
||||
BuildRequires: %{python_module importlib_metadata if %python-base < 3.8}
|
||||
BuildRequires: %{python_module pip}
|
||||
@@ -41,10 +42,14 @@ BuildRequires: %{python_module SQLAlchemy}
|
||||
BuildRequires: %{python_module ecdsa}
|
||||
BuildRequires: %{python_module gmpy2}
|
||||
BuildRequires: %{python_module numpy}
|
||||
%if 0%{?suse_version} >= 1550
|
||||
BuildRequires: %{python_module pandas}
|
||||
BuildRequires: %{python_module pymongo}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module scikit-learn}
|
||||
%else
|
||||
BuildRequires: %{python_module bson}
|
||||
%endif
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module simplejson}
|
||||
BuildRequires: %{python_module ujson}
|
||||
# /SECTION
|
||||
@@ -71,7 +76,11 @@ sed -i 's/ --cov//' pytest.ini
|
||||
donttest="test_multindex_dataframe_roundtrip"
|
||||
# https://github.com/jsonpickle/jsonpickle/issues/460
|
||||
donttest+=" or test_timedelta_index_roundtrip"
|
||||
%if 0%{?suse_version} < 1550
|
||||
%pytest -ra -k "not ($donttest)" tests jsonpickle/pickler.py jsonpickle/unpickler.py jsonpickle/util.py
|
||||
%else
|
||||
%pytest -ra -k "not ($donttest)"
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
|
||||
Reference in New Issue
Block a user