From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oCL4JiDjNGfVGAEA62LTzQ:P1 (envelope-from ) for ; Wed, 13 Nov 2024 17:34:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oCL4JiDjNGfVGAEA62LTzQ (envelope-from ) for ; Wed, 13 Nov 2024 18:34:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Omb+Cs76; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=Y5cKEoYb; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731519264; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=i7DA9NHCXaX01Es9lgYlxsFLPRLQMtFy6Tcw6Up6l9M=; b=WQInSXr7wlhWCeXxFdr8fQQycP9SN5Jq40XT7YjiCYvR32agU7qoP728fJbGC2lmzRzbY4 q8Eu7qIEZE4GkiDclCt5JJZpEopHXIAQiaw03wDgTwvUMv61VcHW6oHK+PTwiZ425L115v UaGbokOxPS+d3IELWpwxmOl+ynvuYh1TL4foQnU/8WDhv9Jbq9Mt3QJBFjfzaO3ph6Sr3+ GW70YKNnSg7VCsBD928mx/duS9lwsxl2IoG9SvOEjOa9CaU/vCqnZ9O8dxeJE/cbggTbdR OufSSG2AQBMAH5QB1MJXxZIb0zlkV4Qn2F7kFsCBMutGNnk/fwYKHR9/XoANVg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Omb+Cs76; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=Y5cKEoYb; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1731519264; a=rsa-sha256; cv=fail; b=gcsL4+xyx7TJ0uyo03q7qulVphAz8dmIjEESq/4oLg7ezrG+dFT031beQKuWDHGCh+KPjS +dCHiH+QTr0JKaLNxKJAkE/RaIyBd07Il70IBdjn9NvFkF/9dXzMffTEv681HoTjrf6zZM FvxPmUxHQm+mCtadSnJ5OV4Vz4JJYQKKQGiKeIb5xBZlWYGVWdywUS9WQESYzlQJhHIaqz w1wPc2OgSgoAbN65WwSdhHXcxympUSW7lSrz43u8fML00rxf+vSCvzx5ZzHzg30f1tvp9V z0mkJyVDJvE/SRpE6CZkBYUtDSwU81H3WFOvEXI88L0e7eYaQbSDP244HUOUuA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 65CF07DE39 for ; Wed, 13 Nov 2024 18:34:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBHFm-0008E3-RL; Wed, 13 Nov 2024 12:34:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBHFl-0008Dr-RE for guix-patches@gnu.org; Wed, 13 Nov 2024 12:34:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBHFl-0005XM-Hh; Wed, 13 Nov 2024 12:34:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=i7DA9NHCXaX01Es9lgYlxsFLPRLQMtFy6Tcw6Up6l9M=; b=Omb+Cs76gWkwvjETz++IZumlTq5pNLl81U1euQpnZVUOu2/cKXglWhIRvrDhIbLhn5ZEJVPglHQEsl8XMiLe9R/9vuEqGTZ+8rl/6YHCkZJ3tN37NbTK7KHfZ/Va1nfWl8wi2Wu9HYK+JJ7H3oEh5AZRdkAv7Mi2e6MmcuyInVM3BuQ8O/grt7G+KMj6DggRPcM43XFKouiixIZLMn9Q0gSNzoc7LtzphKq/NiiAj994s3wArfYzQP+YfVV6/LPsg9fggyVl8fDkNlB4AtJPoQw6t22uzrDVyuvGVoEPnX3FE+lAJjWmbU54fEzWT+BboCIjP0vl+WVpecup8GkedA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tBHFh-0001uQ-MT; Wed, 13 Nov 2024 12:34:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74345] [PATCH 7/9] gnu: Add python-awscrt. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, sharlatanus@gmail.com, tanguy@bioneland.org, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Wed, 13 Nov 2024 17:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74345 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 74345@debbugs.gnu.org Cc: Ricardo Wurmus , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart Received: via spool by 74345-submit@debbugs.gnu.org id=B74345.17315191877247 (code B ref 74345); Wed, 13 Nov 2024 17:34:01 +0000 Received: (at 74345) by debbugs.gnu.org; 13 Nov 2024 17:33:07 +0000 Received: from localhost ([127.0.0.1]:43455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBHEo-0001sk-GF for submit@debbugs.gnu.org; Wed, 13 Nov 2024 12:33:07 -0500 Received: from sender4-of-o52.zoho.com ([136.143.188.52]:21212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBHEl-0001ro-0V for 74345@debbugs.gnu.org; Wed, 13 Nov 2024 12:33:04 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1731519180; cv=none; d=zohomail.com; s=zohoarc; b=Ne9F8fgWpqH+Y00/U5S1LdReufWTJy1IX92QNpRJIwG/5PXg/M7FvqcA9bSi0F9WsHJ05dG4wGgXq3lqYzJM43EkGHo+6ExuEenP+eJ/4eJhyQzBfnhsmQDCy7Cq4r6D1sC5sRo6rYter2rz6P9MWS01+KFgC/hQa2pCXGbs5Ik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731519180; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=i7DA9NHCXaX01Es9lgYlxsFLPRLQMtFy6Tcw6Up6l9M=; b=NM8tM1uHsYvDsyvUH+Df64yrolADfANORxhcrMYfhVcEpJ8oJHKR+kqOy9f9cx8ujjtOZO5LuJvivXTBl9nT6s/U2nKqlnzFmJNEg4QKWwJgu5Rbxi7kb5dSoEFQO0Yi7r5W2/DNfuB7YGIVXV1cYc+mVg7G4dzq6EtlrnPRyFo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1731519180; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=i7DA9NHCXaX01Es9lgYlxsFLPRLQMtFy6Tcw6Up6l9M=; b=Y5cKEoYbSezQQYnybJsfxu5No1A/oT93IiLt+PuHoUGUEtUEHNyuncdk2MOJHDt5 oMLZhPR2SN+J6HRx6ekLOzhKEidHNtH4tbXnYFQUr6vvOAC0lRFVsCYOMdHpeIOYpkx cTZzk7FXWf/KBXNy8qmEJ2PCu/KV8fx85dmLBi0k= Received: by mx.zohomail.com with SMTPS id 173151821307414.043486895552519; Wed, 13 Nov 2024 09:16:53 -0800 (PST) From: Ricardo Wurmus Date: Wed, 13 Nov 2024 18:16:20 +0100 Message-ID: <0ed3dff312180401873ef5b1b0798096abb3dd95.1731518182.git.rekado@elephly.net> X-Mailer: git-send-email 2.46.0 In-Reply-To: <1c21604f8e3f1bc9784e17f32c140da3c746d0a8.1731518182.git.rekado@elephly.net> References: <1c21604f8e3f1bc9784e17f32c140da3c746d0a8.1731518182.git.rekado@elephly.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 2.61 X-Spam-Score: 2.61 X-Migadu-Queue-Id: 65CF07DE39 X-TUID: 3oAhRtrYXAKz * 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 cbec6bf900d..3160c807a1d 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