python-requests 2.32.3-1
This commit is contained in:
parent
015b9d3644
commit
93f921f31c
26
PKGBUILD
26
PKGBUILD
@ -5,25 +5,35 @@
|
|||||||
|
|
||||||
# Maintainer: Future Linux Team <future_linux@163.com>
|
# Maintainer: Future Linux Team <future_linux@163.com>
|
||||||
pkgname=python-requests
|
pkgname=python-requests
|
||||||
pkgver=2.31.0
|
pkgver=2.32.3
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Python HTTP for Humans"
|
pkgdesc="Python HTTP for Humans"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="https://requests.readthedocs.io/"
|
url="https://requests.readthedocs.io/"
|
||||||
license=('Apache')
|
license=('Apache-2.0')
|
||||||
depends=('python-charset-normalizer' 'python-idna' 'python-urllib3' 'ca-certificates')
|
depends=(
|
||||||
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
|
'ca-certificates'
|
||||||
source=(https://files.pythonhosted.org/packages/source/r/${pkgname#*-}/${pkgname#*-}-${pkgver}.tar.gz
|
'python-charset-normalizer'
|
||||||
|
'python-idna'
|
||||||
|
'python-urllib3'
|
||||||
|
)
|
||||||
|
makedepends=(
|
||||||
|
'git'
|
||||||
|
'python-build'
|
||||||
|
'python-installer'
|
||||||
|
'python-setuptools'
|
||||||
|
'python-wheel')
|
||||||
|
source=(https://github.com/psf/requests/archive/v${pkgver}/${pkgname#*-}-${pkgver}.tar.gz
|
||||||
${pkgname#*-}-${pkgver}-use_system_certs-1.patch)
|
${pkgname#*-}-${pkgver}-use_system_certs-1.patch)
|
||||||
sha256sums=(942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1
|
sha256sums=(f665576fc02d02e7b7f21630b915d70c14288f48decf76fad89b16a9f3975c42
|
||||||
ec8a2cc4f3f7a0df4ed5f576367017010276c59d57260ac7b0060238b2324904)
|
ec1c7a1aa466a6f8c0f51803879ee51451a015bd467ed85cbd506370b87f8936)
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${pkgname#*-}-${pkgver}
|
cd ${pkgname#*-}-${pkgver}
|
||||||
|
|
||||||
patch -Np1 -i ${srcdir}/${pkgname#*-}-${pkgver}-use_system_certs-1.patch
|
patch -Np1 -i ${srcdir}/${pkgname#*-}-${pkgver}-use_system_certs-1.patch
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${pkgname#*-}-${pkgver}
|
cd ${pkgname#*-}-${pkgver}
|
||||||
|
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
|
|
||||||
Date: 2022-12-01
|
|
||||||
Initial Package Version: 2.28.1
|
|
||||||
Changelog: rediff'ed for 2.28.2 (Pierre Labastie)
|
|
||||||
Changelog: rediff'ed for 2.30.0 (Bruce Dubbs)
|
|
||||||
Upstream Status: N/A
|
|
||||||
Origin: Self, fedora and Arch
|
|
||||||
Description: Prefer system certificates.
|
|
||||||
|
|
||||||
1. Based on what pip does to its vendored requests, use the
|
|
||||||
same environment variable to point to the certificates
|
|
||||||
instead of the certs from vendored certifi.
|
|
||||||
|
|
||||||
2. If that variable is not present, use the system certs.
|
|
||||||
|
|
||||||
Note that the variable can be set to point to
|
|
||||||
/usr/lib/python3.11/site-packages/pip/_vendor/certifi/cacert.pem
|
|
||||||
if there is a need to use the shipped certificates.
|
|
||||||
|
|
||||||
3. Remove the requirement to install system Certifi.
|
|
||||||
|
|
||||||
diff -Naur a/requests/certs.py b/requests/certs.py
|
|
||||||
--- a/requests/certs.py 2023-01-12 17:16:59.000000000 +0100
|
|
||||||
+++ b/requests/certs.py 2023-01-22 09:35:23.075750198 +0100
|
|
||||||
@@ -11,7 +11,15 @@
|
|
||||||
environment, you can change the definition of where() to return a separately
|
|
||||||
packaged CA bundle.
|
|
||||||
"""
|
|
||||||
-from certifi import where
|
|
||||||
+
|
|
||||||
+import os
|
|
||||||
+
|
|
||||||
+if "_PIP_STANDALONE_CERT" not in os.environ:
|
|
||||||
+ def where():
|
|
||||||
+ return "/etc/pki/tls/certs/ca-bundle.crt"
|
|
||||||
+else:
|
|
||||||
+ def where():
|
|
||||||
+ return os.environ["_PIP_STANDALONE_CERT"]
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print(where())
|
|
||||||
diff -Naur a/setup.cfg b/setup.cfg
|
|
||||||
--- a/setup.cfg 2023-01-12 17:24:35.000000000 +0100
|
|
||||||
+++ b/setup.cfg 2023-01-22 09:38:13.164481842 +0100
|
|
||||||
@@ -4,7 +4,6 @@
|
|
||||||
socks
|
|
||||||
use_chardet_on_py3
|
|
||||||
requires-dist =
|
|
||||||
- certifi>=2017.4.17
|
|
||||||
charset_normalizer>=2,<4
|
|
||||||
idna>=2.5,<4
|
|
||||||
urllib3>=1.21.1,<1.27
|
|
||||||
diff -Naur a/setup.py b/setup.py
|
|
||||||
--- a/setup.py 2023-01-12 17:16:59.000000000 +0100
|
|
||||||
+++ b/setup.py 2023-01-22 09:35:23.075750198 +0100
|
|
||||||
@@ -62,7 +62,6 @@
|
|
||||||
"charset_normalizer>=2,<4",
|
|
||||||
"idna>=2.5,<4",
|
|
||||||
"urllib3>=1.21.1,<3",
|
|
||||||
- "certifi>=2017.4.17",
|
|
||||||
]
|
|
||||||
test_requirements = [
|
|
||||||
"pytest-httpbin==0.0.7",
|
|
42
requests-2.32.3-use_system_certs-1.patch
Normal file
42
requests-2.32.3-use_system_certs-1.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
diff -Nuar requests-2.32.3.orig/setup.cfg requests-2.32.3/setup.cfg
|
||||||
|
--- requests-2.32.3.orig/setup.cfg 2024-05-29 23:36:10.000000000 +0800
|
||||||
|
+++ requests-2.32.3/setup.cfg 2024-11-04 14:18:55.628151448 +0800
|
||||||
|
@@ -4,7 +4,6 @@
|
||||||
|
socks
|
||||||
|
use_chardet_on_py3
|
||||||
|
requires-dist =
|
||||||
|
- certifi>=2017.4.17
|
||||||
|
charset_normalizer>=2,<4
|
||||||
|
idna>=2.5,<4
|
||||||
|
urllib3>=1.21.1,<3
|
||||||
|
diff -Nuar requests-2.32.3.orig/setup.py requests-2.32.3/setup.py
|
||||||
|
--- requests-2.32.3.orig/setup.py 2024-05-29 23:36:10.000000000 +0800
|
||||||
|
+++ requests-2.32.3/setup.py 2024-11-04 14:19:19.835151355 +0800
|
||||||
|
@@ -62,7 +62,6 @@
|
||||||
|
"charset_normalizer>=2,<4",
|
||||||
|
"idna>=2.5,<4",
|
||||||
|
"urllib3>=1.21.1,<3",
|
||||||
|
- "certifi>=2017.4.17",
|
||||||
|
]
|
||||||
|
test_requirements = [
|
||||||
|
"pytest-httpbin==2.0.0",
|
||||||
|
diff -Nuar requests-2.32.3.orig/src/requests/certs.py requests-2.32.3/src/requests/certs.py
|
||||||
|
--- requests-2.32.3.orig/src/requests/certs.py 2024-05-29 23:36:10.000000000 +0800
|
||||||
|
+++ requests-2.32.3/src/requests/certs.py 2024-11-04 14:18:20.840151580 +0800
|
||||||
|
@@ -11,7 +11,15 @@
|
||||||
|
environment, you can change the definition of where() to return a separately
|
||||||
|
packaged CA bundle.
|
||||||
|
"""
|
||||||
|
-from certifi import where
|
||||||
|
+
|
||||||
|
+import os
|
||||||
|
+
|
||||||
|
+if "_PIP_STANDALONE_CERT" not in os.environ:
|
||||||
|
+ def where():
|
||||||
|
+ return "/etc/pki/tls/certs/ca-bundle.crt"
|
||||||
|
+else:
|
||||||
|
+ def where():
|
||||||
|
+ return os.environ["_PIP_STANDALONE_CERT"]
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(where())
|
Loading…
Reference in New Issue
Block a user