e2c260
%global srcname urllib3
e2c260
d2ba83
# When bootstrapping Python, we cannot test this yet
d2ba83
%bcond_without tests
d2ba83
e2c260
Name:           python-%{srcname}
Jeremy Cline 17996d
Version:        1.25.3
Jeremy Cline f032b5
Release:        2%{?dist}
e2c260
Summary:        Python HTTP library with thread-safe connection pooling and file post
e2c260
e2c260
License:        MIT
Jeremy Cline 9c6ea1
URL:            https://github.com/urllib3/urllib3
821ff0
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
Jeremy Cline 9c6ea1
# Unbundle ssl_match_hostname since we depend on it
Jeremy Cline 442517
Source1:        ssl_match_hostname_py3.py
e2c260
BuildArch:      noarch
e2c260
Jeremy Cline 17996d
# Merged upstream, compatibility with latest pytest
Jeremy Cline 17996d
Patch0:         1614.patch
Jeremy Cline 17996d
bc8615
%description
bc8615
Python HTTP module with connection pooling and file POST abilities.
bc8615
bc8615
%package -n python2-%{srcname}
bc8615
Summary:        Python2 HTTP library with thread-safe connection pooling and file post
bc8615
%{?python_provide:%python_provide python2-%{srcname}}
bc8615
e2c260
Requires:       ca-certificates
e2c260
f611c7
# Previously bundled things:
31b337
Requires:       python2-six
31b337
Requires:       python2-backports-ssl_match_hostname
821ff0
821ff0
# Secure extra requirements
Jeremy Cline 17996d
Requires:       python2-idna
31b337
Requires:       python2-ipaddress
31b337
Requires:       python2-pysocks
059737
e2c260
BuildRequires:  python2-devel
e2c260
bc8615
%description -n python2-%{srcname}
bc8615
Python2 HTTP module with connection pooling and file POST abilities.
bc8615
821ff0
821ff0
%package -n python3-%{srcname}
bc8615
Summary:        Python3 HTTP library with thread-safe connection pooling and file post
bc8615
821ff0
BuildRequires:  python3-devel
d2ba83
%if %{with tests}
821ff0
BuildRequires:  python3-nose
821ff0
BuildRequires:  python3-mock
821ff0
BuildRequires:  python3-six
821ff0
BuildRequires:  python3-pysocks
bda193
BuildRequires:  python3-pytest
821ff0
BuildRequires:  python3-tornado
Jeremy Cline 17996d
BuildRequires:  python3-idna
d2ba83
%endif
059737
059737
Requires:       ca-certificates
Jeremy Cline 17996d
Requires:       python3-idna
821ff0
Requires:       python3-six
821ff0
Requires:       python3-pysocks
821ff0
821ff0
%description -n python3-%{srcname}
e2c260
Python3 HTTP module with connection pooling and file POST abilities.
e2c260
e2c260
e2c260
%prep
Jeremy Cline 9c6ea1
%autosetup -p1 -n %{srcname}-%{version}
b73a1a
# Drop the dummyserver tests in koji.  They fail there in real builds, but not
b73a1a
# in scratch builds (weird).
b73a1a
rm -rf test/with_dummyserver/
da96ff
# Don't run the Google App Engine tests
da96ff
rm -rf test/appengine/
821ff0
# Lots of these tests started failing, even for old versions, so it has something
821ff0
# to do with Fedora in particular. They don't fail in upstream build infrastructure
821ff0
rm -rf test/contrib/
a1d2b3
Jeremy Cline 9c6ea1
# Tests for Python built without SSL, but Fedora builds with SSL. These tests
Jeremy Cline 9c6ea1
# fail when combined with the unbundling of backports-ssl_match_hostname
Jeremy Cline 9c6ea1
rm -f test/test_no_ssl.py
Jeremy Cline 9c6ea1
e2c260
%build
821ff0
%py2_build
821ff0
%py3_build
e2c260
e2c260
e2c260
%install
821ff0
%py2_install
821ff0
%py3_install
f611c7
821ff0
# Unbundle the Python 2 build
f611c7
rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py*
Jeremy Cline 442517
rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname/
f611c7
f611c7
mkdir -p %{buildroot}/%{python2_sitelib}/urllib3/packages/
Jeremy Cline 9c6ea1
ln -s %{python2_sitelib}/six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py
Jeremy Cline 9c6ea1
ln -s %{python2_sitelib}/six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc
Jeremy Cline 9c6ea1
ln -s %{python2_sitelib}/six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo
Jeremy Cline 442517
ln -s %{python2_sitelib}/backports/ssl_match_hostname \
Jeremy Cline 442517
      %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname
e2c260
821ff0
# Unbundle the Python 3 build
f611c7
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py*
a4ea2a
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six*
Jeremy Cline 442517
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
f611c7
f611c7
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
Jeremy Cline 442517
cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py
Jeremy Cline 9c6ea1
ln -s %{python3_sitelib}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
Jeremy Cline 9c6ea1
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \
Jeremy Cline 9c6ea1
      %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
Jeremy Cline 9c6ea1
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
Jeremy Cline 9c6ea1
      %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
f611c7
e2c260
d2ba83
%if %{with tests}
e2c260
%check
Jeremy Cline 9c6ea1
pushd test
Jeremy Cline 9c6ea1
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v
Jeremy Cline 9c6ea1
popd
d2ba83
%endif
e2c260
e2c260
bc8615
%files -n python2-%{srcname}
149e0e
%license LICENSE.txt
149e0e
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
f611c7
%{python2_sitelib}/urllib3/
f611c7
%{python2_sitelib}/urllib3-*.egg-info
e2c260
821ff0
821ff0
%files -n python3-%{srcname}
149e0e
%license LICENSE.txt
821ff0
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
f611c7
%{python3_sitelib}/urllib3/
f611c7
%{python3_sitelib}/urllib3-*.egg-info
821ff0
e2c260
e2c260
%changelog
Jeremy Cline f032b5
* Tue May 28 2019 Jeremy Cline <jcline@redhat.com> - 1.25.3-2
Jeremy Cline f032b5
- Drop the Python 2 tests since Tornado is going away
Jeremy Cline f032b5
Jeremy Cline 17996d
* Tue May 28 2019 Jeremy Cline <jcline@redhat.com> - 1.25.3-1
Jeremy Cline 17996d
- Update to 1.25.3
Jeremy Cline 17996d
4a6b9a
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.24.1-3
4a6b9a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4a6b9a
Jeremy Cline 442517
* Tue Nov 13 2018 Jeremy Cline <jeremy@jcline.org> - 1.24.1-2
Jeremy Cline 442517
- Adjust unbundling of ssl_match_hostname
Jeremy Cline 442517
Jeremy Cline 9c6ea1
* Mon Oct 29 2018 Jeremy Cline <jeremy@jcline.org> - 1.24.1-1
Jeremy Cline 9c6ea1
- Update to v1.24.1
Jeremy Cline 9c6ea1
da5d9b
* Wed Jun 20 2018 Lumír Balhar <lbalhar@redhat.com> - 1.23-4
da5d9b
- Removed unneeded dependency python[23]-psutil
da5d9b
5a1804
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.23-3
5a1804
- Rebuilt for Python 3.7
5a1804
ab1886
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 1.23-2
ab1886
- Bootstrap for Python 3.7
ab1886
Jeremy Cline 0b513a
* Tue Jun 05 2018 Jeremy Cline <jeremy@jcline.org> - 1.23-1
Jeremy Cline 0b513a
- Update to the latest upstream release (rhbz 1586072)
Jeremy Cline 0b513a
Jeremy Cline 090563
* Wed May 30 2018 Jeremy Cline <jeremy@jcline.org> - 1.22-10
Jeremy Cline 090563
- Backport patch to support Python 3.7 (rhbz 1584112)
Jeremy Cline 090563
f9db92
* Thu May 03 2018 Lukas Slebodnik <lslebodn@fedoraproject.org> - 1.22-9
f9db92
- Do not lowercase hostnames with custom-protocol (rhbz 1567862)
f9db92
- upstream: https://github.com/urllib3/urllib3/issues/1267
f9db92
f545e5
* Wed Apr 18 2018 Jeremy Cline <jeremy@jcline.org> - 1.22-8
f545e5
- Drop the dependency on idna and cryptography (rhbz 1567862)
f545e5
2b8e0c
* Mon Apr 16 2018 Jeremy Cline <jeremy@jcline.org> - 1.22-7
2b8e0c
- Drop the dependency on PyOpenSSL, it's not needed (rhbz 1567862)
2b8e0c
ff1ca8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-6
ff1ca8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ff1ca8
31b337
* Wed Jan 31 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.22-5
31b337
- Update Python 2 dependency declarations to new packaging standards
31b337
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
31b337
9b8418
* Thu Jan 25 2018 Tomas Hoger <thoger@redhat.com> - 1.22-4
9b8418
- Fix FTBFS - Move RECENT_DATE to 2017-06-30
9b8418
a4ea2a
* Fri Dec 01 2017 Jeremy Cline <jeremy@jcline.org> - 1.22-3
a4ea2a
- Symlink the Python 3 bytecode for six (rbhz 1519147)
a4ea2a
cd3011
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-2
cd3011
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cd3011
d5c3e0
* Fri Jul 21 2017 Jeremy Cline <jeremy@jcline.org> - 1.22-1
d5c3e0
- Update to 1.22 (#1473293)
d5c3e0
ebed52
* Wed May 17 2017 Jeremy Cline <jeremy@jcline.org> - 1.21.1-1
ebed52
- Update to 1.21.1 (#1445280)
ebed52
6a3f48
* Thu Feb 09 2017 Jeremy Cline <jeremy@jcline.org> - 1.20-1
6a3f48
- Update to 1.20 (#1414775)
6a3f48
f7d96a
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 1.19.1-2
f7d96a
- Rebuild for Python 3.6
a103d6
821ff0
* Thu Nov 17 2016 Jeremy Cline <jeremy@jcline.org> 1.19.1-1
821ff0
- Update to 1.19.1
821ff0
- Clean up the specfile to only support Fedora 26
821ff0
66b449
* Wed Aug 10 2016 Kevin Fenzi <kevin@scrye.com> - 1.16-3
66b449
- Rebuild now that python-requests is ready to update.
66b449
57ee1a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-2
57ee1a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
57ee1a
073146
* Wed Jun 15 2016 Kevin Fenzi <kevin@scrye.com> - 1.16-1
073146
- Update to 1.16
073146
bc8615
* Thu Jun 02 2016 Ralph Bean <rbean@redhat.com> - 1.15.1-3
bc8615
- Create python2 subpackage to comply with guidelines.
bc8615
646b32
* Wed Jun 01 2016 Ralph Bean <rbean@redhat.com> - 1.15.1-2
646b32
- Remove broken symlinks to unbundled python3-six files
646b32
  https://bugzilla.redhat.com/show_bug.cgi?id=1295015
646b32
059737
* Fri Apr 29 2016 Ralph Bean <rbean@redhat.com> - 1.15.1-1
059737
- Removed patch for ipv6 support, now applied upstream.
059737
- Latest version.
059737
- New dep on pysocks.
059737
baa577
* Fri Feb 26 2016 Ralph Bean <rbean@redhat.com> - 1.13.1-3
baa577
- Apply patch from upstream to fix ipv6.
baa577
84fceb
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.1-2
84fceb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
84fceb
948bea
* Mon Dec 21 2015 Ralph Bean <rbean@redhat.com> - 1.13.1-1
948bea
- new version
948bea
298ec5
* Fri Dec 18 2015 Ralph Bean <rbean@redhat.com> - 1.13-1
298ec5
- new version
298ec5
5e3e64
* Mon Dec 14 2015 Ralph Bean <rbean@redhat.com> - 1.12-1
5e3e64
- new version
5e3e64
Robert Kuska 9cbc25
* Thu Oct 15 2015 Robert Kuska <rkuska@redhat.com> - 1.10.4-7
Robert Kuska 9cbc25
- Rebuilt for Python3.5 rebuild
Robert Kuska 9cbc25
a8898e
* Sat Oct 10 2015 Ralph Bean <rbean@redhat.com> - 1.10.4-6
a8898e
- Sync from PyPI instead of a git checkout.
a8898e
762324
* Tue Sep 08 2015 Ralph Bean <rbean@redhat.com> - 1.10.4-5.20150503gita91975b
762324
- Drop requirement on python-backports-ssl_match_hostname on F22 and newer.
762324
d15a22
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.4-4.20150503gita91975b
d15a22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d15a22
a1d2b3
* Mon Jun 08 2015 Ralph Bean <rbean@redhat.com> - 1.10.4-3.20150503gita91975b
a1d2b3
- Apply pyopenssl injection for an outdated cpython as per upstream advice
a1d2b3
  https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning
a1d2b3
  https://urllib3.readthedocs.org/en/latest/security.html#pyopenssl
a1d2b3
7e1581
* Tue May 19 2015 Ralph Bean <rbean@redhat.com> - 1.10.4-2.20150503gita91975b
7e1581
- Specify symlinks for six.py{c,o}, fixing rhbz #1222142.
7e1581
7e1581
* Sun May 03 2015 Ralph Bean <rbean@redhat.com> - 1.10.4-1.20150503gita91975b
65b036
- Latest release for python-requests-2.7.0
65b036
98fa60
* Wed Apr 29 2015 Ralph Bean <rbean@redhat.com> - 1.10.3-2.20150429git585983a
98fa60
- Grab a git snapshot to get around this chunked encoding failure.
817aac
9dff84
* Wed Apr 22 2015 Ralph Bean <rbean@redhat.com> - 1.10.3-1
9dff84
- new version
9dff84
db79cb
* Thu Feb 26 2015 Ralph Bean <rbean@redhat.com> - 1.10.2-1
db79cb
- new version
db79cb
5ce430
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 1.10.1-1
5ce430
- new version
5ce430
39487a
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 1.10.1-1
39487a
- new version
39487a
a641ca
* Mon Jan 05 2015 Ralph Bean <rbean@redhat.com> - 1.10-2
a641ca
- Copy in a shim for ssl_match_hostname on python3.
a641ca
f611c7
* Sun Dec 14 2014 Ralph Bean <rbean@redhat.com> - 1.10-1
f611c7
- Latest upstream 1.10, for python-requests-2.5.0.
f611c7
- Re-do unbundling without patch, with symlinks.
f611c7
- Modernize python2 macros.
2d1020
- Remove the with_dummyserver tests which fail only sometimes.
f611c7
196058
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 1.9.1-1
196058
- Latest upstream, 1.9.1 for latest python-requests.
196058
149e0e
* Mon Aug  4 2014 Tom Callaway <spot@fedoraproject.org> - 1.8.2-4
149e0e
- fix license handling
149e0e
90da22
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-3
90da22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
90da22
b8e7d5
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.8.2-2
b8e7d5
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
b8e7d5
131a80
* Mon Apr 21 2014 Arun S A G <sagarun@gmail.com> - 1.8.2-1
131a80
- Update to latest upstream version
131a80
467067
* Mon Oct 28 2013 Ralph Bean <rbean@redhat.com> - 1.7.1-2
467067
- Update patch to find ca_certs in the correct location.
467067
4a646b
* Wed Sep 25 2013 Ralph Bean <rbean@redhat.com> - 1.7.1-1
4a646b
- Latest upstream with support for a new timeout class and py3.4.
4a646b
89b180
* Wed Aug 28 2013 Ralph Bean <rbean@redhat.com> - 1.7-3
89b180
- Bump release again, just to push an unpaired update.
89b180
e709c8
* Mon Aug 26 2013 Ralph Bean <rbean@redhat.com> - 1.7-2
e709c8
- Bump release to pair an update with python-requests.
e709c8
1563f3
* Thu Aug 22 2013 Ralph Bean <rbean@redhat.com> - 1.7-1
1563f3
- Update to latest upstream.
1563f3
- Removed the accept-header proxy patch which is included in upstream now.
1563f3
- Removed py2.6 compat patch which is included in upstream now.
1563f3
da55d7
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-7
da55d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
da55d7
f54a32
* Tue Jun 11 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.5-6
f54a32
- Fix Requires of python-ordereddict to only apply to RHEL
f54a32
750fa8
* Fri Mar  1 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.5-5
750fa8
- Unbundling finished!
750fa8
23a06f
* Fri Mar 01 2013 Ralph Bean <rbean@redhat.com> - 1.5-4
23a06f
- Upstream patch to fix Accept header when behind a proxy.
23a06f
- Reorganize patch numbers to more clearly distinguish them.
23a06f
e2c260
* Wed Feb 27 2013 Ralph Bean <rbean@redhat.com> - 1.5-3
e2c260
- Renamed patches to python-urllib3-*
e2c260
- Fixed ssl check patch to use the correct cert path for Fedora.
e2c260
- Included dependency on ca-certificates
e2c260
- Cosmetic indentation changes to the .spec file.
e2c260
e2c260
* Tue Feb  5 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.5-2
e2c260
- python3-tornado BR and run all unittests on python3
e2c260
e2c260
* Mon Feb 04 2013 Toshio Kuratomi <toshio@fedoraproject.org> 1.5-1
e2c260
- Initial fedora build.