Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Jeremy Cline
16f86578b1
Update to v1.24.1
This addresses rhbz #1649155
2018-11-13 14:36:52 -05:00
Lukas Slebodnik
4125e169e7
Do not lowercase hostnames with custom-protocol (rhbz 1574684)
upstream: https://github.com/urllib3/urllib3/issues/1267
2018-05-04 10:01:59 -04:00
Jeremy Cline
595de62d4e
Drop PyOpenSSL requirement (rhbz 1567862)
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
2018-04-16 11:28:19 -04:00
Tomas Hoger
0ada5665e8
Fix FTBFS - Move RECENT_DATE to 2017-06-30
As of 2018-01-01, python-urllib3 no longer builds because of the test
suite failure caused by RECENT_DATE not being recent enough.
RECENT_DATE was updated to 2017-06-30 upstream.

https://github.com/shazow/urllib3/issues/1303
4bff1e93d2
2018-04-16 11:26:27 -04:00
Jeremy Cline
ef178eb8c2
Symlink the Python 3 bytecode for six (rbhz 1519147) 2017-12-01 12:15:44 -05:00
3 changed files with 48 additions and 29 deletions

3
.gitignore vendored
View file

@ -19,3 +19,6 @@
/urllib3-1.20.tar.gz
/urllib3-1.21.1.tar.gz
/urllib3-1.22.tar.gz
/urllib3-1.23.tar.gz
/urllib3-1.24.tar.gz
/urllib3-1.24.1.tar.gz

View file

@ -1,14 +1,14 @@
%global srcname urllib3
Name: python-%{srcname}
Version: 1.22
Version: 1.24.1
Release: 2%{?dist}
Summary: Python HTTP library with thread-safe connection pooling and file post
License: MIT
URL: https://github.com/shazow/urllib3
URL: https://github.com/urllib3/urllib3
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
# Used with Python 3.5+
# Unbundle ssl_match_hostname since we depend on it
Source1: ssl_match_hostname_py3.py
BuildArch: noarch
@ -26,7 +26,6 @@ Requires: python-six
Requires: python-backports-ssl_match_hostname
# Secure extra requirements
Requires: python2-pyOpenSSL
Requires: python-cryptography
Requires: python-idna
Requires: python-ipaddress
@ -34,6 +33,7 @@ Requires: python-pysocks
BuildRequires: python2-devel
# For unittests
BuildRequires: python-backports-ssl_match_hostname
BuildRequires: python-nose
BuildRequires: python-nose-exclude
BuildRequires: python-coverage
@ -64,7 +64,6 @@ BuildRequires: python3-tornado
Requires: ca-certificates
Requires: python3-six
Requires: python3-pysocks
Requires: python3-pyOpenSSL
Requires: python3-cryptography
Requires: python3-idna
Requires: python3-pysocks
@ -74,7 +73,7 @@ Python3 HTTP module with connection pooling and file POST abilities.
%prep
%setup -q -n %{srcname}-%{version}
%autosetup -p1 -n %{srcname}-%{version}
# Drop the dummyserver tests in koji. They fail there in real builds, but not
# in scratch builds (weird).
rm -rf test/with_dummyserver/
@ -84,6 +83,10 @@ rm -rf test/appengine/
# to do with Fedora in particular. They don't fail in upstream build infrastructure
rm -rf test/contrib/
# Tests for Python built without SSL, but Fedora builds with SSL. These tests
# fail when combined with the unbundling of backports-ssl_match_hostname
rm -f test/test_no_ssl.py
%build
%py2_build
%py3_build
@ -98,37 +101,31 @@ rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py*
rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname/
mkdir -p %{buildroot}/%{python2_sitelib}/urllib3/packages/
ln -s ../../six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py
ln -s ../../six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc
ln -s ../../six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo
ln -s ../../backports/ssl_match_hostname %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname
ln -s %{python2_sitelib}/six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py
ln -s %{python2_sitelib}/six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc
ln -s %{python2_sitelib}/six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo
ln -s %{python2_sitelib}/backports/ssl_match_hostname \
%{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname
# Unbundle the Python 3 build
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py*
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six*
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
ln -s ../../six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
# urllib3 requires Python 3.5 to use the standard library's match_hostname,
# which we ship in Fedora 26, so we can safely replace the bundled version with
# this stub which imports the necessary objects.
cp %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py
# Copy in six.py just for the test suite.
cp %{python2_sitelib}/six.* %{buildroot}/%{python2_sitelib}/.
cp %{python3_sitelib}/six.* %{buildroot}/%{python3_sitelib}/.
cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py
ln -s %{python3_sitelib}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
%check
py.test
py.test-3
# And after its done, remove our copied in bits
rm -rf %{buildroot}/%{python2_sitelib}/six*
rm -rf %{buildroot}/%{python2_sitelib}/backports*
rm -rf %{buildroot}/%{python3_sitelib}/six*
rm -rf %{buildroot}/%{python3_sitelib}/__pycache__*
pushd test
PYTHONPATH=%{buildroot}%{python2_sitelib}:%{python2_sitelib} %{__python2} -m pytest -v
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v
popd
%files -n python2-%{srcname}
@ -146,6 +143,25 @@ rm -rf %{buildroot}/%{python3_sitelib}/__pycache__*
%changelog
* Tue Nov 13 2018 Jeremy Cline <jeremy@jcline.org> - 1.24.1-2
- Adjust unbundling of ssl_match_hostname
* Mon Oct 29 2018 Jeremy Cline <jeremy@jcline.org> - 1.24.1-1
- Update to v1.24.1
* Thu May 03 2018 Lukas Slebodnik <lslebodn@fedoraproject.org> - 1.22-6
- Do not lowercase hostnames with custom-protocol (rhbz 1567862)
- upstream: https://github.com/urllib3/urllib3/issues/1267
* Mon Apr 16 2018 Jeremy Cline <jeremy@jcline.org> - 1.22-5
- Drop the dependency on PyOpenSSL, it's not needed (rhbz 1567862)
* Thu Jan 25 2018 Tomas Hoger <thoger@redhat.com> - 1.22-4
- Fix FTBFS - Move RECENT_DATE to 2017-06-30
* Fri Dec 01 2017 Jeremy Cline <jeremy@jcline.org> - 1.22-3
- Symlink the Python 3 bytecode for six (rbhz 1519147)
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (urllib3-1.22.tar.gz) = 1b45a4a64e71847a4fc62b9263235d5b05b62076698fa324454efeb7ad065abd702cc9eadb2d396d9270b07e91e9bad94c52a4b9b115aadccb27f81955e6feab
SHA512 (urllib3-1.24.1.tar.gz) = 2f5453cf0ec1b65de9a9fca0fdb45664f7481507c875b7115c063cb177628b4b611377e588508ab8433e0797fc78b60fd3ea5cc5ac0a3f105d36bfff9a56f1f4