114 lines
5.7 KiB
RPMSpec
114 lines
5.7 KiB
RPMSpec
%global _empty_manifest_terminate_build 0
|
|
Name: python-json-tricks
|
|
Version: 3.15.3
|
|
Release: 1
|
|
Summary: Extra features for Python's JSON: comments, order, numpy, pandas, datetimes, and many more! Simple but customizable.
|
|
License: Revised BSD License (LICENSE.txt)
|
|
URL: https://github.com/mverleg/pyjson_tricks
|
|
Source0: https://files.pythonhosted.org/packages/89/8c/978c4b2a93f71160dcd6f9ccf17cbc08dd3744aa79c61d857a2c58f7810c/json_tricks-3.15.3.tar.gz
|
|
BuildArch: noarch
|
|
|
|
|
|
%description
|
|
The `pyjson-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, pathlib Paths ...
|
|
As well as compression and disallowing duplicate keys.
|
|
* Code: https://github.com/mverleg/pyjson_tricks
|
|
* Documentation: http://json-tricks.readthedocs.org/en/latest/
|
|
* PIP: https://pypi.python.org/pypi/json_tricks
|
|
The 2.0 series added some of the above features and broke backward compatibility. The version 3.0 series is a more readable rewrite that also makes it easier to combine encoders, again not fully backward compatible.
|
|
Several keys of the format ``__keyname__`` have special meanings, and more might be added in future releases.
|
|
If you're considering JSON-but-with-comments as a config file format, have a look at HJSON_, it might be more appropriate. For other purposes, keep reading!
|
|
Thanks for all the Github stars!
|
|
|
|
%package -n python3-json-tricks
|
|
Summary: Extra features for Python's JSON: comments, order, numpy, pandas, datetimes, and many more! Simple but customizable.
|
|
Provides: python-json-tricks
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
%description -n python3-json-tricks
|
|
The `pyjson-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, pathlib Paths ...
|
|
As well as compression and disallowing duplicate keys.
|
|
* Code: https://github.com/mverleg/pyjson_tricks
|
|
* Documentation: http://json-tricks.readthedocs.org/en/latest/
|
|
* PIP: https://pypi.python.org/pypi/json_tricks
|
|
The 2.0 series added some of the above features and broke backward compatibility. The version 3.0 series is a more readable rewrite that also makes it easier to combine encoders, again not fully backward compatible.
|
|
Several keys of the format ``__keyname__`` have special meanings, and more might be added in future releases.
|
|
If you're considering JSON-but-with-comments as a config file format, have a look at HJSON_, it might be more appropriate. For other purposes, keep reading!
|
|
Thanks for all the Github stars!
|
|
|
|
%package help
|
|
Summary: Development documents and examples for json-tricks
|
|
Provides: python3-json-tricks-doc
|
|
%description help
|
|
The `pyjson-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, pathlib Paths ...
|
|
As well as compression and disallowing duplicate keys.
|
|
* Code: https://github.com/mverleg/pyjson_tricks
|
|
* Documentation: http://json-tricks.readthedocs.org/en/latest/
|
|
* PIP: https://pypi.python.org/pypi/json_tricks
|
|
The 2.0 series added some of the above features and broke backward compatibility. The version 3.0 series is a more readable rewrite that also makes it easier to combine encoders, again not fully backward compatible.
|
|
Several keys of the format ``__keyname__`` have special meanings, and more might be added in future releases.
|
|
If you're considering JSON-but-with-comments as a config file format, have a look at HJSON_, it might be more appropriate. For other purposes, keep reading!
|
|
Thanks for all the Github stars!
|
|
|
|
%prep
|
|
%autosetup -n json_tricks-3.15.3
|
|
|
|
%build
|
|
%py3_build
|
|
|
|
%install
|
|
%py3_install
|
|
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
|
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
|
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
|
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
|
|
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
|
|
pushd %{buildroot}
|
|
if [ -d usr/lib ]; then
|
|
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/lib64 ]; then
|
|
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/bin ]; then
|
|
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/sbin ]; then
|
|
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
touch doclist.lst
|
|
if [ -d usr/share/man ]; then
|
|
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
|
|
fi
|
|
popd
|
|
mv %{buildroot}/filelist.lst .
|
|
mv %{buildroot}/doclist.lst .
|
|
|
|
%files -n python3-json-tricks -f filelist.lst
|
|
%dir %{python3_sitelib}/*
|
|
|
|
%files help -f doclist.lst
|
|
%{_docdir}/*
|
|
|
|
%changelog
|
|
* Thu Oct 01 2020 Python_Bot <Python_Bot@openeuler.org>
|
|
- Package Spec generated
|