Initial el5 build
This commit is contained in:
parent
a3d6ffe71e
commit
e6241586d9
6 changed files with 169 additions and 216 deletions
|
|
@ -1,20 +1,21 @@
|
|||
%if 0%{?fedora}
|
||||
%global _with_python3 1
|
||||
%else
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||
%endif
|
||||
%global __python2 /usr/bin/python2.6
|
||||
%global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")
|
||||
|
||||
Name: python-requests
|
||||
Version: 2.3.0
|
||||
Release: 2%{?dist}
|
||||
%global srcname requests
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 1.1.0
|
||||
Release: 5%{?dist}
|
||||
Summary: HTTP library, written in Python, for human beings
|
||||
|
||||
Group: Development/Languages
|
||||
License: ASL 2.0
|
||||
URL: http://pypi.python.org/pypi/requests
|
||||
Source0: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
|
||||
# Explicitly use the system certificates in ca-certificates.
|
||||
# Explicitly use the system certificates in openssl.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
|
||||
Patch0: python-requests-system-cert-bundle.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1124060
|
||||
Patch0: python-requests-system-cert-bundle-el5.patch
|
||||
# Unbundle python-charade (a fork of python-chardet).
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=904623
|
||||
Patch1: python-requests-system-chardet-not-charade.patch
|
||||
|
|
@ -22,41 +23,40 @@ Patch1: python-requests-system-chardet-not-charade.patch
|
|||
# https://bugzilla.redhat.com/show_bug.cgi?id=904623
|
||||
Patch2: python-requests-system-urllib3.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{srcname}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-chardet
|
||||
BuildRequires: python-urllib3 >= 1.8.2
|
||||
|
||||
Requires: ca-certificates
|
||||
Requires: python-chardet
|
||||
Requires: python-urllib3 >= 1.8.2
|
||||
BuildRequires: python26-devel
|
||||
BuildRequires: python26-distribute
|
||||
BuildRequires: python26-chardet
|
||||
BuildRequires: python26-ordereddict
|
||||
BuildRequires: python26-urllib3
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||
BuildRequires: python-ordereddict
|
||||
Requires: python-ordereddict
|
||||
%endif
|
||||
Requires: openssl
|
||||
Requires: python26
|
||||
Requires: python26-chardet
|
||||
Requires: python26-ordereddict
|
||||
Requires: python26-urllib3
|
||||
|
||||
%description
|
||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
||||
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
|
||||
capabilities you should need, but the API is thoroughly broken. This library is
|
||||
designed to make HTTP requests easy for developers.
|
||||
|
||||
%if 0%{?_with_python3}
|
||||
%package -n python3-requests
|
||||
Summary: HTTP library, written in Python, for human beings
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-chardet
|
||||
BuildRequires: python3-urllib3 >= 1.8.2
|
||||
Requires: python3-chardet
|
||||
Requires: python3-urllib3 >= 1.8.2
|
||||
|
||||
%description -n python3-requests
|
||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
||||
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
|
||||
Most existing Python modules for sending HTTP requests are extremely verbose
|
||||
and cumbersome. Python's built-in urllib2 module provides most of the HTTP
|
||||
capabilities you should need, but the API is thoroughly broken. This library is
|
||||
designed to make HTTP requests easy for developers.
|
||||
|
||||
%package -n python26-%{srcname}
|
||||
Group: Development/Languages
|
||||
Summary: HTTP library, written in Python, for human beings
|
||||
Requires: python26
|
||||
Requires: python26-chardet
|
||||
Requires: python26-ordereddict
|
||||
Requires: python26-urllib3
|
||||
|
||||
%description -n python26-%{srcname}
|
||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
||||
cumbersome. Python's built-in urllib2 module provides most of the HTTP
|
||||
capabilities you should need, but the API is thoroughly broken. This library is
|
||||
designed to make HTTP requests easy for developers.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n requests-%{version}
|
||||
|
|
@ -68,26 +68,8 @@ designed to make HTTP requests easy for developers.
|
|||
# Unbundle the certificate bundle from mozilla.
|
||||
rm -rf requests/cacert.pem
|
||||
|
||||
%if 0%{?_with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
|
||||
%build
|
||||
%if 0%{?_with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
|
||||
# Unbundle chardet. Patch1 switches usage to system chardet.
|
||||
rm -rf build/lib/requests/packages/chardet
|
||||
|
||||
# Unbundle urllib3. Patch1 switches usage to system urllib3.
|
||||
rm -rf build/lib/requests/packages
|
||||
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python} setup.py build
|
||||
%{__python2} setup.py build
|
||||
|
||||
# Unbundle chardet. Patch1 switches usage to system chardet.
|
||||
rm -rf build/lib/requests/packages/charade
|
||||
|
|
@ -96,69 +78,22 @@ rm -rf build/lib/requests/packages/charade
|
|||
rm -rf build/lib/requests/packages
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%if 0%{?_with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
||||
popd
|
||||
%endif
|
||||
rm -rf %{buildroot}
|
||||
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
||||
|
||||
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
## The tests succeed if run locally, but fail in koji.
|
||||
## They require an active network connection to query httpbin.org
|
||||
#%%check
|
||||
#%%{__python} test_requests.py
|
||||
#%%if 0%%{?_with_python3}
|
||||
#pushd %%{py3dir}
|
||||
#%%{__python3} test_requests.py
|
||||
#popd
|
||||
#%%endif
|
||||
|
||||
%files
|
||||
%files -n python26-%{srcname}
|
||||
%defattr(-,root,root,-)
|
||||
%doc NOTICE LICENSE README.rst HISTORY.rst
|
||||
%{python_sitelib}/*.egg-info
|
||||
%dir %{python_sitelib}/requests
|
||||
%{python_sitelib}/requests/*
|
||||
|
||||
%if 0%{?_with_python3}
|
||||
%files -n python3-requests
|
||||
%doc NOTICE LICENSE README.rst HISTORY.rst
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%{python3_sitelib}/requests/
|
||||
%endif
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%dir %{python2_sitelib}/requests
|
||||
%{python2_sitelib}/requests/*
|
||||
|
||||
%changelog
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Thu May 29 2014 Arun S A G <sagarun@gmail.com> - 2.3.0-1
|
||||
- Latest upstream
|
||||
|
||||
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
||||
|
||||
* Wed Sep 25 2013 Ralph Bean <rbean@redhat.com> - 2.0.0-1
|
||||
- Latest upstream.
|
||||
- Add doc macro to the python3 files section.
|
||||
- Require python-urllib3 greater than or at 1.7.1.
|
||||
|
||||
* Mon Aug 26 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.3-5
|
||||
- fix versioned dep on python-urllib3
|
||||
|
||||
* Mon Aug 26 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-4
|
||||
- Explicitly versioned the requirements on python-urllib3.
|
||||
|
||||
* Thu Aug 22 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-3
|
||||
- Release bump for a coupled update with python-urllib3.
|
||||
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Mon Jul 01 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-1
|
||||
- Latest upstream.
|
||||
- Fixed bogus date in changelog.
|
||||
* Tue Sep 16 2014 Erik Johnson <erik@saltstack.com> - 1.1.0-5
|
||||
- Initial EL5 build
|
||||
|
||||
* Tue Jun 11 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-4
|
||||
- Correct a rhel conditional on python-ordereddict
|
||||
|
|
@ -189,7 +124,13 @@ popd
|
|||
- Fix a problem with cookie handling
|
||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=906924
|
||||
|
||||
* Mon Oct 22 2012 Arun S A G <sagarun@gmail.com> 0.14.1-1
|
||||
* Thu Jan 31 2013 Ralph Bean <rbean@redhat.com> 0.14.1-3
|
||||
- Introduced backport patch to support better cookie handling.
|
||||
|
||||
* Mon Jan 28 2013 Ralph Bean <rbean@redhat.com> 0.14.1-2
|
||||
- Merged latest rawhide into el6.
|
||||
|
||||
* Wed Oct 22 2012 Arun S A G <sagarun@gmail.com> 0.14.1-1
|
||||
- Updated to latest upstream release
|
||||
|
||||
* Sun Jun 10 2012 Arun S A G <sagarun@gmail.com> 0.13.1-1
|
||||
|
|
@ -198,6 +139,9 @@ popd
|
|||
- No more async requests use grrequests https://github.com/kennethreitz/grequests
|
||||
- Remove gevent as it is no longer required by requests
|
||||
|
||||
* Sun Apr 09 2012 Arun S A G <sagarun@gmail.com> 0.11.1-2
|
||||
- Fix rhbz#808912
|
||||
|
||||
* Sun Apr 01 2012 Arun S A G <sagarun@gmail.com> 0.11.1-1
|
||||
- Updated to upstream release 0.11.1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue