Updated to release 1.25.6

This commit is contained in:
Giovanni Mariani 2019-09-27 18:36:54 +02:00
parent 8f5e65abd1
commit 2d8ddd0178
2 changed files with 58 additions and 44 deletions

View file

@ -1,4 +1,2 @@
removed_sources:
urllib3-1.13.1.tar.gz: 1309e9536c74cdad6d5ab089c83235a687b6d7e6
sources:
urllib3-1.22.tar.gz: 02c623c3bdceda4ef5bffdafdda472d2d9e34ef1
urllib3-1.25.6.tar.gz: 8f289db6fa9c80a165e93c7be44bb8b44b35018b

View file

@ -1,17 +1,18 @@
%define module urllib3
%define module urllib3
Summary: Python HTTP library with thread-safe connection pooling, file post, and more
Summary: Python 2 HTTP library
Name: python-%{module}
Version: 1.22
Version: 1.25.6
Release: 1
License: MIT
Group: Development/Python
Url: http://urllib3.readthedocs.org/
Source0: https://pypi.python.org/packages/source/u/%{module}/%{module}-%{version}.tar.gz
Source1: ssl_match_hostname_py3.py
BuildRequires: pkgconfig(python)
BuildRequires: python-setuptools
BuildRequires: python-six
BuildRequires: pkgconfig(python)
# For unittests
BuildRequires: python-mock
BuildRequires: python-nose
BuildRequires: python-tornado
@ -20,15 +21,20 @@ Requires: rootcerts
BuildArch: noarch
%description
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.
The urllib3 module is a powerful, sanity-friendly HTTP client for Python. It
offers some features that are missing from the Python standard libraries
(urllib and urllib2):
* Thread safety.
* Connection pooling.
* Client-side SSL/TLS verification.
* File uploads with multipart encoding.
* Helpers for retrying requests and dealing with HTTP redirects.
* Support for gzip and deflate encoding.
* Proxy support for HTTP and SOCKS.
The Python standard libraries 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.
This package contains the python2 files.
%files
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
@ -37,7 +43,7 @@ similar vein.
#----------------------------------------------------------------------------
%package -n python3-%{module}
Summary: Python 3 HTTP library with thread-safe connection pooling, file post, and more
Summary: Python 3 HTTP library
Group: Development/Python
BuildRequires: python3-setuptools
BuildRequires: python3-six
@ -45,21 +51,25 @@ BuildRequires: pkgconfig(python3)
# For unittests
BuildRequires: python3-mock
BuildRequires: python3-nose
BuildRequires: python3-six
BuildRequires: python3-tornado
Requires: python3-six
Requires: rootcerts
%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.
The urllib3 module is a powerful, sanity-friendly HTTP client for Python. It
offers some features that are missing from the Python standard libraries
(urllib and urllib2):
* Thread safety.
* Connection pooling.
* Client-side SSL/TLS verification.
* File uploads with multipart encoding.
* Helpers for retrying requests and dealing with HTTP redirects.
* Support for gzip and deflate encoding.
* Proxy support for HTTP and SOCKS.
The Python standard libraries 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.
This package contains the python3 files.
%files -n python3-%{module}
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
@ -69,19 +79,24 @@ similar vein.
%prep
%setup -q -n %{module}-%{version}
#apply_patches
%apply_patches
# Prepare python3 dirs
cp -a . %{py3dir}
%build
python setup.py build
%build
# Build first the python2 stuff...
python setup.py build
# ... next the python3 stuff
pushd %{py3dir}
python3 setup.py build
python3 setup.py build
popd
%install
################
# Install first the python2 stuff...
python setup.py install --skip-build --root %{buildroot}
rm -rf %{buildroot}/%{py_puresitedir}/urllib3/packages/six.py*
@ -96,21 +111,22 @@ ln -s ../../backports/ssl_match_hostname %{buildroot}/%{py_puresitedir}/urllib3/
# dummyserver is part of the unittest framework
rm -rf %{buildroot}%{py_puresitedir}/dummyserver
###############
# ... next the python3 stuff
pushd %{py3dir}
python3 setup.py install --skip-build --root %{buildroot}
python3 setup.py install --skip-build --root %{buildroot}
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
# 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
rm -rf %{buildroot}%{py3_puresitedir}/dummyserver
popd