guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#62252] [PATCH 10/19] gnu: Add python-hatchling.


From: Liliana Marie Prikler
Subject: [bug#62252] [PATCH 10/19] gnu: Add python-hatchling.
Date: Sat, 18 Mar 2023 08:44:38 +0100

* gnu/packages/python-build.scm (python-hatchling)
(python-hatchling-ouroboros): New variables.
---
 gnu/packages/python-build.scm | 46 +++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index 1281824a97..cb6301689a 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -28,6 +28,7 @@ (define-module (gnu packages python-build)
   #:use-module (gnu packages)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -622,3 +623,48 @@ (define-public python-pluggy-next
        (sha256
         (base32
          "0n8iadlas2z1b4h0fc73b043c7iwfvx9rgvqm1azjmffmhxkf922"))))))
+
+(define-public python-hatchling
+  (package
+    (name "python-hatchling")
+    (version "1.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "hatchling" version))
+              (sha256
+               (base32
+                "1isk1kqra0sm2sj2yp39sgk62mx0bp1jnbkwdcl3a1vjrji7blpq"))))
+    (arguments
+     ;; Tests don't appear to be integrated into build.
+     ;; Also, we can't rely on python-pytest anyway, as that's in
+     ;; (gnu packages python-check)...
+     (list #:tests? #f))
+    (propagated-inputs
+     (list python-editables
+           python-pathspec
+           python-pluggy-next
+           python-tomli))
+    (native-inputs (list python-hatchling-ouroboros))
+    (build-system pyproject-build-system)
+    (home-page "https://hatch.pypa.io/";)
+    (synopsis "Modern, extensible Python build backend")
+    (description "Modern, extensible Python build backend")
+    (license license:expat)))
+
+(define python-hatchling-ouroboros
+  (package/inherit python-hatchling
+    (name "python-hatchling-ouroboros")
+    (version (package-version python-hatchling))
+    (arguments
+     (list
+      #:tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (delete 'build)
+          (replace 'install
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (copy-recursively "src/hatchling/"
+                                (string-append (site-packages inputs outputs)
+                                               "/hatchling")))))))
+    (native-inputs '())))
-- 
2.39.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]