Blame python-signedjson.spec

1b74c8c
%bcond_without check
1b74c8c
1b74c8c
%global modname signedjson
1b74c8c
1b74c8c
Name:           python-%{modname}
1b74c8c
Version:        1.0.0
6b95a14
Release:        2%{?dist}
1b74c8c
Summary:        Sign JSON with Ed25519 signatures
1b74c8c
1b74c8c
License:        ASL 2.0
1b74c8c
URL:            https://github.com/matrix-org/python-signedjson
1b74c8c
Source0:        %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz
1b74c8c
1b74c8c
BuildArch:      noarch
1b74c8c
1b74c8c
%global _description \
1b74c8c
Features:\
1b74c8c
* More than one entity can sign the same object.\
1b74c8c
* Each entity can sign the object with more than one key making it easier\
1b74c8c
  to rotate keys\
1b74c8c
* ED25519 can be replaced with a different algorithm.\
1b74c8c
* Unprotected data can be added to the object under the "unsigned" key.
1b74c8c
1b74c8c
%description %{_description}
1b74c8c
1b74c8c
%package -n python2-%{modname}
1b74c8c
Summary:        %{summary}
1b74c8c
%{?python_provide:%python_provide python2-%{modname}}
1b74c8c
BuildRequires:  python2-devel
1b74c8c
BuildRequires:  python2-setuptools
1b74c8c
%if %{with check}
1b74c8c
BuildRequires:  python2-nose
1b74c8c
BuildRequires:  python2-canonicaljson
1b74c8c
BuildRequires:  python2-unpaddedbase64
1b74c8c
BuildRequires:  python2-pynacl
1b74c8c
%endif
1b74c8c
Requires:       python2-canonicaljson
1b74c8c
Requires:       python2-unpaddedbas64
1b74c8c
Requires:       python2-pynacl
1b74c8c
1b74c8c
%description -n python2-%{modname} %{_description}
1b74c8c
1b74c8c
Python 2 version.
1b74c8c
1b74c8c
%package -n python3-%{modname}
1b74c8c
Summary:        %{summary}
1b74c8c
%{?python_provide:%python_provide python3-%{modname}}
1b74c8c
BuildRequires:  python3-devel
1b74c8c
BuildRequires:  python3-setuptools
1b74c8c
%if %{with check}
1b74c8c
BuildRequires:  python3-nose
1b74c8c
BuildRequires:  python3-canonicaljson
1b74c8c
BuildRequires:  python3-unpaddedbase64
1b74c8c
BuildRequires:  python3-pynacl
1b74c8c
%endif
1b74c8c
Requires:       python3-canonicaljson
1b74c8c
Requires:       python3-unpaddedbas64
1b74c8c
Requires:       python3-pynacl
1b74c8c
1b74c8c
%description -n python3-%{modname} %{_description}
1b74c8c
1b74c8c
Python 3 version.
1b74c8c
1b74c8c
%prep
1b74c8c
%autosetup
1b74c8c
1b74c8c
%build
1b74c8c
%py2_build
1b74c8c
%py3_build
1b74c8c
1b74c8c
%install
1b74c8c
%py2_install
1b74c8c
%py3_install
1b74c8c
1b74c8c
%if %{with check}
1b74c8c
%check
1b74c8c
nosetests-%{python2_version} -v
1b74c8c
nosetests-%{python3_version} -v
1b74c8c
%endif
1b74c8c
1b74c8c
%files -n python2-%{modname}
1b74c8c
%license LICENSE
1b74c8c
%doc README.rst
1b74c8c
%{python2_sitelib}/%{modname}-*.egg-info/
1b74c8c
%{python2_sitelib}/%{modname}/
1b74c8c
1b74c8c
%files -n python3-%{modname}
1b74c8c
%license LICENSE
1b74c8c
%doc README.rst
1b74c8c
%{python3_sitelib}/%{modname}-*.egg-info/
1b74c8c
%{python3_sitelib}/%{modname}/
1b74c8c
1b74c8c
%changelog
6b95a14
* Thu Dec 22 2016 Miro HronĨok <mhroncok@redhat.com> - 1.0.0-2
6b95a14
- Rebuild for Python 3.6
6b95a14
1b74c8c
* Mon Dec 19 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0.0-1
1b74c8c
- Initial package