mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 13:36:36 +01:00
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>
This commit is contained in:
parent
8bb3bb19c2
commit
d7890af335
1 changed files with 7 additions and 1 deletions
|
@ -470,12 +470,18 @@ (define (requirements->upstream-inputs deps type)
|
|||
(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
|
||||
|
|
Loading…
Reference in a new issue