Blame SPECS/python-backports-ssl_match_hostname.spec

bfa9f0
%global module_name backports.ssl_match_hostname
bfa9f0
bfa9f0
Name:           python-backports-ssl_match_hostname
bfa9f0
Version:        3.5.0.1
bfa9f0
Release:        10%{?dist}
bfa9f0
Summary:        The ssl.match_hostname() function from Python 3
bfa9f0
bfa9f0
License:        Python
bfa9f0
URL:            https://bitbucket.org/brandon/backports.ssl_match_hostname
bfa9f0
Source0:        https://pypi.python.org/packages/source/b/%{module_name}/%{module_name}-%{version}.tar.gz
bfa9f0
bfa9f0
BuildArch:      noarch
bfa9f0
BuildRequires:  python2-devel
bfa9f0
bfa9f0
%global _description\
bfa9f0
The Secure Sockets layer is only actually secure if you check the hostname in\
bfa9f0
the certificate returned by the server to which you are connecting, and verify\
bfa9f0
that it matches to hostname that you are trying to reach.\
bfa9f0
\
bfa9f0
But the matching logic, defined in RFC2818, can be a bit tricky to implement on\
bfa9f0
your own. So the ssl package in the Standard Library of Python 3.2 now includes\
bfa9f0
a match_hostname() function for performing this check instead of requiring\
bfa9f0
every application to implement the check separately.\
bfa9f0
\
bfa9f0
This backport brings match_hostname() to users of earlier versions of Python.\
bfa9f0
The actual code is only slightly modified from Python 3.5.\
bfa9f0
bfa9f0
bfa9f0
%description %_description
bfa9f0
bfa9f0
%package -n python2-backports-ssl_match_hostname
bfa9f0
Summary: %summary
bfa9f0
Requires: python2-backports
bfa9f0
Requires: python2-ipaddress
bfa9f0
Provides: python2-backports-ssl_match_hostname
bfa9f0
%{?python_provide:%python_provide python2-backports-ssl_match_hostname}
bfa9f0
bfa9f0
%description -n python2-backports-ssl_match_hostname %_description
bfa9f0
bfa9f0
%prep
bfa9f0
%setup -qn %{module_name}-%{version}
bfa9f0
bfa9f0
cp backports/ssl_match_hostname/README.txt ./
bfa9f0
cp backports/ssl_match_hostname/LICENSE.txt ./
bfa9f0
bfa9f0
%build
bfa9f0
python2 setup.py build
bfa9f0
bfa9f0
%install
bfa9f0
python2 setup.py install --skip-build --root %{buildroot}
bfa9f0
rm -f %{buildroot}%{python2_sitelib}/backports/__init__.py*
bfa9f0
bfa9f0
%files -n python2-backports-ssl_match_hostname
bfa9f0
%{!?_licensedir:%global license %%doc}
bfa9f0
%license LICENSE.txt
bfa9f0
%doc README.txt
bfa9f0
%{python2_sitelib}/backports/ssl_match_hostname/
bfa9f0
%{python2_sitelib}/backports.ssl_match_hostname-%{version}-*egg*
bfa9f0
bfa9f0
%changelog
bfa9f0
* Mon Jul 16 2018 Lumír Balhar <lbalhar@redhat.com> - 3.5.0.1-10
bfa9f0
- First version for python27 module