mirror of
https://abf.rosa.ru/djam/python-urllib3.git
synced 2025-02-23 17:22:46 +00:00
1.26.18
This commit is contained in:
parent
b4568bda69
commit
98e4726bc5
2 changed files with 99 additions and 41 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,3 +1,3 @@
|
||||||
sources:
|
sources:
|
||||||
python-urllib3-1.26.4.tar.gz: de7dd51e53e0f87fdc07c863b97647b640af14f2
|
python-urllib3-1.26.18.tar.gz: bffc545083d4fe74a6ce953599c0c2c7012b1833
|
||||||
urllib3-1.26.4.tar.gz: fd72cf88f0437ab0297e39651f6d0ddf04672013
|
urllib3-1.26.4.tar.gz: fd72cf88f0437ab0297e39651f6d0ddf04672013
|
||||||
|
|
|
@ -1,16 +1,27 @@
|
||||||
%define module urllib3
|
%define module urllib3
|
||||||
|
|
||||||
Summary: Python 2 HTTP library
|
Summary: Python HTTP library
|
||||||
Name: python-%{module}
|
Name: python-%{module}
|
||||||
Version: 1.26.4
|
Version: 1.26.18
|
||||||
Release: 1
|
Release: 1
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Python
|
Group: Development/Python
|
||||||
URL: http://urllib3.readthedocs.org/
|
URL: https://urllib3.readthedocs.io
|
||||||
#Source0: https://files.pythonhosted.org/packages/cb/cf/871177f1fc795c6c10787bc0e1f27bb6cf7b81dbde399fd35860472cecbc/urllib3-1.26.4.tar.gz
|
#Source0: https://files.pythonhosted.org/packages/cb/cf/871177f1fc795c6c10787bc0e1f27bb6cf7b81dbde399fd35860472cecbc/urllib3-1.26.4.tar.gz
|
||||||
Source0: https://github.com/urllib3/urllib3/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/urllib3/urllib3/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
Source1: ssl_match_hostname_py3.py
|
Source1: ssl_match_hostname_py3.py
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python-six
|
||||||
|
BuildRequires: pkgconfig(python)
|
||||||
|
# For unittests
|
||||||
|
BuildRequires: python-mock
|
||||||
|
BuildRequires: python-nose
|
||||||
|
BuildRequires: python-tornado
|
||||||
|
Requires: python-six
|
||||||
|
Requires: rootcerts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The urllib3 module is a powerful, sanity-friendly HTTP client for Python. It
|
The urllib3 module is a powerful, sanity-friendly HTTP client for Python. It
|
||||||
|
@ -28,38 +39,9 @@ designed to be independent and standalone, each solving a different scope of
|
||||||
problems, and urllib3 follows in a similar vein.
|
problems, and urllib3 follows in a similar vein.
|
||||||
This package contains the python2 files.
|
This package contains the python2 files.
|
||||||
|
|
||||||
%package -n python2-%{module}
|
|
||||||
#py2_migration_meta python2-%{module}
|
|
||||||
Summary: Python 3 HTTP library
|
|
||||||
Group: Development/Python
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
BuildRequires: python-six
|
|
||||||
BuildRequires: pkgconfig(python)
|
|
||||||
# For unittests
|
|
||||||
BuildRequires: python-mock
|
|
||||||
BuildRequires: python-nose
|
|
||||||
BuildRequires: python-tornado
|
|
||||||
Requires: python2-six
|
|
||||||
Requires: rootcerts
|
|
||||||
|
|
||||||
%description -n python-%{module}
|
%files
|
||||||
The urllib3 module is a powerful, sanity-friendly HTTP client for Python. It
|
%doc CHANGES.rst README.rst
|
||||||
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 python-%{module}
|
|
||||||
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
|
|
||||||
%{py_puresitedir}/*
|
%{py_puresitedir}/*
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
@ -94,32 +76,74 @@ problems, and urllib3 follows in a similar vein.
|
||||||
This package contains the python3 files.
|
This package contains the python3 files.
|
||||||
|
|
||||||
%files -n python3-%{module}
|
%files -n python3-%{module}
|
||||||
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
|
%doc CHANGES.rst README.rst
|
||||||
%{py3_puresitedir}/*
|
%{py3_puresitedir}/*
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
%package -n python38-%{module}
|
||||||
|
Summary: Python 3 HTTP library
|
||||||
|
Group: Development/Python
|
||||||
|
BuildRequires: python38-setuptools
|
||||||
|
BuildRequires: python38-six
|
||||||
|
BuildRequires: python38-devel
|
||||||
|
# For unittests
|
||||||
|
BuildRequires: python38-mock
|
||||||
|
BuildRequires: python38-nose
|
||||||
|
BuildRequires: python38-tornado
|
||||||
|
Requires: python38-six
|
||||||
|
Requires: rootcerts
|
||||||
|
|
||||||
|
%description -n python38-%{module}
|
||||||
|
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 python38-%{module}
|
||||||
|
%doc CHANGES.rst README.rst
|
||||||
|
%{py38_puresitedir}/*
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{module}-%{version}
|
%setup -q -n %{module}-%{version}
|
||||||
#apply_patches
|
#apply_patches
|
||||||
|
|
||||||
# Prepare python3 dirs
|
# Prepare python3 dirs
|
||||||
cp -a . %{py3dir}
|
cp -a . %{py3dir}
|
||||||
|
cp -a . %{py38dir}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Build first the python2 stuff...
|
# Build first the python2 stuff...
|
||||||
%{__python2} setup.py build
|
#{__python2} setup.py build
|
||||||
# ... next the python3 stuff
|
# ... next the python3 stuff
|
||||||
|
%py_build
|
||||||
|
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%{__python3} setup.py build
|
# {__python3} setup.py build
|
||||||
|
%py3_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
pushd %{py38dir}
|
||||||
|
%py38_build
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
################
|
################
|
||||||
# Install first the python2 stuff...
|
# Install first the python2 stuff...
|
||||||
%{__python2} setup.py install --skip-build --root %{buildroot}
|
#{__python2} setup.py install --skip-build --root %{buildroot}
|
||||||
|
%py_install
|
||||||
|
|
||||||
rm -rf %{buildroot}/%{py_puresitedir}/urllib3/packages/six.py*
|
rm -rf %{buildroot}/%{py_puresitedir}/urllib3/packages/six.py*
|
||||||
rm -rf %{buildroot}/%{py_puresitedir}/urllib3/packages/ssl_match_hostname/
|
rm -rf %{buildroot}/%{py_puresitedir}/urllib3/packages/ssl_match_hostname/
|
||||||
|
@ -136,7 +160,8 @@ rm -rf %{buildroot}%{py_puresitedir}/dummyserver
|
||||||
###############
|
###############
|
||||||
# ... next the python3 stuff
|
# ... next the python3 stuff
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
# {__python3} setup.py install --skip-build --root %{buildroot}
|
||||||
|
%py3_install
|
||||||
|
|
||||||
rm -rf %{buildroot}/%{py3_puresitedir}/urllib3/packages/six.py*
|
rm -rf %{buildroot}/%{py3_puresitedir}/urllib3/packages/six.py*
|
||||||
rm -rf %{buildroot}/%{py3_puresitedir}/urllib3/packages/ssl_match_hostname/
|
rm -rf %{buildroot}/%{py3_puresitedir}/urllib3/packages/ssl_match_hostname/
|
||||||
|
@ -151,6 +176,23 @@ pushd %{py3dir}
|
||||||
rm -rf %{buildroot}%{py3_puresitedir}/dummyserver
|
rm -rf %{buildroot}%{py3_puresitedir}/dummyserver
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
pushd %{py38dir}
|
||||||
|
# {__python38} setup.py install --skip-build --root %{buildroot}
|
||||||
|
%py38_install
|
||||||
|
|
||||||
|
rm -rf %{buildroot}/%{py38_puresitedir}/urllib3/packages/six.py*
|
||||||
|
rm -rf %{buildroot}/%{py38_puresitedir}/urllib3/packages/ssl_match_hostname/
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/%{py38_puresitedir}/urllib3/packages/
|
||||||
|
ln -s ../../six.py %{buildroot}/%{py38_puresitedir}/urllib3/packages/six.py
|
||||||
|
ln -s ../../six.pyc %{buildroot}/%{py38_puresitedir}/urllib3/packages/six.pyc
|
||||||
|
ln -s ../../six.pyo %{buildroot}/%{py38_puresitedir}/urllib3/packages/six.pyo
|
||||||
|
cp %{SOURCE1} %{buildroot}/%{py38_puresitedir}/urllib3/packages/ssl_match_hostname.py
|
||||||
|
|
||||||
|
# dummyserver is part of the unittest framework
|
||||||
|
rm -rf %{buildroot}%{py38_puresitedir}/dummyserver
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
%pretrans -p <lua>
|
%pretrans -p <lua>
|
||||||
path = "%{py_puresitedir}/urllib3/packages/ssl_match_hostname"
|
path = "%{py_puresitedir}/urllib3/packages/ssl_match_hostname"
|
||||||
|
@ -181,3 +223,19 @@ if st and st.type == "directory" then
|
||||||
os.rename(path, path .. ".rpmmoved")
|
os.rename(path, path .. ".rpmmoved")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
%pretrans -p <lua> -n python38-%{module}
|
||||||
|
path = "%{py38_puresitedir}/urllib3/packages/ssl_match_hostname"
|
||||||
|
st = posix.stat(path)
|
||||||
|
if st and st.type == "directory" then
|
||||||
|
status = os.rename(path, path .. ".rpmmoved")
|
||||||
|
if not status then
|
||||||
|
suffix = 0
|
||||||
|
while not status do
|
||||||
|
suffix = suffix + 1
|
||||||
|
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||||
|
end
|
||||||
|
os.rename(path, path .. ".rpmmoved")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue