guix_mirror_bot pushed a commit to branch master
in repository guix.

commit d6cf748d564de9186ff796092de933d89768bfcd
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sun Oct 12 21:14:54 2025 +0100

    gnu: python-pynixutil: Build with python-poetry-core.
    
    * gnu/packages/python-xyz.scm (python-pynixutil)[source] <snippet>: Drop
    it and ignore test file in <#:test-flags> instead.
    [arguments] <test-flags>: Ignore test file requiring Nix.
    <phases>: Add 'use-poetry-core.
    [native-inputs]: Remove poetry; add python-poetry-core.
    
    Change-Id: I9691533aaff6e5217fe7497056c2b4cab0cf98f4
---
 gnu/packages/python-xyz.scm | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index dccbc4172b..358fad591e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29210,20 +29210,31 @@ environments.")
   (package
     (name "python-pynixutil")
     (version "0.5.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/nix-community/pynixutil";)
-                    (commit version)))
-              (file-name (git-file-name name version))
-              ;; Derivation test uses nix.
-              (modules '((guix build utils)))
-              (snippet '(delete-file "tests/test_drv.py"))
-              (sha256
-               (base32
-                "1lnspcai7mqpv73bbd8kgyw63fxwgkwvfkl09b2bl5y2g2v7np6m"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/nix-community/pynixutil";)
+              (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1lnspcai7mqpv73bbd8kgyw63fxwgkwvfkl09b2bl5y2g2v7np6m"))))
     (build-system pyproject-build-system)
-    (native-inputs (list poetry python-pytest))
+    (arguments
+     (list
+      #:test-flags
+      ;; Tests require nix in the PATH.
+      #~(list "--ignore=tests/test_drv.py")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'use-poetry-core
+            (lambda _
+              ;; Patch to use the core poetry API.
+              (substitute* "pyproject.toml"
+                (("poetry.masonry.api") "poetry.core.masonry.api")))))))
+    (native-inputs
+     (list python-poetry-core
+           python-pytest))
     (home-page "https://github.com/nix-community/pynixutil";)
     (synopsis "Utility functions for working with data from Nix in Python")
     (description

Reply via email to