guix-commits
[Top][All Lists]
Advanced

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

04/04: gnu: Add python-hatchling.


From: guix-commits
Subject: 04/04: gnu: Add python-hatchling.
Date: Sat, 25 Mar 2023 18:40:28 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 9512fb83d2f9d5e0df60ed8a26d6905301b19e26
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sat Mar 25 23:37:14 2023 +0100

    gnu: Add python-hatchling.
    
    * gnu/packages/python-xyz.scm (python-hatchling): New variable.
---
 gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 10df74fc45..3f0005faa2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1755,6 +1755,51 @@ compositions like @code{XOR} and @code{NAND} are 
emulated on top of them.
 Expressions are constructed from parsed strings or directly in Python.")
     (license license:bsd-2)))
 
+(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"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #false ;there are none
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'do-not-depend-on-hatchling
+            (lambda _
+              ;; We don't use hatchling.
+              (delete-file "pyproject.toml")
+              (call-with-output-file "pyproject.toml"
+                (lambda (port)
+                  (format port "\
+[build-system]
+build-backend = 'setuptools.build_meta'
+requires = ['setuptools']
+")))
+              (call-with-output-file "setup.cfg"
+                (lambda (port)
+                  (format port "\
+[metadata]
+name = hatchling
+version = '~a' " #$version))))))))
+    (propagated-inputs
+     (list python-editables
+           python-importlib-metadata
+           python-packaging
+           python-pathspec
+           python-pluggy
+           python-tomli))
+    (home-page "https://pypi.org/project/hatchling/";)
+    (synopsis "Extensible Python build backend")
+    (description "Hatchling is an extensible Python build backend.")
+    (license license:expat)))
+
 (define-public python-hdf4
   (package
    (name "python-hdf4")



reply via email to

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