diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2024-12-15 13:30:59 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-16 19:28:08 +0000 |
commit | d7890af335ed046ba245137fb13031be964d03f5 (patch) | |
tree | cbae62f435f662901069d0c9b6adc55b961cf6d0 | |
parent | 8bb3bb19c2cabdbea9ece2358c57809c2c4b1561 (diff) | |
download | guix-d7890af335ed046ba245137fb13031be964d03f5.tar.gz guix-d7890af335ed046ba245137fb13031be964d03f5.zip |
import: pypi: Add python-wheel to native inputs if setuptools is used.
* guix/import/pypi.scm (compute-inputs): Add missing python-wheel if
necessary.
Change-Id: Iedad213a6684856e48349289c4d9beba953f396b
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r-- | guix/import/pypi.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 1fd3481a09..1a0bd76ba4 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -470,12 +470,18 @@ the corresponding list of <upstream-input> records." (type type)))) (sort deps string-ci<?))) + (define (add-missing-native-inputs inputs) + ;; setuptools cannot build wheels without the python-wheel. + (if (member "setuptools" inputs) + (cons "wheel" inputs) + inputs)) + ;; TODO: Record version number ranges in <upstream-input>. (let ((dependencies (guess-requirements source-url wheel-url archive))) (match dependencies ((propagated native) (append (requirements->upstream-inputs propagated 'propagated) - (requirements->upstream-inputs native 'native)))))) + (requirements->upstream-inputs (add-missing-native-inputs native) 'native)))))) (define* (pypi-package-inputs pypi-package #:optional version) "Return the list of <upstream-input> for PYPI-PACKAGE. This procedure |