06f8836
%global __python2 /usr/bin/python2.6
06f8836
%global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")
e2c2602
e2c2602
%global srcname urllib3
e2c2602
06f8836
Name:           python-urllib3
06f8836
Version:        1.5
06f8836
Release:        8%{?dist}
e2c2602
Summary:        Python HTTP library with thread-safe connection pooling and file post
e2c2602
06f8836
Group:          Development/Languages
e2c2602
License:        MIT
e2c2602
URL:            http://urllib3.readthedocs.org/
e2c2602
Source0:        http://pypi.python.org/packages/source/u/%{srcname}/%{srcname}-%{version}.tar.gz
23a06f9
06f8836
# Patch to change default behaviour to check SSL certs for validity
06f8836
# https://bugzilla.redhat.com/show_bug.cgi?id=855320
06f8836
# https://bugzilla.redhat.com/show_bug.cgi?id=1124060
06f8836
Patch0:         python-urllib3-default-ssl-cert-validate-el5.patch
06f8836
e2c2602
### TODO: Send this to upstream urllib3
e2c2602
# make all imports of things in packages try system copies first
06f8836
Patch1:         python-urllib3-unbundle.patch
23a06f9
06f8836
# Fix accept header when behind a proxy
06f8836
#https://github.com/shazow/urllib3/pull/93
06f8836
#https://github.com/shazow/urllib3/pull/93.patch
06f8836
Patch2:         python-urllib3-accept-header-for-proxy.patch
e2c2602
06f8836
BuildRoot:      %{_tmppath}/%{srcname}-%{version}-%{release}-root-%(%{__id_u} -n)
e2c2602
BuildArch:      noarch
e2c2602
06f8836
BuildRequires:  python26-devel
06f8836
BuildRequires:  python26-distribute
06f8836
BuildRequires:  python26-ordereddict
06f8836
Requires:       openssl
06f8836
Requires:       python26
06f8836
Requires:       python26-backports-ssl_match_hostname
06f8836
Requires:       python26-ordereddict
06f8836
Requires:       python26-six
e2c2602
e2c2602
%description
e2c2602
Python HTTP module with connection pooling and file POST abilities.
e2c2602
06f8836
%package -n python26-%{srcname}
06f8836
Summary:        Python HTTP library with thread-safe connection pooling and file post
06f8836
Group:          Development/Languages
06f8836
Requires:       openssl
06f8836
Requires:       python26
06f8836
Requires:       python26-backports-ssl_match_hostname
06f8836
Requires:       python26-ordereddict
06f8836
Requires:       python26-six
06f8836
06f8836
%description -n python26-%{srcname}
06f8836
Python HTTP module with connection pooling and file POST abilities.
e2c2602
e2c2602
%prep
e2c2602
%setup -q -n %{srcname}-%{version}
e2c2602
750fa89
rm -rf urllib3/packages/
e2c2602
e2c2602
%patch0 -p1
06f8836
%patch1 -p1
06f8836
%patch2 -p1
e2c2602
e2c2602
%build
06f8836
%{__python2} setup.py build
e2c2602
e2c2602
%install
e2c2602
rm -rf %{buildroot}
06f8836
%{__python2} setup.py install --skip-build --root %{buildroot}
149e0ed
06f8836
%clean
06f8836
rm -rf %{buildroot}
06f8836
 
06f8836
%files -n python26-%{srcname}
06f8836
%defattr(-,root,root,-)
06f8836
%doc CHANGES.rst LICENSE.txt README.rst CONTRIBUTORS.txt
06f8836
%{python2_sitelib}/*
e709c88
06f8836
%changelog
06f8836
* Thu Jul 24 2014 Erik Johnson <erik@saltstack.com> - 1.5-8
06f8836
- Initial EL5 build
1563f31
06f8836
* Mon Oct 28 2013 Ralph Bean <rbean@redhat.com> - 1.5-7
06f8836
- Update patch to find ca_certs in the correct place.
da55d72
f54a32e
* Tue Jun 11 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.5-6
f54a32e
- Fix Requires of python-ordereddict to only apply to RHEL
f54a32e
750fa89
* Fri Mar  1 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.5-5
750fa89
- Unbundling finished!
750fa89
23a06f9
* Fri Mar 01 2013 Ralph Bean <rbean@redhat.com> - 1.5-4
23a06f9
- Upstream patch to fix Accept header when behind a proxy.
23a06f9
- Reorganize patch numbers to more clearly distinguish them.
23a06f9
e2c2602
* Wed Feb 27 2013 Ralph Bean <rbean@redhat.com> - 1.5-3
e2c2602
- Renamed patches to python-urllib3-*
e2c2602
- Fixed ssl check patch to use the correct cert path for Fedora.
e2c2602
- Included dependency on ca-certificates
e2c2602
- Cosmetic indentation changes to the .spec file.
e2c2602
e2c2602
* Tue Feb  5 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.5-2
e2c2602
- python3-tornado BR and run all unittests on python3
e2c2602
e2c2602
* Mon Feb 04 2013 Toshio Kuratomi <toshio@fedoraproject.org> 1.5-1
e2c2602
- Initial fedora build.
e2c2602