2022-09-19 11:18:49 +00:00
#
# spec file for package python-orjson
#
2025-01-10 16:55:16 +00:00
# Copyright (c) 2025 SUSE LLC
2022-09-19 11:18:49 +00:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
2023-06-11 11:37:07 +00:00
%{?sle15_python_module_pythons}
2022-09-19 11:18:49 +00:00
Name : python-orjson
2025-02-07 13:11:05 +00:00
Version : 3.10.15
2022-09-19 11:18:49 +00:00
Release : 0
Summary : Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
2022-09-21 07:48:56 +00:00
License : Apache-2.0 OR MIT
2022-09-19 11:18:49 +00:00
URL : https://github.com/ijl/orjson
2025-01-10 16:55:16 +00:00
# Update: Change version and run `osc rm orjson-*.tar.gz && osc service runall download_files && sh ./devendor-sdist.sh && osc service runall cargo_vendor`
2024-01-15 03:47:22 +00:00
Source0 : orjson-%{version} -devendored.tar.xz
2022-09-19 11:18:49 +00:00
Source1 : vendor.tar.xz
2024-01-15 03:47:22 +00:00
Source2 : https://files.pythonhosted.org/packages/source/o/orjson/orjson-%{version} .tar.gz
Source3 : devendor-sdist.sh
2024-12-02 12:29:44 +00:00
Source4 : PACKAGING_README.md
2024-01-15 03:47:22 +00:00
BuildRequires : %{python_module base >= 3.8}
BuildRequires : %{python_module maturin >= 1}
2022-09-19 11:18:49 +00:00
BuildRequires : %{python_module pip}
BuildRequires : %{python_module setuptools}
2022-09-21 07:48:56 +00:00
BuildRequires : %{python_module wheel}
2022-09-19 11:18:49 +00:00
BuildRequires : cargo-packaging
2022-09-21 07:48:56 +00:00
BuildRequires : fdupes
BuildRequires : python-rpm-macros
# SECTION test requirements
BuildRequires : %{python_module numpy}
BuildRequires : %{python_module psutil}
BuildRequires : %{python_module pytest}
BuildRequires : %{python_module python-dateutil}
BuildRequires : %{python_module pytz}
BuildRequires : %{python_module xxhash}
BuildRequires : timezone
# /SECTION
2022-09-19 11:18:49 +00:00
%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}
%build
%pyproject_wheel
%install
%pyproject_install
2022-09-21 07:48:56 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitearch}
%check
2024-01-15 03:47:22 +00:00
donttest=" b y d e f a u l t n o t h i n g f a i l s "
%ifarch %ix86 %arm32
2022-09-21 07:48:56 +00:00
# test_numpy_array_d1_uintp and test_numpy_array_d1_intp fail on 32bit
2024-01-15 03:47:22 +00:00
donttest=" $ d o n t t e s t o r t e s t _ n u m p y _ a r r a y _ d 1 _ i n t p o r t e s t _ n u m p y _ a r r a y _ d 1 _ u i n t p "
%endif
%ifarch ppc64le
2022-09-21 07:48:56 +00:00
# test_memory_loads_keys occasionally fails on crashes on ppc64le
2024-01-15 03:47:22 +00:00
donttest=" $ d o n t t e s t o r t e s t _ m e m o r y _ l o a d s _ k e y s "
%endif
%pytest_arch -k " n o t ( $ d o n t t e s t ) "
2022-09-19 11:18:49 +00:00
%files %{python_files}
2022-09-21 15:19:34 +00:00
%doc README.md CHANGELOG.md
2022-09-21 07:48:56 +00:00
%license LICENSE-APACHE LICENSE-MIT
2024-01-15 03:47:22 +00:00
%{python_sitearch} /orjson
%{python_sitearch} /orjson-%{version} .dist-info
2022-09-19 11:18:49 +00:00
%changelog