7a35717
%bcond_without check
7a35717
7a35717
%global modname service-identity
7a35717
%global srcname service_identity
7a35717
7a35717
%if 0%{?rhel} && 0%{?rhel} <= 7
7a35717
%bcond_with python3
7a35717
%else
7a35717
%bcond_without python3
621f734
%endif
621f734
7a35717
Name:           python-%{modname}
Tom Prince ed6f581
Version:        16.0.0
63786d7
Release:        9%{?dist}
621f734
Summary:        Service identity verification for pyOpenSSL
621f734
621f734
License:        MIT
621f734
URL:            https://github.com/pyca/service_identity
7a35717
Source0:        %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
7a35717
621f734
BuildArch:      noarch
621f734
7a35717
%global _description \
7a35717
Service Identity Verification for pyOpenSSL.\
7a35717
\
7a35717
TL;DR: Use this package if you use pyOpenSSL and don’t want to be MITMed.\
7a35717
\
7a35717
service_identity aspires to give you all the tools you need for verifying\
7a35717
whether a certificate is valid for the intended purposes.\
7a35717
\
7a35717
In the simplest case, this means host name verification. However,\
7a35717
service_identity implements RFC 6125 fully and plans to add other\
7a35717
relevant RFCs too.
7a35717
7a35717
%description %{_description}
7a35717
7a35717
%package -n python2-%{modname}
7a35717
Summary:        %{summary}
7a35717
%{?python_provide:%python_provide python2-%{modname}}
621f734
BuildRequires:  python2-devel
7a35717
BuildRequires:  python2-setuptools
7a35717
%if %{with check}
7a35717
BuildRequires:  python2-pytest
7a35717
BuildRequires:  python2-attrs
7a35717
BuildRequires:  python2-pyasn1
7a35717
BuildRequires:  python2-pyasn1-modules
7a35717
BuildRequires:  python2-pyOpenSSL
7a35717
BuildRequires:  python2-idna
7a35717
%endif
7a35717
Requires:       python2-attrs
7a35717
Requires:       python2-pyasn1
7a35717
Requires:       python2-pyasn1-modules
7a35717
Requires:       python2-pyOpenSSL
7a35717
Recommends:     python2-idna
7a35717
7a35717
%description -n python2-%{modname} %{_description}
7a35717
7a35717
Python 2 version.
7a35717
7a35717
%if %{with python3}
7a35717
%package -n python3-%{modname}
7a35717
Summary:        %{summary}
7a35717
%{?python_provide:%python_provide python3-%{modname}}
621f734
BuildRequires:  python3-devel
621f734
BuildRequires:  python3-setuptools
7a35717
%if %{with check}
7a35717
BuildRequires:  python3-pytest
Tom Prince 6fe9373
BuildRequires:  python3-attrs
621f734
BuildRequires:  python3-pyasn1
621f734
BuildRequires:  python3-pyasn1-modules
7a35717
BuildRequires:  python3-pyOpenSSL
621f734
BuildRequires:  python3-idna
7a35717
%endif
Tom Prince 6fe9373
Requires:       python3-attrs
621f734
Requires:       python3-pyasn1
621f734
Requires:       python3-pyasn1-modules
7a35717
Requires:       python3-pyOpenSSL
7a35717
Recommends:     python3-idna
621f734
7a35717
%description -n python3-%{modname} %{_description}
621f734
7a35717
Python 3 version.
7a35717
%endif
621f734
621f734
%prep
7a35717
%autosetup -n %{srcname}-%{version}
621f734
621f734
%build
7a35717
%py2_build
7a35717
%if %{with python3}
7a35717
%py3_build
7a35717
%endif
621f734
621f734
%install
7a35717
%py2_install
7a35717
%if %{with python3}
7a35717
%py3_install
7a35717
%endif
621f734
7a35717
%if %{with check}
7a35717
%check
7a35717
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -v
7a35717
%if %{with python3}
7a35717
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v
7a35717
%endif
7a35717
%endif
621f734
7a35717
%files -n python2-%{modname}
7a35717
%license LICENSE
7a35717
%doc README.rst
7a35717
%{python2_sitelib}/%{srcname}-*.egg-info/
7a35717
%{python2_sitelib}/%{srcname}/
7a35717
7a35717
%if %{with python3}
7a35717
%files -n python3-%{modname}
7a35717
%license LICENSE
7a35717
%doc README.rst
7a35717
%{python3_sitelib}/%{srcname}-*.egg-info/
7a35717
%{python3_sitelib}/%{srcname}/
7a35717
%endif
621f734
621f734
%changelog
63786d7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.0-9
63786d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
63786d7
ec9bae2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.0-8
ec9bae2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ec9bae2
679cd2c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.0-7
679cd2c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
679cd2c
f96488c
* Thu Dec 22 2016 Miro Hrončok <mhroncok@redhat.com> - 16.0.0-6
f96488c
- Rebuild for Python 3.6
f96488c
7a35717
* Mon Dec 19 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 16.0.0-5
7a35717
- Modernize spec
7a35717
945debd
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 16.0.0-4
945debd
- Enable tests
945debd
945debd
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 16.0.0-3
641cab5
- Rebuild for Python 3.6
641cab5
- Disable python3 tests for now
641cab5
Tom Prince 6fe9373
* Mon Oct 17 2016 Tom Prince <tom.prince@twistedmatrix.com> - 16.0.0-2
Tom Prince 6fe9373
- Use python3 to test python3 package.
Tom Prince 6fe9373
- Fix dependencies.
Tom Prince 6fe9373
Tom Prince ed6f581
* Mon Oct 17 2016 Tom Prince <tom.prince@twistedmatrix.com> - 16.0.0-1
Tom Prince c5e1c88
- Update source URL for pypi migration. (#1361604)
Tom Prince ed6f581
- Build new version
Tom Prince c5e1c88
898b66b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.0.0-5
898b66b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
898b66b
8dfa5c5
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 14.0.0-4
8dfa5c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8dfa5c5
2b6213e
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.0.0-3
2b6213e
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
2b6213e
d3b90e1
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.0.0-2
d3b90e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d3b90e1
621f734
* Thu Jan 22 2015 robyduck@fedoraproject.org - 14.0.0-1
621f734
- Build new version
621f734
621f734
* Sat Jul 12 2014 tom.prince@twistedmatrix.com - 1.0.0-2
621f734
- Add python-idna dependency.
621f734
621f734
* Sat Jul 12 2014 tom.prince@twistedmatrix.com - 1.0.0-1
621f734
- Initial package.