Update from upstream

This commit is contained in:
Denis Silakov 2015-10-12 10:55:37 +03:00
parent e0037e9627
commit 05a541d550
3 changed files with 102 additions and 17 deletions

View file

@ -3,5 +3,6 @@ removed_sources:
urllib3-1.7.1.tar.gz: 2defd91cf718c3be3301fb754d9e3acc9f6e5851 urllib3-1.7.1.tar.gz: 2defd91cf718c3be3301fb754d9e3acc9f6e5851
urllib3-1.8.2.tar.gz: a53fa7b7abff9adf3d977d7205ef4f042f5273df urllib3-1.8.2.tar.gz: a53fa7b7abff9adf3d977d7205ef4f042f5273df
urllib3-1.8.3.tar.gz: 00c92b0c3b0756ae3c4e6262d5bc80023dfe9ca3 urllib3-1.8.3.tar.gz: 00c92b0c3b0756ae3c4e6262d5bc80023dfe9ca3
sources:
urllib3-1.9.tar.gz: 9522197efb2a2b49ce804de3a515f06d97b6602f urllib3-1.9.tar.gz: 9522197efb2a2b49ce804de3a515f06d97b6602f
sources:
urllib3-1.10.4.tar.gz: 9e631ca7f850d0d57a7f027d9ff593a80b0f5c96

View file

@ -1,16 +1,31 @@
%define module urllib3 %define module urllib3
Summary: Python HTTP library with thread-safe connection pooling, file post, and more Summary: Python HTTP library with thread-safe connection pooling, file post, and more
Name: python-%{module}
Version: 1.10.4
Release: 1
Source0: https://pypi.python.org/packages/source/u/%{module}/%{module}-%{version}.tar.gz
Source1: ssl_match_hostname_py3.py
Name: python-%{module} License: MIT
Version: 1.9 Group: Development/Python
Release: 2 Url: http://urllib3.readthedocs.org/
Source0: https://pypi.python.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz BuildArch: noarch
License: MIT BuildRequires: pkgconfig(python)
Group: Development/Python BuildRequires: python-setuptools
Url: http://urllib3.readthedocs.org/ Requires: rootcerts
BuildArch: noarch Requires: python-six
BuildRequires: python-devel, python-setuptools #Requires: python-backports-ssl_match_hostname
# For unittests
BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python3-tornado
BuildRequires: python-tornado
BuildRequires: python-nose
BuildRequires: python-mock
#BuildRequires: python-backports-ssl_match_hostname
BuildRequires: python-six
BuildRequires: python3-six
%description %description
There are two critical features missing from the Python standard There are two critical features missing from the Python standard
@ -23,14 +38,82 @@ with each other. They were designed to be independent and standalone,
each solving a different scope of problems, and urllib3 follows in a each solving a different scope of problems, and urllib3 follows in a
similar vein. similar vein.
%package -n python3-%{module}
Summary: Python 3 HTTP library with thread-safe connection pooling, file post, and more
Group: Development/Python
BuildRequires: pkgconfig(python3)
BuildRequires: python3-setuptools
BuildRequires: python3-six
Requires: rootcerts
Requires: python3-six
%description -n python3-%{module}
There are two critical features missing from the Python standard
library: Connection re-using/pooling and file posting. It's not
terribly hard to implement these yourself, but it's much easier to use
a module that already did the work for you.
The Python standard libraries urllib and urllib2 have little to do
with each other. They were designed to be independent and standalone,
each solving a different scope of problems, and urllib3 follows in a
similar vein.
%prep %prep
%setup -q -n %{module}-%{version} %setup -q -n %{module}-%{version}
%install %apply_patches
PYTHONDONTWRITEBYTECODE= %__python setup.py install --root=%{buildroot}
cp -a . %{py3dir}
%build
python setup.py build
pushd %{py3dir}
python3 setup.py build
popd
%install
python setup.py install --skip-build --root %{buildroot}
rm -rf %{buildroot}/%{py_puresitedir}/urllib3/packages/six.py*
rm -rf %{buildroot}/%{py_puresitedir}/urllib3/packages/ssl_match_hostname/
mkdir -p %{buildroot}/%{py_puresitedir}/urllib3/packages/
ln -s ../../six.py %{buildroot}/%{py_puresitedir}/urllib3/packages/six.py
ln -s ../../six.pyc %{buildroot}/%{py_puresitedir}/urllib3/packages/six.pyc
ln -s ../../six.pyo %{buildroot}/%{py_puresitedir}/urllib3/packages/six.pyo
ln -s ../../backports/ssl_match_hostname %{buildroot}/%{py_puresitedir}/urllib3/packages/ssl_match_hostname
# dummyserver is part of the unittest framework
rm -rf %{buildroot}%{py_puresitedir}/dummyserver
pushd %{py3dir}
python3 setup.py install --skip-build --root %{buildroot}
# dummyserver is part of the unittest framework
rm -rf %{buildroot}%{py3_puresitedir}/dummyserver
rm -rf %{buildroot}/%{py3_puresitedir}/urllib3/packages/six.py*
rm -rf %{buildroot}/%{py3_puresitedir}/urllib3/packages/ssl_match_hostname/
mkdir -p %{buildroot}/%{py3_puresitedir}/urllib3/packages/
ln -s ../../six.py %{buildroot}/%{py3_puresitedir}/urllib3/packages/six.py
ln -s ../../six.pyc %{buildroot}/%{py3_puresitedir}/urllib3/packages/six.pyc
ln -s ../../six.pyo %{buildroot}/%{py3_puresitedir}/urllib3/packages/six.pyo
cp %{SOURCE1} %{buildroot}/%{py3_puresitedir}/urllib3/packages/ssl_match_hostname.py
popd
%clean
%files %files
%doc *.txt %doc CHANGES.rst README.rst CONTRIBUTORS.txt
%{py_puresitedir}/urllib3* %{py_puresitedir}/*
%files -n python3-%{module}
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
%{py3_puresitedir}/*

View file

@ -0,0 +1 @@
from ssl import match_hostname, CertificateError