diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-07-15 22:12:53 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-09-25 09:35:36 +0100 |
| commit | e4c2f803fa210ef560cacb7e90ac2301f978a37d (patch) | |
| tree | 6896b07fe702a1f381bd9bf94996329fd7c26d3d /gnu/packages/python-build.scm | |
| parent | 92b76e8c12676789a266c3c0f2b23c8817c09d87 (diff) | |
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
Diffstat (limited to 'gnu/packages/python-build.scm')
| -rw-r--r-- | gnu/packages/python-build.scm | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index c640a1eb999..469b0fc0c4a 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm | |||
| @@ -672,21 +672,33 @@ specified by PEP 517, @code{flit_core.buildapi}.") | |||
| 672 | (package | 672 | (package |
| 673 | (name "python-flit-scm") | 673 | (name "python-flit-scm") |
| 674 | (version "1.7.0") | 674 | (version "1.7.0") |
| 675 | (source (origin | 675 | (source |
| 676 | (method url-fetch) | 676 | (origin |
| 677 | (uri (pypi-uri "flit_scm" version)) | 677 | (method url-fetch) |
| 678 | (sha256 | 678 | (uri (pypi-uri "flit_scm" version)) |
| 679 | (base32 | 679 | (sha256 |
| 680 | "1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn")))) | 680 | (base32 "1ckbkykfr7f7wzjzgh0gm7h6v3pqzx2l28rw6dsvl6zk4kxxc6wn")))) |
| 681 | (build-system pyproject-build-system) | 681 | (build-system pyproject-build-system) |
| 682 | (arguments (list #:tests? #f ;to avoid extra dependencies | 682 | (arguments |
| 683 | ;; flit-scm wants to use flit-core, which it renames to | 683 | (list |
| 684 | ;; 'buildapi', but that isn't found even when adding the | 684 | #:tests? #f ;no tests in PyPI archive or Git checkout |
| 685 | ;; current directory to PYTHONPATH. Use setuptools' | 685 | #:phases |
| 686 | ;; builder instead. | 686 | #~(modify-phases %standard-phases |
| 687 | #:build-backend "setuptools.build_meta")) | 687 | (add-after 'unpack 'fix-backend |
| 688 | (propagated-inputs (list python-flit-core python-setuptools-scm python-tomli)) | 688 | ;; flit_scm imports flit_core's buildapi and tries to make it |
| 689 | (native-inputs (list python-setuptools python-wheel)) | 689 | ;; available as "flit_scm:buildapi", see comment in |
| 690 | ;; <flit_scm/__init__.py>; but it fails during build phase with | ||
| 691 | ;; error: ModuleNotFoundError: No module named | ||
| 692 | ;; 'flit_scm:buildapi'. | ||
| 693 | ;; | ||
| 694 | ;; Use flit_core.buildapi directly to build flit_scm. | ||
| 695 | (lambda _ | ||
| 696 | (substitute* "pyproject.toml" | ||
| 697 | (("flit_scm:buildapi") "flit_core.buildapi"))))))) | ||
| 698 | (propagated-inputs | ||
| 699 | (list python-flit-core | ||
| 700 | python-setuptools-scm | ||
| 701 | python-tomli)) | ||
| 690 | (home-page "https://gitlab.com/WillDaSilva/flit_scm") | 702 | (home-page "https://gitlab.com/WillDaSilva/flit_scm") |
| 691 | (synopsis "PEP 518 build backend combining flit_core and setuptools_scm") | 703 | (synopsis "PEP 518 build backend combining flit_core and setuptools_scm") |
| 692 | (description "This package provides a PEP 518 build backend that uses | 704 | (description "This package provides a PEP 518 build backend that uses |
