guix_mirror_bot pushed a commit to branch ungraft
in repository guix.

commit 61c04f1987012cee91e9290e23bef3021703b5ba
Author: Hugo Buddelmeijer <[email protected]>
AuthorDate: Sun Dec 14 15:59:20 2025 +0100

    gnu: python-pytest-aiohttp: Update to 1.1.0.
    
    * gnu/packages/python-check.scm (python-pytest-aiohttp): Update to 1.1.0.
    [source]: Switch to git-fetch.
    [build-system]: Switch to pyproject-build-system.
    [arguments]<#:phases>: Add 'set-version and 'create-pytest-ini phases.
    [propagated-inputs]: Add python-pytest-asyncio.
    [native-inputs]: Add python-setuptools and python-setuptools-scm.
    
    Change-Id: Ia25a1d8a8dce23ae9a4773cbf9a8b81e50abb4ac
    Signed-off-by: Rutherther <[email protected]>
---
 gnu/packages/python-check.scm | 35 ++++++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 60de664ef3..0a5ee09abd 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2148,19 +2148,40 @@ Changes over @code{nose}:
 (define-public python-pytest-aiohttp
   (package
     (name "python-pytest-aiohttp")
-    (version "0.3.0")
+    (version "1.1.0")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "pytest-aiohttp" version))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/aio-libs/pytest-aiohttp";)
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "0kx4mbs9bflycd8x9af0idcjhdgnzri3nw1qb0vpfyb3751qaaf9"))))
-    (build-system python-build-system)
+         "0hqj6fqqhvyy61ikwqjcs1p4g3s7z01prsjgck19r8as4pfih5g7"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-version
+            (lambda _
+              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
+          ;; Patch based on
+          ;; https://github.com/aio-libs/pytest-aiohttp/pull/115/files
+          (add-after 'unpack 'create-pytest-ini
+            (lambda _
+              (call-with-output-file "pytest.ini"
+                (lambda (port)
+                  (format port "[pytest]
+asyncio_default_fixture_loop_scope = function"))))))))
     (native-inputs
-     (list python-pytest))
+     (list python-pytest
+           python-setuptools
+           python-setuptools-scm))
     (propagated-inputs
-     (list python-aiohttp))
+     (list python-aiohttp
+           python-pytest-asyncio))
     (home-page "https://github.com/aio-libs/pytest-aiohttp/";)
     (synopsis "Pytest plugin for aiohttp support")
     (description "This package provides a pytest plugin for aiohttp support.")

Reply via email to