guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 8a0278f894cb3c88dcebcde4241fa35695b731f4
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Mon Sep 21 21:17:18 2026 +0100

    gnu: packages/python-web: Sort variables.
    
    * gnu/packages/python-web.scm: (awscli, awscli-2, grip, gunicorn,
    gunicorn-bootstrap, oauth2ms): Sort variables alphabatically.
---
 gnu/packages/python-web.scm | 768 ++++++++++++++++++++++----------------------
 1 file changed, 384 insertions(+), 384 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 645638df10f..37cc6ec2b25 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -167,6 +167,311 @@
   #:use-module (guix utils)
   #:use-module (srfi srfi-1))
 
+(define-public awscli
+  (package
+    ;; Note: updating awscli typically requires updating botocore as well.
+    (name "awscli")
+    (version "1.43.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/aws/aws-cli";)
+              (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1idvcnc6jw7xr1jqpza472ksj3i2kyk0bv8wr7acz3xnba1v8xmi"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; tests: 2715 passed, 32 warnings
+      #:test-flags
+      #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
+              ;; Complete test suite is huge and compute hungry, run just unit
+              ;; tests.
+              "--ignore=tests/dependencies"
+              "--ignore=tests/functional"
+              "--ignore=tests/integration"
+              ;; TypeError: 'Mock' object is not subscriptable.
+              "-k" "not test_no_groff_or_mandoc_exists")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-reference-to-groff
+            (lambda _
+              ;; XXX: Consider to use wrap-program instead, it tries to parse
+              ;; the PATH.
+              (substitute* "awscli/help.py"
+                (("if self._exists_on_path\\('groff'\\):") "if 'groff':")
+                (("raise ExecutableNotFoundError\\('groff'\\)") "")
+                (("cmdline = \\['groff'")
+                 (format #f "cmdline = ['~a/bin/groff'"
+                         #$(this-package-input "groff-minimal"))))))
+          (add-before 'check 'set-environment
+            (lambda _
+              ;; PermissionError: [Errno 13] Permission denied:
+              ;; '/homeless-shelter'
+              (setenv "HOME" "/tmp"))))))
+    (native-inputs
+     (list python-pytest
+           python-pytest-xdist
+           python-setuptools
+           python-wheel))
+    (inputs
+     (list groff-minimal
+           python-botocore
+           python-colorama
+           python-docutils-0.19
+           python-pyyaml
+           python-rsa-for-awscli-1
+           python-s3transfer))
+    (home-page "https://aws.amazon.com/cli/";)
+    (synopsis "Command line client for AWS")
+    (description
+     "AWS CLI provides a unified command line interface to the Amazon Web
+Services (AWS) API.")
+    (license license:asl2.0)))
+
+(define-public awscli-2
+  (package
+    (inherit awscli)
+    ;; Note: updating awscli-2 typically requires updating python-awscrt.
+    (name "awscli")
+    ;; Upstream practices a very rapid (1h-1d) release cycles try to select
+    ;; any fresh one compatible with current state of dependencies in Guix.
+    (version "2.36.20")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/aws/aws-cli";)
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1hv2zs5pm86b5bd66j2kfb9r8gz13cqnf8x5hmfv0ddszf9vnfgp"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; When updating and checking locally be very patient as build phase may
+      ;; hang for 6-8 minutes but eventually passes through.
+      ;;
+      ;; tests: 4189 passed, 1 skipped, 2 warnings
+      #:test-flags
+      '(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
+             ;; Full test suite contains more than 70k tests; ignore network
+             ;; dependent, slow and compute intense tests, keep just unit
+             ;; tests.
+             "--ignore=tests/backends"
+             "--ignore=tests/dependencies"
+             "--ignore=tests/functional"
+             "--ignore=tests/integration"
+             "--ignore=tests/unit/botocore"
+             ;; Flaky, something to do with PATH disappearing from os.environ?
+             ;; Passes when run on its own, so maybe something else is
+             ;; modifying this during the test run.
+             "--ignore=tests/unit/customizations/emr/test_emr_utils.py"
+             ;; TypeError: 'Mock' object is not subscriptable
+             "-k" "not test_no_groff_or_mandoc_exists")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'ignore-deprecations
+            (lambda _
+              (substitute* "pyproject.toml"
+                (("\"error::") "\"ignore::"))))
+          (add-after 'unpack 'fix-reference-to-groff
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "awscli/help.py"
+                (("if self._exists_on_path\\('groff'\\):") "if True:")
+                (("cmdline = \\['groff'")
+                 (string-append "cmdline = ['"
+                                (search-input-file inputs "bin/groff")
+                                "'")))))
+          (add-before 'check 'pre-check
+            (lambda _ (setenv "HOME" "/tmp"))))))
+    (inputs
+     (list groff
+           ;; less
+           nss-certs-for-test
+           python-awscrt
+           python-colorama
+           python-dateutil
+           python-distro
+           python-docutils
+           python-jmespath
+           python-prompt-toolkit
+           python-ruamel.yaml
+           python-ruamel.yaml.clib
+           python-urllib3
+           python-wcwidth))
+    (native-inputs
+     (list python-flit-core
+           python-pytest
+           python-pytest-xdist))))
+
+;; XXX: This project missed maintainer upstream, see
+;; <https://github.com/joeyespo/grip/issues/387>.
+;; Consider to remove if it keeps failing to build.
+(define-public grip
+  (package
+    (name "grip")
+    (version "4.6.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/joeyespo/grip";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      ;; All tests fail requiring network access, ignore the whole file.
+      #~(list "--ignore=tests/test_github.py")
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; This fixes the removal of `charset` attribute of requests from
+          ;; Werkzeug 2.3.0.
+          ;; Fixed in grip's commit <2784eb2c1515f1cdb1554d049d48b3bff0f42085>.
+         (add-after 'unpack 'fix-response-encoding
+           (lambda _
+             (substitute* "grip/app.py"
+               (("response.charset")
+                "getattr(response, 'charset', 'utf-8')")))))))
+    (native-inputs
+     (list nss-certs-for-test
+           python-pytest
+           python-responses
+           python-setuptools
+           python-wheel))
+    (propagated-inputs
+     (list python-docopt
+           python-flask
+           python-markdown
+           python-path-and-address
+           python-pygments
+           python-requests))
+    (home-page "https://github.com/joeyespo/grip";)
+    (synopsis "Preview Markdown files using the GitHub API")
+    (description
+     "Grip is a command-line server application written in Python that uses
+the GitHub Markdown API to render a local Markdown file.  The styles and
+rendering come directly from GitHub, so you'll know exactly how it will
+appear.  Changes you make to the file will be instantly reflected in the
+browser without requiring a page refresh.")
+    (license license:expat)))
+
+(define-public gunicorn
+  (package
+    (name "gunicorn")
+    (version "25.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "gunicorn" version))
+       (sha256
+        (base32
+         "12g85w735s4dszjfidi4vh786rfxsa5rd60il0fcvxknkwpinkpp"))))
+    (outputs '("out" "doc"))
+    (build-system pyproject-build-system)
+    (arguments
+     `(#:test-flags
+       ;; Disable the geventlet tests because eventlet uses dnspython, which
+       ;; does not work in the build container due to lack of /etc/resolv.conf
+       '("--ignore=tests/workers/test_geventlet.py")
+       #:phases (modify-phases %standard-phases
+                  ;; XXX: The wrap phase includes native inputs on PYTHONPATH, 
(see
+                  ;; <https://bugs.gnu.org/25235>), leading to an inflated 
closure
+                  ;; size.  Override it to only add the essential entries.
+                  (replace 'wrap
+                    (lambda* (#:key native-inputs inputs outputs
+                              #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (python (assoc-ref (or native-inputs inputs)
+                                                "python"))
+                             (sitedir (string-append "/lib/python"
+                                                     (python-version python)
+                                                     "/site-packages")))
+                        (wrap-program (string-append out "/bin/gunicorn")
+                          `("PYTHONPATH" ":" prefix
+                            ,(map (lambda (output)
+                                    (string-append output sitedir))
+                                  (list python out))))))))))
+    (inputs (list bash-minimal))
+    (native-inputs
+     (list binutils ;for ctypes.util.find_library()
+           python-eventlet
+           python-gevent
+           python-h2
+           python-httpx
+           python-pytest
+           python-pytest-asyncio
+           python-setuptools
+           python-uvloop))
+    (propagated-inputs
+     (list python-packaging
+           python-setuptools
+           python-wheel))
+    (home-page "https://gunicorn.org/";)
+    (synopsis "Python WSGI HTTP Server for UNIX")
+    (description
+     "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
+Server for UNIX.  It’s a pre-fork worker model ported from Ruby’s
+Unicorn project.  The Gunicorn server is broadly compatible with
+various web frameworks, simply implemented, light on server resources,
+and fairly speedy.")
+    (license license:expat)))
+
+;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
+;; its tests
+(define-public gunicorn-bootstrap
+  (package
+    (inherit gunicorn)
+    (name "gunicorn")
+    (arguments `(#:tests? #f))
+    (properties '((hidden? . #t)))
+    (native-inputs `())))
+
+(define-public oauth2ms
+  (let ((commit "a1ef0cabfdea57e9309095954b90134604e21c08")
+        (revision "0"))
+    (package
+      (name "oauth2ms")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/harishkrupo/oauth2ms";)
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0dqi6n4npdrvb42r672n4sl1jl8z5lsk554fwiiihpj0faa9dx64"))))
+      (build-system copy-build-system)
+      (arguments
+       (list #:install-plan #~`(("oauth2ms" "bin/oauth2ms")
+                                ("." #$(string-append "share/doc/" name "-"
+                                                      version "/")
+                                 #:include-regexp ("\\.org$")))
+             #:phases #~(modify-phases %standard-phases
+                          (add-after 'install 'wrap-pythonpath
+                            (lambda* (#:key inputs outputs #:allow-other-keys)
+                              (let ((path (getenv "GUIX_PYTHONPATH")))
+                                (wrap-program (string-append #$output
+                                                             "/bin/oauth2ms")
+                                              `("GUIX_PYTHONPATH" ":" prefix
+                                                (,path)))))))))
+      (inputs (list bash-minimal python python-gnupg python-msal python-pyxdg))
+      (home-page "https://github.com/harishkrupo/oauth2ms";)
+      (synopsis "XOAUTH2 compatible Microsoft Office 365 token fetcher")
+      (description
+       "Oauth2ms can be used to fetch OAuth 2.0 tokens from the Microsoft 
Identity
+endpoint.  Additionally, it can encode the token in the XOAUTH2 format to be
+used as authentication in IMAP mail servers.")
+      (license license:asl2.0))))
+
 (define-public python-aioboto3
   (package
     (name "python-aioboto3")
@@ -7947,44 +8252,6 @@ platform.  It is built using industry standard OAuth2 
and OpenID Connect
 protocols.")
     (license license:expat)))
 
-(define-public oauth2ms
-  (let ((commit "a1ef0cabfdea57e9309095954b90134604e21c08")
-        (revision "0"))
-    (package
-      (name "oauth2ms")
-      (version (git-version "0.0.0" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/harishkrupo/oauth2ms";)
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "0dqi6n4npdrvb42r672n4sl1jl8z5lsk554fwiiihpj0faa9dx64"))))
-      (build-system copy-build-system)
-      (arguments
-       (list #:install-plan #~`(("oauth2ms" "bin/oauth2ms")
-                                ("." #$(string-append "share/doc/" name "-"
-                                                      version "/")
-                                 #:include-regexp ("\\.org$")))
-             #:phases #~(modify-phases %standard-phases
-                          (add-after 'install 'wrap-pythonpath
-                            (lambda* (#:key inputs outputs #:allow-other-keys)
-                              (let ((path (getenv "GUIX_PYTHONPATH")))
-                                (wrap-program (string-append #$output
-                                                             "/bin/oauth2ms")
-                                              `("GUIX_PYTHONPATH" ":" prefix
-                                                (,path)))))))))
-      (inputs (list bash-minimal python python-gnupg python-msal python-pyxdg))
-      (home-page "https://github.com/harishkrupo/oauth2ms";)
-      (synopsis "XOAUTH2 compatible Microsoft Office 365 token fetcher")
-      (description
-       "Oauth2ms can be used to fetch OAuth 2.0 tokens from the Microsoft 
Identity
-endpoint.  Additionally, it can encode the token in the XOAUTH2 format to be
-used as authentication in IMAP mail servers.")
-      (license license:asl2.0))))
-
 (define-public python-oauthlib
   (package
     (name "python-oauthlib")
@@ -8075,230 +8342,89 @@ supports url redirection and retries, and also gzip 
and deflate decoding.")
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-backend #~'unittest
-      #:test-flags #~(list "discover" "--verbose")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'disable-broken-tests
-            (lambda _
-              ;; Disable broken tests. These tests fail because they depend on
-              ;; specific DNS configuration and/or AWS credentials, which isn't
-              ;; available in this context.
-              (substitute* "test/test_auth.py"
-                (("def test_default_provider")
-                 "def _test_default_provider"))
-              (substitute* "test/test_aiohttp_client.py"
-                (("def test_h2_remote_end_stream_ordering")
-                 "def _test_h2_remote_end_stream_ordering")
-                (("def test_cross_thread_http2_client")
-                 "def _test_cross_thread_http2_client")
-                (("def test_h2_client")
-                 "def _test_h2_client")
-                (("def test_h2_manual_write_exception")
-                 "def _test_h2_manual_write_exception"))
-              (substitute* "test/test_http_client.py"
-                (("def test_h2_client")
-                 "def _test_h2_client")
-                (("def test_h2_remote_end_stream_ordering")
-                 "def _test_h2_remote_end_stream_ordering")
-                (("def test_h2_manual_write_exception")
-                 "def _test_h2_manual_write_exception"))
-              (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"))
-              (substitute* "test/test_io.py"
-                ;; This test seems specifically broken. It waits for a 
shutdown event
-                ;; from a group of singletons that will never occur because 
several of
-                ;; the singleton references are held beyond the lifetime of 
this test.
-                (("def test_shutdown_complete_singleton")
-                 "def _test_shutdown_complete_singleton"))))
-          (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"))
-                  (("^( +)self\\.no_certificate_revocation = False" all indent)
-                   (string-append all "\n"
-                                  indent "import os as _os\n"
-                                  indent "_ca_file = 
_os.environ.get('SSL_CERT_FILE')\n"
-                                  indent "if _ca_file:\n"
-                                  indent "    
self.override_default_trust_store(_read_binary_file(_ca_file))\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"))))))
-    (inputs (list openssl))
-    (native-inputs (list cmake-minimal
-                         nss-certs-for-test
-                         python-boto3
-                         python-setuptools
-                         python-websockets
-                         python-h2))
-    (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.
-    (name "awscli")
-    (version "1.43.11")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-              (url "https://github.com/aws/aws-cli";)
-              (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "1idvcnc6jw7xr1jqpza472ksj3i2kyk0bv8wr7acz3xnba1v8xmi"))))
-    (build-system pyproject-build-system)
-    (arguments
-     (list
-      ;; tests: 2715 passed, 32 warnings
-      #:test-flags
-      #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
-              ;; Complete test suite is huge and compute hungry, run just unit
-              ;; tests.
-              "--ignore=tests/dependencies"
-              "--ignore=tests/functional"
-              "--ignore=tests/integration"
-              ;; TypeError: 'Mock' object is not subscriptable.
-              "-k" "not test_no_groff_or_mandoc_exists")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'fix-reference-to-groff
-            (lambda _
-              ;; XXX: Consider to use wrap-program instead, it tries to parse
-              ;; the PATH.
-              (substitute* "awscli/help.py"
-                (("if self._exists_on_path\\('groff'\\):") "if 'groff':")
-                (("raise ExecutableNotFoundError\\('groff'\\)") "")
-                (("cmdline = \\['groff'")
-                 (format #f "cmdline = ['~a/bin/groff'"
-                         #$(this-package-input "groff-minimal"))))))
-          (add-before 'check 'set-environment
-            (lambda _
-              ;; PermissionError: [Errno 13] Permission denied:
-              ;; '/homeless-shelter'
-              (setenv "HOME" "/tmp"))))))
-    (native-inputs
-     (list python-pytest
-           python-pytest-xdist
-           python-setuptools
-           python-wheel))
-    (inputs
-     (list groff-minimal
-           python-botocore
-           python-colorama
-           python-docutils-0.19
-           python-pyyaml
-           python-rsa-for-awscli-1
-           python-s3transfer))
-    (home-page "https://aws.amazon.com/cli/";)
-    (synopsis "Command line client for AWS")
-    (description
-     "AWS CLI provides a unified command line interface to the Amazon Web
-Services (AWS) API.")
-    (license license:asl2.0)))
-
-(define-public awscli-2
-  (package
-    (inherit awscli)
-    ;; Note: updating awscli-2 typically requires updating python-awscrt.
-    (name "awscli")
-    ;; Upstream practices a very rapid (1h-1d) release cycles try to select
-    ;; any fresh one compatible with current state of dependencies in Guix.
-    (version "2.36.20")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/aws/aws-cli";)
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "1hv2zs5pm86b5bd66j2kfb9r8gz13cqnf8x5hmfv0ddszf9vnfgp"))))
-    (build-system pyproject-build-system)
-    (arguments
-     (list
-      ;; When updating and checking locally be very patient as build phase may
-      ;; hang for 6-8 minutes but eventually passes through.
-      ;;
-      ;; tests: 4189 passed, 1 skipped, 2 warnings
-      #:test-flags
-      '(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
-             ;; Full test suite contains more than 70k tests; ignore network
-             ;; dependent, slow and compute intense tests, keep just unit
-             ;; tests.
-             "--ignore=tests/backends"
-             "--ignore=tests/dependencies"
-             "--ignore=tests/functional"
-             "--ignore=tests/integration"
-             "--ignore=tests/unit/botocore"
-             ;; Flaky, something to do with PATH disappearing from os.environ?
-             ;; Passes when run on its own, so maybe something else is
-             ;; modifying this during the test run.
-             "--ignore=tests/unit/customizations/emr/test_emr_utils.py"
-             ;; TypeError: 'Mock' object is not subscriptable
-             "-k" "not test_no_groff_or_mandoc_exists")
+      #:test-backend #~'unittest
+      #:test-flags #~(list "discover" "--verbose")
       #:phases
       #~(modify-phases %standard-phases
-          (add-after 'unpack 'ignore-deprecations
+          (add-after 'unpack 'disable-broken-tests
             (lambda _
-              (substitute* "pyproject.toml"
-                (("\"error::") "\"ignore::"))))
-          (add-after 'unpack 'fix-reference-to-groff
+              ;; Disable broken tests. These tests fail because they depend on
+              ;; specific DNS configuration and/or AWS credentials, which isn't
+              ;; available in this context.
+              (substitute* "test/test_auth.py"
+                (("def test_default_provider")
+                 "def _test_default_provider"))
+              (substitute* "test/test_aiohttp_client.py"
+                (("def test_h2_remote_end_stream_ordering")
+                 "def _test_h2_remote_end_stream_ordering")
+                (("def test_cross_thread_http2_client")
+                 "def _test_cross_thread_http2_client")
+                (("def test_h2_client")
+                 "def _test_h2_client")
+                (("def test_h2_manual_write_exception")
+                 "def _test_h2_manual_write_exception"))
+              (substitute* "test/test_http_client.py"
+                (("def test_h2_client")
+                 "def _test_h2_client")
+                (("def test_h2_remote_end_stream_ordering")
+                 "def _test_h2_remote_end_stream_ordering")
+                (("def test_h2_manual_write_exception")
+                 "def _test_h2_manual_write_exception"))
+              (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"))
+              (substitute* "test/test_io.py"
+                ;; This test seems specifically broken. It waits for a 
shutdown event
+                ;; from a group of singletons that will never occur because 
several of
+                ;; the singleton references are held beyond the lifetime of 
this test.
+                (("def test_shutdown_complete_singleton")
+                 "def _test_shutdown_complete_singleton"))))
+          (add-after 'unpack 'override-cert-bundle-location
             (lambda* (#:key inputs #:allow-other-keys)
-              (substitute* "awscli/help.py"
-                (("if self._exists_on_path\\('groff'\\):") "if True:")
-                (("cmdline = \\['groff'")
-                 (string-append "cmdline = ['"
-                                (search-input-file inputs "bin/groff")
-                                "'")))))
-          (add-before 'check 'pre-check
-            (lambda _ (setenv "HOME" "/tmp"))))))
-    (inputs
-     (list groff
-           ;; less
-           nss-certs-for-test
-           python-awscrt
-           python-colorama
-           python-dateutil
-           python-distro
-           python-docutils
-           python-jmespath
-           python-prompt-toolkit
-           python-ruamel.yaml
-           python-ruamel.yaml.clib
-           python-urllib3
-           python-wcwidth))
-    (native-inputs
-     (list python-flit-core
-           python-pytest
-           python-pytest-xdist))))
+              (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"))
+                  (("^( +)self\\.no_certificate_revocation = False" all indent)
+                   (string-append all "\n"
+                                  indent "import os as _os\n"
+                                  indent "_ca_file = 
_os.environ.get('SSL_CERT_FILE')\n"
+                                  indent "if _ca_file:\n"
+                                  indent "    
self.override_default_trust_store(_read_binary_file(_ca_file))\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"))))))
+    (inputs (list openssl))
+    (native-inputs (list cmake-minimal
+                         nss-certs-for-test
+                         python-boto3
+                         python-setuptools
+                         python-websockets
+                         python-h2))
+    (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 python-wsgiproxy2
   (package
@@ -10471,77 +10597,6 @@ hard or impossible to fix in cssselect.")
 event loop.  It is implemented in Cython and uses libuv under the hood.")
     (license license:expat)))
 
-(define-public gunicorn
-  (package
-    (name "gunicorn")
-    (version "25.3.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "gunicorn" version))
-       (sha256
-        (base32
-         "12g85w735s4dszjfidi4vh786rfxsa5rd60il0fcvxknkwpinkpp"))))
-    (outputs '("out" "doc"))
-    (build-system pyproject-build-system)
-    (arguments
-     `(#:test-flags
-       ;; Disable the geventlet tests because eventlet uses dnspython, which
-       ;; does not work in the build container due to lack of /etc/resolv.conf
-       '("--ignore=tests/workers/test_geventlet.py")
-       #:phases (modify-phases %standard-phases
-                  ;; XXX: The wrap phase includes native inputs on PYTHONPATH, 
(see
-                  ;; <https://bugs.gnu.org/25235>), leading to an inflated 
closure
-                  ;; size.  Override it to only add the essential entries.
-                  (replace 'wrap
-                    (lambda* (#:key native-inputs inputs outputs
-                              #:allow-other-keys)
-                      (let* ((out (assoc-ref outputs "out"))
-                             (python (assoc-ref (or native-inputs inputs)
-                                                "python"))
-                             (sitedir (string-append "/lib/python"
-                                                     (python-version python)
-                                                     "/site-packages")))
-                        (wrap-program (string-append out "/bin/gunicorn")
-                          `("PYTHONPATH" ":" prefix
-                            ,(map (lambda (output)
-                                    (string-append output sitedir))
-                                  (list python out))))))))))
-    (inputs (list bash-minimal))
-    (native-inputs
-     (list binutils ;for ctypes.util.find_library()
-           python-eventlet
-           python-gevent
-           python-h2
-           python-httpx
-           python-pytest
-           python-pytest-asyncio
-           python-setuptools
-           python-uvloop))
-    (propagated-inputs
-     (list python-packaging
-           python-setuptools
-           python-wheel))
-    (home-page "https://gunicorn.org/";)
-    (synopsis "Python WSGI HTTP Server for UNIX")
-    (description
-     "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
-Server for UNIX.  It’s a pre-fork worker model ported from Ruby’s
-Unicorn project.  The Gunicorn server is broadly compatible with
-various web frameworks, simply implemented, light on server resources,
-and fairly speedy.")
-    (license license:expat)))
-
-;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
-;; its tests
-(define-public gunicorn-bootstrap
-  (package
-    (inherit gunicorn)
-    (name "gunicorn")
-    (arguments `(#:tests? #f))
-    (properties '((hidden? . #t)))
-    (native-inputs `())))
-
 (define-public python-httptools
   (package
     (name "python-httptools")
@@ -10732,61 +10787,6 @@ with GitLab instances through their API.")
 interfaces, inferring which argument is the path, and which is the address.")
     (license license:expat)))
 
-;; XXX: This project missed maintainer upstream, see
-;; <https://github.com/joeyespo/grip/issues/387>.
-;; Consider to remove if it keeps failing to build.
-(define-public grip
-  (package
-    (name "grip")
-    (version "4.6.1")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/joeyespo/grip";)
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8"))))
-    (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:test-flags
-      ;; All tests fail requiring network access, ignore the whole file.
-      #~(list "--ignore=tests/test_github.py")
-      #:phases
-      #~(modify-phases %standard-phases
-          ;; This fixes the removal of `charset` attribute of requests from
-          ;; Werkzeug 2.3.0.
-          ;; Fixed in grip's commit <2784eb2c1515f1cdb1554d049d48b3bff0f42085>.
-         (add-after 'unpack 'fix-response-encoding
-           (lambda _
-             (substitute* "grip/app.py"
-               (("response.charset")
-                "getattr(response, 'charset', 'utf-8')")))))))
-    (native-inputs
-     (list nss-certs-for-test
-           python-pytest
-           python-responses
-           python-setuptools
-           python-wheel))
-    (propagated-inputs
-     (list python-docopt
-           python-flask
-           python-markdown
-           python-path-and-address
-           python-pygments
-           python-requests))
-    (home-page "https://github.com/joeyespo/grip";)
-    (synopsis "Preview Markdown files using the GitHub API")
-    (description
-     "Grip is a command-line server application written in Python that uses
-the GitHub Markdown API to render a local Markdown file.  The styles and
-rendering come directly from GitHub, so you'll know exactly how it will
-appear.  Changes you make to the file will be instantly reflected in the
-browser without requiring a page refresh.")
-    (license license:expat)))
-
 (define-public python-port-for
   (package
     (name "python-port-for")

Reply via email to