mirror of
https://abf.rosa.ru/djam/python-urllib3.git
synced 2025-02-24 09:42:45 +00:00
fix python naming
This commit is contained in:
parent
52eaa32335
commit
f846488629
1 changed files with 37 additions and 17 deletions
|
@ -9,15 +9,6 @@ Group: Development/Python
|
|||
Url: http://urllib3.readthedocs.org/
|
||||
Source0: https://files.pythonhosted.org/packages/09/06/3bc5b100fe7e878d3dee8f807a4febff1a40c213d2783e3246edde1f3419/urllib3-1.25.8.tar.gz
|
||||
Source1: ssl_match_hostname_py3.py
|
||||
BuildRequires: pkgconfig(python)
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-six
|
||||
# For unittests
|
||||
BuildRequires: python-mock
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python-tornado
|
||||
Requires: python-six
|
||||
Requires: rootcerts
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
|
@ -36,9 +27,38 @@ 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
|
||||
%package -n python2-%{module}
|
||||
Summary: Python 3 HTTP library
|
||||
Group: Development/Python
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-six
|
||||
BuildRequires: pkgconfig(python2)
|
||||
# For unittests
|
||||
BuildRequires: python2-mock
|
||||
BuildRequires: python2-nose
|
||||
BuildRequires: python2-tornado
|
||||
Requires: python2-six
|
||||
Requires: rootcerts
|
||||
|
||||
%description -n python2-%{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 python2-%{module}
|
||||
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
|
||||
%{py_puresitedir}/*
|
||||
%{py2_puresitedir}/*
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
@ -87,17 +107,17 @@ cp -a . %{py3dir}
|
|||
|
||||
%build
|
||||
# Build first the python2 stuff...
|
||||
python setup.py build
|
||||
%{__python2} 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}
|
||||
%{__python2} 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/
|
||||
|
@ -106,15 +126,15 @@ 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
|
||||
ln -s ../../backports/ssl_match_hostname %{buildroot}/%{py2_puresitedir}/urllib3/packages/ssl_match_hostname
|
||||
|
||||
# dummyserver is part of the unittest framework
|
||||
rm -rf %{buildroot}%{py_puresitedir}/dummyserver
|
||||
rm -rf %{buildroot}%{py2_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/
|
||||
|
|
Loading…
Add table
Reference in a new issue