mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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
This commit is contained in:
parent
41d7554260
commit
54b11f59ab
1 changed files with 24 additions and 22 deletions
|
@ -614,30 +614,32 @@ compatible build front-ends to build Poetry managed projects.")
|
||||||
(uri (pypi-uri "flit" version))
|
(uri (pypi-uri "flit" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w"))))
|
(base32 "0h1pxi2hgr95321bgl45l86693zl14l3shj0idsyg4k9v56z700w"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(propagated-inputs
|
|
||||||
(list python-toml))
|
|
||||||
(arguments
|
(arguments
|
||||||
|
(list
|
||||||
;; flit-core has a test suite, but it requires Pytest. Disable it so
|
;; flit-core has a test suite, but it requires Pytest. Disable it so
|
||||||
;; as to not pull pytest as an input.
|
;; as to not pull pytest as an input.
|
||||||
`(#:tests? #f
|
#:tests? #f
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-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
|
(replace 'build
|
||||||
;; flit-core requires itself to build. Luckily, a
|
;; flit-core requires itself to build. Luckily, a
|
||||||
;; bootstrapping script exists, which does so using just
|
;; bootstrapping script exists, which does so using just
|
||||||
;; the checkout sources and Python.
|
;; the checkout sources and Python.
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "python" "flit_core/build_dists.py")))
|
(chdir "flit_core")
|
||||||
(replace 'install
|
(invoke "python" "build_dists.py")))
|
||||||
(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))))
|
(delete 'sanity-check))))
|
||||||
|
(propagated-inputs
|
||||||
|
(list python-toml))
|
||||||
(home-page "https://github.com/pypa/flit")
|
(home-page "https://github.com/pypa/flit")
|
||||||
(synopsis "Core package of the Flit Python build system")
|
(synopsis "Core package of the Flit Python build system")
|
||||||
(description "This package provides @code{flit-core}, a PEP 517 build
|
(description "This package provides @code{flit-core}, a PEP 517 build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue