From 853d01aecc54df6967741a6edac6a5499db2a264cfdbaa545efb1ea8dcbadf04 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 21 Sep 2022 07:48:56 +0000 Subject: [PATCH] Accepting request 1005082 from home:jayvdb:branches:devel:languages:python - Activate test suite - Tidy spec OBS-URL: https://build.opensuse.org/request/show/1005082 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=2 --- python-orjson.changes | 6 ++++++ python-orjson.spec | 35 +++++++++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/python-orjson.changes b/python-orjson.changes index 4c09800..ac41fc1 100644 --- a/python-orjson.changes +++ b/python-orjson.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 21 00:35:02 UTC 2022 - John Vandenberg + +- Activate test suite +- Tidy spec + ------------------------------------------------------------------- Wed Jul 13 07:52:11 UTC 2022 - Adrian Schröter diff --git a/python-orjson.spec b/python-orjson.spec index d88216e..94b3bbe 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -1,7 +1,7 @@ # # spec file for package python-orjson # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,25 +21,34 @@ Name: python-orjson Version: 3.7.11 Release: 0 Summary: Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy -License: MIT +License: Apache-2.0 OR MIT URL: https://github.com/ijl/orjson Source: https://files.pythonhosted.org/packages/source/o/orjson/orjson-%{version}.tar.gz Source1: vendor.tar.xz Source2: cargo_config -BuildRequires: python-rpm-macros BuildRequires: %{python_module maturin >= 0.12.19} -BuildRequires: %{python_module wheel} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} -BuildRequires: fdupes +BuildRequires: %{python_module wheel} BuildRequires: cargo-packaging +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pendulum} +BuildRequires: %{python_module psutil} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-dateutil} +BuildRequires: %{python_module pytz} +BuildRequires: %{python_module xxhash} +BuildRequires: timezone +# /SECTION %python_subpackages %description orjson is a fast JSON library for Python. It benchmarks as the fastest Python library for JSON. - %prep %autosetup -a1 -n orjson-%{version} mkdir .cargo @@ -50,10 +59,20 @@ cp %{SOURCE2} .cargo/config %install %pyproject_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +export LANG=en_US.UTF-8 +# Various date tests fail with minor differences in expected output +# test_numpy_array_d1_uintp and test_numpy_array_d1_intp fail on 32bit +# test_memory_loads_keys occasionally fails on crashes on ppc64le +# test_loads_recursion crashes on all platforms +# ppc64 has lots of seg faults +%pytest_arch -rs -k 'not (test_datetime_partial_second_dateutil or test_datetime_partial_second_zoneinfo or test_datetime_partial_second_pendulum_supported or test_datetime_partial_second_pytz or test_datetime_utc_z_with_tz or test_memory_loads_keys or test_loads_recursion or test_numpy_array_d1_uintp or test_numpy_array_d1_intp)' %files %{python_files} %doc README.md -%{python_sitearch}/* +%license LICENSE-APACHE LICENSE-MIT +%{python_sitearch}/orjson* %changelog