forked from pool/python-jsonpickle
Accepting request 1136563 from home:alarrosa:branches:devel:languages:python
- 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. OBS-URL: https://build.opensuse.org/request/show/1136563 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpickle?expand=0&rev=30
This commit is contained in:
@@ -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