mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-05 19:11:57 +02:00
requests: fix https://bugs.gentoo.org/787584
This commit is contained in:
parent
18ee6c6446
commit
f0be04944f
4 changed files with 128 additions and 0 deletions
1
dev-python/requests/Manifest
Normal file
1
dev-python/requests/Manifest
Normal file
|
|
@ -0,0 +1 @@
|
|||
DIST requests-2.25.1.tar.gz 102161 BLAKE2B 1901ca3bb1eb7a6eb7689a81e01c1c23d3f359835507fda78de734162cbd8573b7640c9376cb50ed9397603d67d9a14624028573c2709086547f37993a959429 SHA512 ca6b0a257b448a999cade0ae173c29cddc9cfffb319d16fc3d051d3e1cd77161536e3cab279b3cba59c60d29d7864a9281c1fa1f689ce48d3bce2ca9f1cd8d45
|
||||
50
dev-python/requests/files/5711.patch
Normal file
50
dev-python/requests/files/5711.patch
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
From 9484e13c7da927119fe82794bb5571cec144b6d7 Mon Sep 17 00:00:00 2001
|
||||
From: Naor Livne <naorlivne@gmail.com>
|
||||
Date: Fri, 1 Jan 2021 14:31:14 +0200
|
||||
Subject: [PATCH 1/2] bump idna has version 3.0 was released
|
||||
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 7ba4b2a25f..f265384236 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -43,7 +43,7 @@ def run_tests(self):
|
||||
|
||||
requires = [
|
||||
'chardet>=3.0.2,<5',
|
||||
- 'idna>=2.5,<3',
|
||||
+ 'idna>=2.5,<4',
|
||||
'urllib3>=1.21.1,<1.27',
|
||||
'certifi>=2017.4.17'
|
||||
|
||||
|
||||
From d3e00a4958af046879f24de365d5589d861ea6ef Mon Sep 17 00:00:00 2001
|
||||
From: Naor Livne <naorlivne@gmail.com>
|
||||
Date: Tue, 5 Jan 2021 16:31:15 +0200
|
||||
Subject: [PATCH 2/2] Update setup.py
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
|
||||
---
|
||||
setup.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index f265384236..5ce59e621d 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -43,7 +43,8 @@ def run_tests(self):
|
||||
|
||||
requires = [
|
||||
'chardet>=3.0.2,<5',
|
||||
- 'idna>=2.5,<4',
|
||||
+ 'idna>=2.5,<3 ; python_version < "3"',
|
||||
+ 'idna>=2.5,<4 ; python_version >= "3"',
|
||||
'urllib3>=1.21.1,<1.27',
|
||||
'certifi>=2017.4.17'
|
||||
|
||||
19
dev-python/requests/metadata.xml
Normal file
19
dev-python/requests/metadata.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>python@gentoo.org</email>
|
||||
<name>Python</name>
|
||||
</maintainer>
|
||||
<longdescription lang="en">
|
||||
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.
|
||||
</longdescription>
|
||||
<stabilize-allarches/>
|
||||
<upstream>
|
||||
<remote-id type="pypi">requests</remote-id>
|
||||
<remote-id type="cpe">cpe:/a:python-requests:requests</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
58
dev-python/requests/requests-2.25.1-r2.ebuild
Normal file
58
dev-python/requests/requests-2.25.1-r2.ebuild
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
|
||||
PYTHON_REQ_USE="threads(+)"
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="HTTP library for human beings"
|
||||
HOMEPAGE="https://requests.readthedocs.io/"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="socks5"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
|
||||
>=dev-python/chardet-3.0.2[${PYTHON_USEDEP}]
|
||||
<dev-python/chardet-5[${PYTHON_USEDEP}]
|
||||
>=dev-python/idna-2.5[${PYTHON_USEDEP}]
|
||||
<dev-python/idna-4[${PYTHON_USEDEP}]
|
||||
<dev-python/urllib3-1.27[${PYTHON_USEDEP}]
|
||||
socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/pytest-httpbin[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-mock[${PYTHON_USEDEP}]
|
||||
>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=(
|
||||
#https://bugs.gentoo.org/787584
|
||||
"${FILESDIR}"/5711.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
distutils-r1_src_prepare
|
||||
|
||||
# strip tests that require some kind of network
|
||||
sed -e 's:test_connect_timeout:_&:' \
|
||||
-e 's:test_total_timeout_connect:_&:' \
|
||||
-i tests/test_requests.py || die
|
||||
# probably pyopenssl version dependent
|
||||
sed -e 's:test_https_warnings:_&:' \
|
||||
-i tests/test_requests.py || die
|
||||
# doctests rely on networking
|
||||
sed -e 's:--doctest-modules::' \
|
||||
-i pytest.ini || die
|
||||
}
|
||||
Loading…
Reference in a new issue