diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2024-12-15 16:56:53 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-16 19:28:34 +0000 |
commit | c904350a81f9ff47cc025bc9d0d48f1bd2ead30e (patch) | |
tree | cf43e0d3398b23713bd5be559ba034d12915e4c9 | |
parent | d7890af335ed046ba245137fb13031be964d03f5 (diff) | |
download | guix-c904350a81f9ff47cc025bc9d0d48f1bd2ead30e.tar guix-c904350a81f9ff47cc025bc9d0d48f1bd2ead30e.tar.gz |
import: pypi: Default to setuptools as build system input.
* guix/import/pypi.scm (guess-requirements): Default to setuptools if
pyproject.toml does not exist.
Change-Id: I600bd0a44342847878e3a2a7041bd7e7c7d30769
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r-- | guix/import/pypi.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 1a0bd76ba4..d0dda607a1 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -448,15 +448,21 @@ cannot determine package dependencies from source archive: ~a~%") (((first-propagated first-native) (second-propagated second-native)) (list (append first-propagated second-propagated) (append first-native second-native))))) + (define default-pyproject.toml-dependencies + ;; If there is no pyproject.toml, we assume it’s an old-style setuptools-based project. + '(() ("setuptools"))) + ;; requires.txt and the metadata of a wheel contain redundant information, ;; so fetch only one of them, preferring requires.txt from the source ;; distribution, which we always fetch, since the source tarball also ;; contains pyproject.toml. (match (guess-requirements-from-source) ((from-pyproject.toml #f) - (merge (or from-pyproject.toml '(() ())) (or (guess-requirements-from-wheel) '(() ())))) + (merge (or from-pyproject.toml default-pyproject.toml-dependencies) + (or (guess-requirements-from-wheel) '(() ())))) ((from-pyproject.toml from-requires.txt) - (merge (or from-pyproject.toml '(() ())) from-requires.txt)))) + (merge (or from-pyproject.toml default-pyproject.toml-dependencies) + from-requires.txt)))) (define (compute-inputs source-url wheel-url archive) "Given the SOURCE-URL and WHEEL-URL of an already downloaded ARCHIVE, return |