From 8d7466eadcb543d538b1f40c4ec06a953c4aa45d Mon Sep 17 00:00:00 2001 Message-ID: <8d7466eadcb543d538b1f40c4ec06a953c4aa45d.1721115252.git.zhengjunjie@iscas.ac.cn> From: Zheng Junjie Date: Tue, 16 Jul 2024 00:06:39 +0800 Subject: [PATCH] gnu: python-requests-next: Fix build. * gnu/packages/python-web.scm (python-requests-next): Fix build. [arguments]<#:phases>: Add add-check-DEFAULT_CA_BUNDLE_PATH-exists phase. Change-Id: I1592ef3329fdcd681df618bb12fbc205aa028be3 --- gnu/packages/python-web.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index bca7da9139..2926d24b40 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -65,6 +65,7 @@ ;;; Copyright © 2024 Sharlatan Hellseher ;;; Copyright © 2024 normally_js ;;; Copyright © 2024 Markku Korkeala +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -3621,7 +3622,17 @@ (define-public python-requests-next python-urllib3)) (arguments ;; FIXME: Some tests require network access. - '(#:tests? #f)) + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'add-check-DEFAULT_CA_BUNDLE_PATH-exists + (lambda _ + (substitute* "src/requests/adapters.py" + ((" _preloaded_ssl_context = create_urllib3_context\\(\\)") + " if os.path.exists(DEFAULT_CA_BUNDLE_PATH): + _preloaded_ssl_context = create_urllib3_context()") + (("_preloaded_ssl_context\\.load_verify_locations\\(") + " _preloaded_ssl_context.load_verify_locations("))))))) (home-page "http://python-requests.org/") (synopsis "Python HTTP library") (description base-commit: 05e6bd3efe1b03190839d2b91b09fa768c4ef83c -- 2.45.2