initial import
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
b444d20df6
commit
e1a7fba2a1
3 changed files with 97 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -0,0 +1 @@
|
||||||
|
/canonicaljson-1.0.0.tar.gz
|
95
python-canonicaljson.spec
Normal file
95
python-canonicaljson.spec
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
%bcond_without check
|
||||||
|
|
||||||
|
%global modname canonicaljson
|
||||||
|
|
||||||
|
Name: python-%{modname}
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: Canonical JSON
|
||||||
|
|
||||||
|
License: ASL 2.0
|
||||||
|
URL: https://github.com/matrix-org/python-canonicaljson
|
||||||
|
Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%global _description \
|
||||||
|
Features:\
|
||||||
|
* Encodes objects and arrays as RFC 7159 JSON.\
|
||||||
|
* Sorts object keys so that you get the same result each time.\
|
||||||
|
* Has no inignificant whitespace to make the output as small as possible.\
|
||||||
|
* Escapes only the characters that must be escaped,\
|
||||||
|
U+0000 to U+0019 / U+0022 / U+0056, to keep the output as small as possible.\
|
||||||
|
* Uses the shortest escape sequence for each escaped character.\
|
||||||
|
* Encodes the JSON as UTF-8.\
|
||||||
|
* Can encode frozendict immutable dictionaries.
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
|
%package -n python2-%{modname}
|
||||||
|
Summary: %{summary}
|
||||||
|
%{?python_provide:%python_provide python2-%{modname}}
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
%if %{with check}
|
||||||
|
BuildRequires: python2-nose
|
||||||
|
BuildRequires: python2-simplejson
|
||||||
|
BuildRequires: python2-frozendict
|
||||||
|
%endif
|
||||||
|
Requires: python2-simplejson
|
||||||
|
Requires: python2-frozendict
|
||||||
|
|
||||||
|
%description -n python2-%{modname} %{_description}
|
||||||
|
|
||||||
|
Python 2 version.
|
||||||
|
|
||||||
|
%package -n python3-%{modname}
|
||||||
|
Summary: %{summary}
|
||||||
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
%if %{with check}
|
||||||
|
BuildRequires: python3-nose
|
||||||
|
BuildRequires: python3-simplejson
|
||||||
|
BuildRequires: python3-frozendict
|
||||||
|
%endif
|
||||||
|
Requires: python3-simplejson
|
||||||
|
Requires: python3-frozendict
|
||||||
|
|
||||||
|
%description -n python3-%{modname} %{_description}
|
||||||
|
|
||||||
|
Python 3 version.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup
|
||||||
|
|
||||||
|
%build
|
||||||
|
%py2_build
|
||||||
|
%py3_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%py2_install
|
||||||
|
%py3_install
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
nosetests-%{python2_version} -v
|
||||||
|
nosetests-%{python3_version} -v
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n python2-%{modname}
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.rst
|
||||||
|
%{python2_sitelib}/%{modname}-*.egg-info/
|
||||||
|
%{python2_sitelib}/%{modname}.py*
|
||||||
|
|
||||||
|
%files -n python3-%{modname}
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.rst
|
||||||
|
%{python3_sitelib}/%{modname}-*.egg-info/
|
||||||
|
%{python3_sitelib}/%{modname}.py
|
||||||
|
%{python3_sitelib}/__pycache__/%{modname}.*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Dec 19 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0.0-1
|
||||||
|
- Initial package
|
1
sources
1
sources
|
@ -0,0 +1 @@
|
||||||
|
SHA512 (canonicaljson-1.0.0.tar.gz) = 2e008d60752a8665a90c72337208f6d2c0b85748f5f2ffefc3922c7cc02253aa8c811c6a18b78066dcc60f97bc0f55fdd34fcb9a1fab41136b1da929325010f5
|
Loading…
Reference in a new issue