1
0
forked from ports/contrib

python3-requests: fix certificate path

This commit is contained in:
Danny Rawlins 2018-03-15 23:34:12 +11:00
parent d48c416aa5
commit 60d2198289
4 changed files with 25 additions and 4 deletions

View File

@ -1 +1,2 @@
d49ffa288cf36bfe6962e4811055816e certs.patch
081412b2ef79bdc48229891af13f4d82 requests-2.18.4.tar.gz

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3+bsOZ5EdPn7P364wY2lvqcj343wFLRqOT+vT+t62DbWtvUKw5cuBwKFDf+Mt+Oskh8F96uPjFnd2TdyBWzrMAA=
SHA256 (Pkgfile) = 628395440e3a48da3a01756168ad250ca3289f41208949efcf4d9f96ecf84533
RWSagIOpLGJF31wSGMaQVCd8/gHMyNJ5tH/+3TZfAEz9JfRg+N8rtrOWdeMdm/X9Pp8ZTJuYorVV4GMl/BFDdPkbXC4oCx94NAM=
SHA256 (Pkgfile) = b21e8100242898375d597241a33911f3f9ec6615612377433b8596b8dd6d1ec0
SHA256 (.footprint) = f1b43b1cac0a3ead4c815ddee468f65da239dcc42a418a9f7dd8ad9ea858fc9a
SHA256 (requests-2.18.4.tar.gz) = 9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e
SHA256 (certs.patch) = 3fa0c8ef2018ef0987d2daff79765b99abd99c539f2ec1241bcf9c31b1a4fd75

View File

@ -5,11 +5,16 @@
name=python3-requests
version=2.18.4
release=1
source=(https://files.pythonhosted.org/packages/source/${name:8:1}/${name#*-}/${name#*-}-$version.tar.gz)
release=2
source=(https://files.pythonhosted.org/packages/source/${name:8:1}/${name#*-}/${name#*-}-$version.tar.gz
certs.patch)
build() {
cd ${name#*-}-$version
sed -e '/certifi/d' -i setup.py
patch -p1 -i $SRC/certs.patch
/usr/bin/python3 setup.py build
/usr/bin/python3 setup.py install --prefix=/usr --root=$PKG
}

View File

@ -0,0 +1,14 @@
diff --git a/requests/certs.py b/requests/certs.py
index d1a378d7..4e0bffd4 100644
--- a/requests/certs.py
+++ b/requests/certs.py
@@ -12,7 +12,8 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.
"""
-from certifi import where
+def where():
+ return "/etc/ssl/certs/ca-certificates.crt"
if __name__ == '__main__':
print(where())