mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-flit-scm: Improve package.
Reduce closure size by removing redundant python-setuptools and python-wheel as it was a workaround import issue which was resolved by using flit_core.buildapi directly. * gnu/packages/python-build.scm (python-flit-scm): Fix indentation. [arguments] <build-backend>: Let it auto detect. <phases>: Add 'fix-backend. [native-inputs]: Remove python-setuptools and python-wheel. Change-Id: Ib3f591365411ba5f8b710a8256a324dfb7d5b565
This commit is contained in:
parent
1bb83e9e6d
commit
989f55b4ba
1 changed files with 26 additions and 14 deletions
|
@ -672,21 +672,33 @@ specified by PEP 517, @code{flit_core.buildapi}.")
|
|||
(package
|
||||
(name "python-flit-scm")
|
||||
(version "1.7.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "flit_scm" version))
|
||||
(sha256
|
||||
(base32
|
||||
"1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn"))))
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "flit_scm" version))
|
||||
(sha256
|
||||
(base32 "1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn"))))
|
||||
(build-system pyproject-build-system)
|
||||
(arguments (list #:tests? #f ;to avoid extra dependencies
|
||||
;; flit-scm wants to use flit-core, which it renames to
|
||||
;; 'buildapi', but that isn't found even when adding the
|
||||
;; current directory to PYTHONPATH. Use setuptools'
|
||||
;; builder instead.
|
||||
#:build-backend "setuptools.build_meta"))
|
||||
(propagated-inputs (list python-flit-core python-setuptools-scm python-tomli))
|
||||
(native-inputs (list python-setuptools python-wheel))
|
||||
(arguments
|
||||
(list
|
||||
#:tests? #f ;no tests in PyPI archive or Git checkout
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-backend
|
||||
;; flit_scm imports flit_core's buildapi and tries to make it
|
||||
;; available as "flit_scm:buildapi", see comment in
|
||||
;; <flit_scm/__init__.py>; but it fails during build phase with
|
||||
;; error: ModuleNotFoundError: No module named
|
||||
;; 'flit_scm:buildapi'.
|
||||
;;
|
||||
;; Use flit_core.buildapi directly to build flit_scm.
|
||||
(lambda _
|
||||
(substitute* "pyproject.toml"
|
||||
(("flit_scm:buildapi") "flit_core.buildapi")))))))
|
||||
(propagated-inputs
|
||||
(list python-flit-core
|
||||
python-setuptools-scm
|
||||
python-tomli))
|
||||
(home-page "https://gitlab.com/WillDaSilva/flit_scm")
|
||||
(synopsis "PEP 518 build backend combining flit_core and setuptools_scm")
|
||||
(description "This package provides a PEP 518 build backend that uses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue