[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70923] [PATCH 07/13] import: pypi: Use 'maybe-list-field' procedure
From: |
Herman Rimm |
Subject: |
[bug#70923] [PATCH 07/13] import: pypi: Use 'maybe-list-field' procedure. |
Date: |
Mon, 13 May 2024 22:08:04 +0200 |
* guix/import/pypi.scm (maybe-inputs): Delete procedure.
(make-pypi-sexp): Use 'maybe-list-field' and 'maybe-upstream-inputs'
procedures.
---
guix/import/pypi.scm | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 6719fde330..c46f8897b9 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -201,18 +201,6 @@ (define (wheel-url->extracted-directory wheel-url)
((name version _ ...)
(string-append name "-" version ".dist-info"))))
-(define (maybe-inputs package-inputs input-type)
- "Given a list of PACKAGE-INPUTS, tries to generate the 'inputs' field of a
-package definition. INPUT-TYPE, a symbol, is used to populate the name of
-the input field."
- (match package-inputs
- (()
- '())
- ((package-inputs ...)
- `((,input-type (list ,@(map (compose string->symbol
- upstream-input-downstream-name)
- package-inputs)))))))
-
(define %requirement-name-regexp
;; Regexp to match the requirement name in a requirement specification.
@@ -538,10 +526,10 @@ (define* (make-pypi-sexp pypi-package
bytevector->nix-base32-string)))))
,@(maybe-upstream-name name)
(build-system pyproject-build-system)
- ,@(maybe-inputs (upstream-source-propagated-inputs source)
- 'propagated-inputs)
- ,@(maybe-inputs (upstream-source-native-inputs source)
- 'native-inputs)
+ ,@(maybe-upstream-inputs 'propagated-inputs
+ (upstream-source-propagated-inputs source))
+ ,@(maybe-upstream-inputs 'native-inputs
+ (upstream-source-native-inputs source))
(home-page ,(project-info-home-page info))
(synopsis ,(project-info-summary info))
(description ,(beautify-description
--
2.41.0
- [bug#70923] [PATCH 04/13] tests: elm: Adjust to new-style package inputs., (continued)
- [bug#70923] [PATCH 04/13] tests: elm: Adjust to new-style package inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 08/13] import: elpa: Use maybe-propagated-inputs procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 11/13] import: cpan: Use 'maybe-upstream-inputs' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 05/13] import: crate: Emit new-style package inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 13/13] import: hexpm: Use (guix import utils) 'maybe-inputs' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 03/13] tests: go: Adjust to new-style package inputs., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 10/13] import: cran: Use 'maybe-list-field' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 09/13] import: hackage: Use 'maybe-list-field' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 06/13] import: utils: Add 'maybe-upstream-inputs' procedure., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 12/13] import: egg: Use maybe-*inputs procedures., Herman Rimm, 2024/05/13
- [bug#70923] [PATCH 07/13] import: pypi: Use 'maybe-list-field' procedure.,
Herman Rimm <=