diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-11 21:50:23 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-09-25 09:35:35 +0100 |
| commit | 70a675141c530684a332142f979427931b1df483 (patch) | |
| tree | 3e9584da17a7bed4011c328ce473ed8fd083077b /gnu/packages/python-build.scm | |
| parent | 1e1b55cb90db12b48c8c16c738c7f6014eb0701c (diff) | |
gnu: python-flit-core-bootstrap: Switch to pyproject.
* gnu/packages/python-build.scm (python-flit-core-bootstrap):
[build-system]: Use pyproject.
[arguments] <phases>: Add 'fix-license; use default 'install.
Change-Id: I79baaf6885c0c07ad508f110307fc31487439fd4
Diffstat (limited to 'gnu/packages/python-build.scm')
| -rw-r--r-- | gnu/packages/python-build.scm | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index 30589f1377f..7c2883eddff 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -614,30 +614,32 @@ compatible build front-ends to build Poetry managed projects.") (uri (pypi-uri "flit" version)) (sha256 (base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list + ;; flit-core has a test suite, but it requires Pytest. Disable it so + ;; as to not pull pytest as an input. + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-license + ;; flit_core bundles the 'tomli' TOML parser, to avoid a + ;; bootstrapping problem. See + ;; <https://github.com/pypa/packaging-problems/issues/342>. + (lambda _ + (delete-file-recursively "flit_core/flit_core/vendor") + (substitute* "flit_core/pyproject.toml" + (("license-files.*") "license-files = [\"LICENSE*\"]\n")))) + (replace 'build + ;; flit-core requires itself to build. Luckily, a + ;; bootstrapping script exists, which does so using just + ;; the checkout sources and Python. + (lambda _ + (chdir "flit_core") + (invoke "python" "build_dists.py"))) + (delete 'sanity-check)))) (propagated-inputs (list python-toml)) - (arguments - ;; flit-core has a test suite, but it requires Pytest. Disable it so - ;; as to not pull pytest as an input. - `(#:tests? #f - #:phases - (modify-phases %standard-phases - (replace 'build - ;; flit-core requires itself to build. Luckily, a - ;; bootstrapping script exists, which does so using just - ;; the checkout sources and Python. - (lambda _ - (invoke "python" "flit_core/build_dists.py"))) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (whl (car (find-files "." "\\.whl$")))) - (invoke "pip" "--no-cache-dir" "--no-input" - "install" "--no-deps" "--prefix" out whl)))) - ;; The sanity-check phase fails because flit depends on tomli at - ;; run-time, but this core variant avoids it to avoid a cycle. - (delete 'sanity-check)))) (home-page "https://github.com/pypa/flit") (synopsis "Core package of the Flit Python build system") (description "This package provides @code{flit-core}, a PEP 517 build |
