You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-service-identity/python-service-identity.spec

174 lines
5.1 KiB

10 years ago
%if 0%{?fedora}
%global with_python3 1
%endif
Name: python-service-identity
Version: 16.0.0
Release: 2%{?dist}
10 years ago
Summary: Service identity verification for pyOpenSSL
License: MIT
URL: https://github.com/pyca/service_identity
Source0: https://pypi.io/packages/source/s/service_identity/service_identity-%{version}.tar.gz
10 years ago
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
%if 0%{?fedora} > 20
# Fedora 20 doesn't have a new enough version of pytest,
# so skip running the tests there.
# For tests
BuildRequires: pytest >= 2.5
BuildRequires: python-attrs
10 years ago
BuildRequires: python-pyasn1
BuildRequires: python-pyasn1-modules
BuildRequires: pyOpenSSL >= 0.12
BuildRequires: python-idna
%endif # fedora > 20
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%if 0%{?fedora} > 20
# For tests
BuildRequires: python3-pytest >= 2.5
BuildRequires: python3-attrs
10 years ago
BuildRequires: python3-pyasn1
BuildRequires: python3-pyasn1-modules
BuildRequires: python3-pyOpenSSL >= 0.12
BuildRequires: python3-idna
%endif # fedora > 20
%endif # with_python3
Requires: python-attrs
10 years ago
Requires: python-pyasn1
Requires: python-pyasn1-modules
Requires: pyOpenSSL >= 0.12
Requires: python-idna
%if 0%{?with_python3}
%package -n python3-service-identity
Summary: Logging as Storytelling
Requires: python3-six
Requires: python3-attrs
10 years ago
Requires: python3-pyasn1
Requires: python3-pyasn1-modules
Requires: python3-pyOpenSSL >= 0.12
Requires: python3-idna
%endif # with_python3
%description
Service Identity Verification for pyOpenSSL
TL;DR: Use this package if you use pyOpenSSL and dont want to be MITMed.
service_identity aspires to give you all the tools you need for verifying
whether a certificate is valid for the intended purposes.
In the simplest case, this means host name verification. However,
service_identity implements RFC 6125 fully and plans to add other relevant RFCs
too.
%if 0%{?with_python3}
%description -n python3-service-identity
Service Identity Verification for pyOpenSSL
TL;DR: Use this package if you use pyOpenSSL and dont want to be MITMed.
service_identity aspires to give you all the tools you need for verifying
whether a certificate is valid for the intended purposes.
In the simplest case, this means host name verification. However,
service_identity implements RFC 6125 fully and plans to add other relevant RFCs
too.
%endif # with_python3
%prep
%setup -q -n service_identity-%{version}
# Remove bundled egg-info
rm -rf service_identity.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3
%if 0%{?fedora} > 20
%check
# https://bitbucket.org/hpk42/pytest/issue/539/pytest-doctest-modules-fails-if-python
echo "collect_ignore = ['build']" >> conftest.py
PYTHONPATH="%{buildroot}/%{python2_sitelib}" py.test --doctest-modules --doctest-glob='*.rst'
10 years ago
%if 0%{?with_python3}
pushd %{py3dir}
# https://bitbucket.org/hpk42/pytest/issue/539/pytest-doctest-modules-fails-if-python
echo "collect_ignore = ['build']" >> conftest.py
PYTHONPATH="%{buildroot}/%{python3_sitelib}" py.test-3 --doctest-modules --doctest-glob='*.rst'
10 years ago
popd
%endif # with_python3
%endif # fedora > 20
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif # with_python3
%{__python2} setup.py install --skip-build --root %{buildroot}
%files
%doc README.rst LICENSE
%{python2_sitelib}/service_identity
%{python2_sitelib}/service_identity-%{version}-py%{python2_version}.egg-info
%if 0%{?with_python3}
%files -n python3-service-identity
%doc README.rst LICENSE
%{python3_sitelib}/service_identity
%{python3_sitelib}/service_identity-%{version}-py%{python3_version}.egg-info
%endif # with_python3
%changelog
* Mon Oct 17 2016 Tom Prince <tom.prince@twistedmatrix.com> - 16.0.0-2
- Use python3 to test python3 package.
- Fix dependencies.
* Mon Oct 17 2016 Tom Prince <tom.prince@twistedmatrix.com> - 16.0.0-1
- Update source URL for pypi migration. (#1361604)
- Build new version
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.0.0-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 14.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
10 years ago
* Thu Jan 22 2015 robyduck@fedoraproject.org - 14.0.0-1
- Build new version
* Sat Jul 12 2014 tom.prince@twistedmatrix.com - 1.0.0-2
- Add python-idna dependency.
* Sat Jul 12 2014 tom.prince@twistedmatrix.com - 1.0.0-1
- Initial package.