2018-05-31 16:19:15 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-json_tricks
|
|
|
|
|
#
|
2023-05-17 12:09:44 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2018-05-31 16:19:15 +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.
|
|
|
|
|
|
2018-12-04 13:36:25 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-31 16:19:15 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-04-20 11:42:58 +00:00
|
|
|
%bcond_without python2
|
2018-05-31 16:19:15 +00:00
|
|
|
Name: python-json_tricks
|
2023-05-17 12:09:44 +00:00
|
|
|
Version: 3.16.1
|
2018-05-31 16:19:15 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Extra features for Python's JSON
|
|
|
|
|
License: BSD-3-Clause
|
2019-03-26 14:57:12 +00:00
|
|
|
URL: https://github.com/mverleg/pyjson_tricks
|
2019-09-05 14:00:04 +00:00
|
|
|
Source: https://github.com/mverleg/pyjson_tricks/archive/v%{version}.tar.gz#/pyjson_tricks-%{version}.tar.gz
|
2018-05-31 16:19:15 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-03-26 14:57:12 +00:00
|
|
|
Recommends: python-numpy
|
|
|
|
|
Recommends: python-pandas
|
|
|
|
|
Recommends: python-pytz
|
|
|
|
|
BuildArch: noarch
|
2018-05-31 16:19:15 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module numpy}
|
|
|
|
|
BuildRequires: %{python_module pandas}
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: %{python_module pytz}
|
2020-04-20 11:42:58 +00:00
|
|
|
%if %{with python2}
|
2018-05-31 16:19:15 +00:00
|
|
|
BuildRequires: python-enum34
|
2022-07-15 07:08:18 +00:00
|
|
|
BuildRequires: python-pathlib
|
2020-04-20 11:42:58 +00:00
|
|
|
%endif
|
2018-05-31 16:19:15 +00:00
|
|
|
# /SECTION
|
|
|
|
|
%ifpython2
|
2022-07-15 07:08:18 +00:00
|
|
|
Requires: python-pathlib
|
2018-05-31 16:19:15 +00:00
|
|
|
Recommends: python-enum34
|
|
|
|
|
%endif
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The json_tricks package brings several pieces of functionality to
|
|
|
|
|
python handling of json files:
|
|
|
|
|
|
|
|
|
|
1. Store and load numpy arrays in human-readable format.
|
|
|
|
|
2. Store and load class instances both generic and customized.
|
|
|
|
|
3. Store and load date/times as a dictionary (including timezone).
|
|
|
|
|
4. Preserve map order {} using OrderedDict.
|
|
|
|
|
5. Allow for comments in json files by starting lines with #.
|
|
|
|
|
6. Sets, complex numbers, Decimal, Fraction, enums, compression, duplicate keys, ...
|
|
|
|
|
|
|
|
|
|
As well as compression and disallowing duplicate keys.
|
|
|
|
|
|
|
|
|
|
%prep
|
2019-09-05 14:00:04 +00:00
|
|
|
%setup -q -n pyjson_tricks-%{version}
|
2018-05-31 16:19:15 +00:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2019-03-26 14:57:12 +00:00
|
|
|
%pytest
|
2018-05-31 16:19:15 +00:00
|
|
|
|
|
|
|
|
%files %{python_files}
|
2023-05-17 12:09:44 +00:00
|
|
|
%doc README.md
|
2018-05-31 16:19:15 +00:00
|
|
|
%license LICENSE.txt
|
2022-07-15 07:08:18 +00:00
|
|
|
%{python_sitelib}/json_tricks
|
|
|
|
|
%{python_sitelib}/json_tricks-%{version}*-info
|
2018-05-31 16:19:15 +00:00
|
|
|
|
|
|
|
|
%changelog
|