Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 340c1805e4e7dd7b0428287688e7eb54 > files > 4

python-requests-2.11.1-2.1.mga6.src.rpm

%define	module	requests
%define	urllib3_unbundled_version	1.18.1

Name:		python-%{module}
Version:	2.11.1
%define subrel	1
Release:	%mkrel 2
Summary:	Python HTTP for Humans
License:	Apache License
Group:		Development/Python
Url:		http://python-requests.org/
Source0:	https://pypi.io/packages/source/r/%{module}/%{module}-%{version}.tar.gz
# From Fedora Explicitly use the system certificates in ca-certificates.
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
Patch0:		python-requests-system-cert-bundle.patch
# From Fedora Remove an unnecessary reference to a bundled compat lib in urllib3
Patch1:		python-requests-remove-nested-bundling-dep.patch
Patch2:		python-requests-2.11.1-CVE-2018-18074.patch
BuildArch:	noarch
BuildRequires:	pkgconfig(python2)
BuildRequires:	pythonegg(2)(setuptools)
BuildRequires:	pythonegg(2)(chardet)
BuildRequires:	pythonegg(2)(urllib3) == %{urllib3_unbundled_version}
BuildRequires:	pythonegg(2)(backports.ssl-match-hostname)

Requires:	rootcerts
Requires:	pythonegg(2)(chardet)
Requires:	pythonegg(2)(urllib3) == %{urllib3_unbundled_version}
Requires:	pythonegg(2)(backports.ssl-match-hostname)

%description
Requests allow you to send HTTP/1.1 requests. You can add headers,
form data, multipart files, and parameters with simple Python
dictionaries, and access the response data in the same way. It's
powered by httplib and urllib3, but it does all the hard work and
crazy hacks for you.

%package -n	python3-%{module}
Summary:	HTTP library, written in Python, for human beings
Group:		Development/Python
BuildRequires:	pkgconfig(python3)
BuildRequires:	pythonegg(3)(setuptools)
BuildRequires:	pythonegg(3)(chardet)
BuildRequires:	pythonegg(3)(urllib3) == %{urllib3_unbundled_version}

Requires:	pythonegg(3)(chardet)
Requires:	pythonegg(3)(urllib3) == %{urllib3_unbundled_version}
Requires:	rootcerts

%description -n	python3-%{module}
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.

%prep
%setup -q -n %{module}-%{version}
%autopatch -p1

# Unbundle the certificate bundle from mozilla.
rm -rf requests/cacert.pem

cp -a . %{py3dir}

%build
pushd %{py3dir}
%py3_build
# Unbundle chardet and urllib3.  We replace these with symlinks to system libs.
rm -rf build/lib/requests/packages/chardet
rm -rf build/lib/requests/packages/urllib3
popd

%py2_build
# Unbundle chardet and urllib3.  We replace these with symlinks to system libs.
rm -rf build/lib/requests/packages/chardet
rm -rf build/lib/requests/packages/urllib3

%install
pushd %{py3dir}
%py3_install
ln -s ../../chardet %{buildroot}/%{python3_sitelib}/requests/packages/chardet
ln -s ../../urllib3 %{buildroot}/%{python3_sitelib}/requests/packages/urllib3
popd

%py2_install
ln -s ../../chardet %{buildroot}/%{python2_sitelib}/requests/packages/chardet
ln -s ../../urllib3 %{buildroot}/%{python2_sitelib}/requests/packages/urllib3

%files
%doc NOTICE LICENSE README.rst HISTORY.rst
%{python2_sitelib}/%{module}-%{version}-py%{python2_version}.egg-info
%{python2_sitelib}/%{module}/

%files -n python3-%{module}
%{python3_sitelib}/%{module}-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/%{module}/


%changelog
* Tue Oct 16 2018 daviddavid <daviddavid> 2.11.1-2.1.mga6
+ Revision: 1321181
- add and rebase upstream patch to fix CVE-2018-18074 (mga#23694)

* Thu Nov 03 2016 akien <akien> 2.11.1-2.mga6
+ Revision: 1064790
- Rebuild for urllib3 1.18.1

* Sat Sep 10 2016 luigiwalser <luigiwalser> 2.11.1-1.mga6
+ Revision: 1051344
- 2.11.1

* Tue May 03 2016 daviddavid <daviddavid> 2.10.0-1.mga6
+ Revision: 1009032
- new version: 2.10.0
- update urllib3 unbundled version to 1.15.1

* Mon Dec 21 2015 daviddavid <daviddavid> 2.9.1-1.mga6
+ Revision: 913234
- new version: 2.9.1

* Fri Dec 18 2015 daviddavid <daviddavid> 2.9.0-1.mga6
+ Revision: 911733
- new version: 2.9.0

* Tue Dec 15 2015 daviddavid <daviddavid> 2.8.1-1.mga6
+ Revision: 910651
- new version: 2.8.1
- tell explicitly about what version of urllib3 we are unbundling

* Wed Oct 07 2015 daviddavid <daviddavid> 2.7.0-5.mga6
+ Revision: 887174
- use new python macros
+ ovitters <ovitters>
- rebuild for new python3

* Mon Jul 20 2015 daviddavid <daviddavid> 2.7.0-4.mga6
+ Revision: 855637
- re-do unbundling by symlinking system libs into the requests/packages/ dir
- remove no more needed patch:
  * python-requests-system-chardet-not-charade.patch
- add a patch from Fedora to remove an unnecessary reference to a bundled compat lib in urllib3
- update Source URL

* Mon Jul 20 2015 joequant <joequant> 2.7.0-3.mga6
+ Revision: 855596
- add packages

* Mon Jul 20 2015 joequant <joequant> 2.7.0-2.mga6
+ Revision: 855592
- fix urllib

* Mon Jul 20 2015 joequant <joequant> 2.7.0-1.mga6
+ Revision: 855587
- upgrade to 2.7.0

* Mon Mar 16 2015 luigiwalser <luigiwalser> 2.3.0-5.mga5
+ Revision: 818662
- rebuild to fix release tag
+ tmb <tmb>
- rollback to 2.3.0 + CVE-2015-2296 fix

* Sun Mar 15 2015 daviddavid <daviddavid> 2.6.0-1.mga5
+ Revision: 818579
- new version: 2.6.0 (fix CVE-2015-2296) (mga#15496)
- re-do unbundling by symlinking system libs into the requests/packages/ dir
- remove no more needed patches:
  * python-requests-system-chardet-not-charade.patch
  * python-requests-system-urllib3.patch
- add a patch from Fedora to remove an unnecessary reference to a bundled compat lib in urllib3
- rediff patch0 (sync with Fedora's one)

* Wed Oct 15 2014 umeabot <umeabot> 2.3.0-4.mga5
+ Revision: 743774
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 2.3.0-3.mga5
+ Revision: 729640
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 2.3.0-2.mga5
+ Revision: 688308
- Mageia 5 Mass Rebuild

* Tue Aug 26 2014 daviddavid <daviddavid> 2.3.0-1.mga5
+ Revision: 668340
- fix license handling (Apache License instead of MIT)
- sync patches 2 and 3 with fedora (minor change)
- update file list
- new version: 2.3.0

* Sat May 31 2014 pterjan <pterjan> 2.0.0-5.mga5
+ Revision: 628990
- Rebuild for new Python

* Tue Oct 22 2013 ovitters <ovitters> 2.0.0-4.mga4
+ Revision: 546294
- python2 requires python-backports-ssl_match_hostname

* Tue Oct 22 2013 umeabot <umeabot> 2.0.0-3.mga4
+ Revision: 544191
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 pterjan <pterjan> 2.0.0-2.mga4
+ Revision: 499297
- Rebuild to add different pythonegg provides for python 2 and 3

* Mon Oct 07 2013 nmartin <nmartin> 2.0.0-1.mga4
+ Revision: 492727
- Update to new version 2.0.0

* Thu Aug 29 2013 philippem <philippem> 1.2.3-2.mga4
+ Revision: 473130
- unbundle cert, charade
- add Python 3
- unbundle cert, charade

* Sat Jun 08 2013 philippem <philippem> 1.2.3-1.1.mga4
+ Revision: 440562
- fix CVE-2013-2099 (ssl.match_hostname DOS)

* Sun Jun 02 2013 colin <colin> 1.2.3-1.mga4
+ Revision: 434894
- New version: 1.2.3

* Sun Jan 13 2013 umeabot <umeabot> 0.13.5-2.mga3
+ Revision: 379442
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Aug 03 2012 ovitters <ovitters> 0.13.5-1.mga3
+ Revision: 278170
- new version 0.13.5
- clean spec
- Import from Mandriva


* Tue Jul 17 2012 Lev Givon <lev@mandriva.org> 0.13.3-1
+ Revision: 810082
- imported package python-requests
- imported package python-requests