From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 74345@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>,
Lars-Dominik Braun <lars@6xq.net>, Marius Bakke <marius@gnu.org>,
Munyoki Kilyungi <me@bonfacemunyoki.com>,
Sharlatan Hellseher <sharlatanus@gmail.com>,
Tanguy Le Carrour <tanguy@bioneland.org>,
jgart <jgart@dismail.de>
Subject: [bug#74345] [PATCH v2 12/14] gnu: Add python-awscrt.
Date: Thu, 14 Nov 2024 11:52:53 +0000 [thread overview]
Message-ID: <7dd6a5b3584d0f73267319c3838fa7c550e30e0d.1731584861.git.sharlatanus@gmail.com> (raw)
In-Reply-To: <cover.1731584860.git.sharlatanus@gmail.com>
From: Ricardo Wurmus <rekado@elephly.net>
* gnu/packages/python-web.scm (python-awscrt): New variable.
Change-Id: I1c08a06fdb1ea9811c183d3711f092edd12cdca7
---
gnu/packages/python-web.scm | 74 +++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 32662503a1..eab9a7efc5 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -100,6 +100,7 @@ (define-module (gnu packages python-web)
#:use-module (gnu packages bash)
#:use-module (gnu packages certs)
#:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-web)
@@ -4132,6 +4133,79 @@ (define-public python-urllib3-next
supports url redirection and retries, and also gzip and deflate decoding.")
(license license:expat)))
+(define-public python-awscrt
+ (package
+ (name "python-awscrt")
+ (version "0.23.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "awscrt" version))
+ (sha256
+ (base32 "0a669xxfmgw3g6xpcnm64pbmlrbxw5wf3jcrivixscl2glapdxgx"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-broken-tests
+ (lambda _
+ ;; Disable broken tests. These tests fail because the
+ ;; certificate bundle at the default location does not exist.
+ (substitute* "test/test_auth.py"
+ (("def test_default_provider")
+ "def _test_default_provider"))
+ (substitute* "test/test_http_client.py"
+ (("def test_h2_client")
+ "def _test_h2_client"))
+ (substitute* "test/test_s3.py"
+ (("def test_sanity")
+ "def _test_sanity")
+ (("def test_sanity_secure")
+ "def _test_sanity_secure")
+ (("def test_wait_shutdown")
+ "def _test_wait_shutdown"))))
+ (add-after 'unpack 'override-cert-bundle-location
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bundle (search-input-file inputs
+ "/etc/ssl/certs/ca-certificates.crt")))
+ (setenv "SSL_CERT_FILE" bundle)
+ (substitute* "awscrt/io.py"
+ (("( +)opt = TlsContextOptions\\(\\)" m indent)
+ (string-append m "\n"
+ indent "import os\n"
+ indent "\
+opt.override_default_trust_store_from_path(None, os.getenv('SSL_CERT_FILE')) if os.getenv('SSL_CERT_FILE') else None\n")))
+ (substitute* "test/appexit_http.py"
+ (("( +)tls_ctx_opt = awscrt.io.TlsContextOptions.*" m indent)
+ (string-append m indent
+ "tls_ctx_opt.override_default_trust_store_from_path(None, '"
+ bundle "')\n")))
+ (substitute* "test/test_io.py"
+ (("( +)opt = TlsContextOptions\\(\\).*" m indent)
+ (string-append m indent
+ "opt.override_default_trust_store_from_path(None, '"
+ bundle "')\n"))))))
+ (add-after 'unpack 'use-system-libraries
+ (lambda _
+ (setenv "AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO" "1")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python3" "-m" "unittest"
+ "discover" "--verbose")))))))
+ (inputs (list openssl))
+ (native-inputs (list cmake-minimal
+ ;; For tests only
+ nss-certs-for-test
+ python-boto3
+ python-websockets))
+ (home-page "https://github.com/awslabs/aws-crt-python")
+ (synopsis "Common runtime for AWS Python projects")
+ (description
+ "This package provides a common runtime for AWS Python projects.")
+ (license license:asl2.0)))
+
(define-public awscli
(package
;; Note: updating awscli typically requires updating botocore as well.
--
2.46.0
next prev parent reply other threads:[~2024-11-14 11:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 16:53 [bug#74345] Update awscli Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 1/9] gnu: python-s3transfer: Update to 0.10.3 Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 2/9] gnu: python-botocore: Update to 1.35.59 Ricardo Wurmus
2024-11-13 18:48 ` Sharlatan Hellseher
2024-11-13 17:16 ` [bug#74345] [PATCH 3/9] gnu: python-boto3: " Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 4/9] gnu: awscli: Update to 1.36.0 Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 5/9] gnu: awscli-2: Add missing inputs Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 6/9] gnu: awscli-2: Update to 2.3.1 Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 7/9] gnu: Add python-awscrt Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 8/9] gnu: Add python-awscrt-for-awscli Ricardo Wurmus
2024-11-13 17:16 ` [bug#74345] [PATCH 9/9] gnu: Add awscli-2 Ricardo Wurmus
2024-11-13 20:37 ` [bug#74345] Update awscli Sharlatan Hellseher
2024-11-14 8:49 ` Ricardo Wurmus
2024-11-13 21:10 ` Vincent Legoll
2024-11-14 11:52 ` [bug#74345] [PATCH v2 00/14] " Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 01/14] gnu: python-botocore: Update to 1.35.54 Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 02/14] gnu: python-s3transfer: Update to 0.10.3 Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 03/14] gnu: python-boto3: Update to 1.35.54 Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 04/14] gnu: awscli: Update to 1.35.20 Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 05/14] gnu: Remove python-boto Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 06/14] gnu: Remove python-colorama-for-awscli Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 07/14] gnu: python-botocore: Update to 1.35.59 Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 08/14] gnu: python-boto3: " Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 09/14] gnu: awscli: Update to 1.36.0 Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 10/14] gnu: awscli-2: Add missing inputs Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 11/14] gnu: awscli-2: Update to 2.3.1 Sharlatan Hellseher
2024-11-14 11:52 ` Sharlatan Hellseher [this message]
2024-11-14 11:52 ` [bug#74345] [PATCH v2 13/14] gnu: Add python-awscrt-for-awscli Sharlatan Hellseher
2024-11-14 11:52 ` [bug#74345] [PATCH v2 14/14] gnu: Add awscli-2 Sharlatan Hellseher
2024-11-16 18:46 ` [bug#74345] Update awscli Sharlatan Hellseher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7dd6a5b3584d0f73267319c3838fa7c550e30e0d.1731584861.git.sharlatanus@gmail.com \
--to=sharlatanus@gmail.com \
--cc=74345@debbugs.gnu.org \
--cc=jgart@dismail.de \
--cc=lars@6xq.net \
--cc=marius@gnu.org \
--cc=me@bonfacemunyoki.com \
--cc=rekado@elephly.net \
--cc=tanguy@bioneland.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).