@@ -502,9 +502,9 @@ (define-public python-packaging-bootstrap
;;; The name 'python-pypa-build' is chosen rather than 'python-build' to avoid
;;; a name clash with python-build from (guix build-system python).
-(define-public python-pypa-build
+(define-public python-pypa-build-bootstrap
(package
- (name "python-pypa-build")
+ (name "python-pypa-build-bootstrap")
(version "0.7.0")
(source (origin
(method url-fetch)
@@ -534,6 +534,41 @@ (define-public python-pypa-build
order to make bootstrapping easier.")
(license license:expat)))
+(define-public python-pypa-build
+ (package
+ (inherit python-pypa-build-bootstrap)
+ (name "python-pypa-build")
+ (version "0.10.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "build" version))
+ (sha256
+ (base32
+ "0scj5k586n8rmnlqhay5j43ci1z8ip3sm0j4f3b52nfvmxj15dym"))))
+ (arguments
+ (list
+ #:tests? #f ; avoid needing pytest as an input
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-toml-instead-of-tomli
+ ;; Using toml instead of tomli eases bootstrapping.
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("'tomli.*")
+ "'toml'"))))
+ (replace 'build
+ (lambda _
+ ;(setenv "PYTHONPATH" ".")
+ (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+ (replace 'install
+ (lambda _
+ (let ((whl (car (find-files "dist" "\\.whl$"))))
+ (invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--no-deps" "--prefix" #$output
+ "--ignore-installed" whl)))))))
+ (native-inputs (list python-flit-core-bootstrap python-pypa-build-bootstrap))
+ (propagated-inputs (list python-pyproject-hooks))))
+
(define-public python-poetry-core
(package
(name "python-poetry-core")