diff --git a/pkg.info b/pkg.info index 4beac55..04b9306 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: python-requests description: HTTP for Humans version: 2.32.5 -revision: 1 +revision: 2 url: https://requests.readthedocs.io/en/latest/ license: Apache-2.0 architecture: any diff --git a/source-files/certs.patch b/source-files/certs.patch new file mode 100644 index 0000000..b4ebc37 --- /dev/null +++ b/source-files/certs.patch @@ -0,0 +1,14 @@ +diff --git a/src/requests/certs.py b/src/requests/certs.py +index be422c3e..9bfe1c80 100644 +--- a/src/requests/certs.py ++++ b/src/requests/certs.py +@@ -11,7 +11,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()) diff --git a/source.sh b/source.sh index d70e551..5ea65ef 100644 --- a/source.sh +++ b/source.sh @@ -2,6 +2,13 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT +prepare() { + cd "$BPM_SOURCE" + # Use system certificates + sed -i '/certifi/d' setup.py + patch -p1 -i "$BPM_WORKDIR"/certs.patch +} + # The build function is executed in the source directory # This function is used to compile the source code build() {