@@ -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,50 @@ (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
+ (list
+ ;; 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)...
+ #:tests? #false
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap-without-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-pathspec
+ python-packaging-bootstrap
+ python-pluggy
+ python-tomli))
+ (build-system pyproject-build-system)
+ (home-page "https://hatch.pypa.io/")
+ (synopsis "Extensible Python build backend")
+ (description "Hatchling is an extensible Python build backend.")
+ (license license:expat)))
@@ -1755,51 +1755,6 @@ (define-public python-boolean.py
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://hatch.pypa.io/")
- (synopsis "Extensible Python build backend")
- (description "Hatchling is an extensible Python build backend.")
- (license license:expat)))
-
(define-public python-hdf4
(package
(name "python-hdf4")