aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2024-12-15 17:02:44 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-12-16 19:28:44 +0000
commita3ffb920f14cd0d31d1e7067e11dc523fe380996 (patch)
tree2efa1d844610f4c11bfaf09c0d0dd80655101e59
parentc904350a81f9ff47cc025bc9d0d48f1bd2ead30e (diff)
downloadguix-a3ffb920f14cd0d31d1e7067e11dc523fe380996.tar.gz
guix-a3ffb920f14cd0d31d1e7067e11dc523fe380996.zip
import: pypi: Move deduplication to final processing step.
* guix/import/pypi.scm (parse-requires.txt): Remove deduplication. (parse-wheel-metadata): Remove deduplication. (compute-inputs): Instead do it here on all the collected inputs. Change-Id: I2504cc693e9bf2e4cc44fd37b5823904dbaaa925 Reviewed-by: Ludovic Courtès <ludo@gnu.org> Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r--guix/import/pypi.scm16
1 files changed, 6 insertions, 10 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index d0dda607a1..935ecd33d0 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -283,12 +283,7 @@ satisfy."
(let ((line (read-line port)))
(cond
((eof-object? line)
- ;; Duplicates can occur, since the same requirement can be
- ;; listed multiple times with different conditional markers, e.g.
- ;; pytest >= 3 ; python_version >= "3.3"
- ;; pytest < 3 ; python_version < "3.3"
- (map (compose reverse delete-duplicates)
- (list required-deps test-deps)))
+ (list required-deps test-deps))
((or (string-null? line) (comment? line))
(loop required-deps test-deps inside-test-section? optional?))
((section-header? line)
@@ -342,8 +337,7 @@ returned value."
(let ((line (read-line port)))
(cond
((eof-object? line)
- (map (compose reverse delete-duplicates)
- (list required-deps test-deps)))
+ (list required-deps test-deps))
((and (requires-dist-header? line) (not (extra? line)))
(loop (cons (specification->requirement-name
(requires-dist-value line))
@@ -486,8 +480,10 @@ the corresponding list of <upstream-input> records."
(let ((dependencies (guess-requirements source-url wheel-url archive)))
(match dependencies
((propagated native)
- (append (requirements->upstream-inputs propagated 'propagated)
- (requirements->upstream-inputs (add-missing-native-inputs native) 'native))))))
+ (append (requirements->upstream-inputs (delete-duplicates propagated)
+ 'propagated)
+ (requirements->upstream-inputs (delete-duplicates (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
liana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-dialyxir.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-dialyxir): New variable. Change-Id: I387062e0aaaded448022aa7534b95859b5979a06 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-erlex.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-erlex): New variable. Change-Id: Ia518ad5fd32d3f5942b20113e61e4ef7e7895ff3 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-credo.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-credo): New variable. Change-Id: I6df0d926e0fb96caa65d081892026b3495431c83 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-excoveralls.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-excoveralls): New variable. Change-Id: Ib271d8a7393e21178806df28ab892afe99757297 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-castore.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-castore): New variable. Change-Id: Iea1fea8241d19ff35a183af9c3fbf2ed5198a259 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-inch-ex.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-inch-ex): New variable. Change-Id: I6e98424528a0264a2587d28fcf065fa74eff0f1a Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-bunt.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-bunt): New variable. Change-Id: Ib84797c31d6ab40d59b87b040993dae9391ead6b Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-file-system.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-file-system): New variable. Change-Id: I54e9c9069ddf150bb0c882775b0b2c9d5e59abd6 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-jason.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-jason): New variable. Change-Id: Iadd816e2b5db6d146728aacb4d6b2c66aba4304c Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-makeup.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-makeup): New variable. Change-Id: I21fe9ffddb4c95a2c67b74340b1105c2a54d3c82 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> 2023-12-17gnu: Add elixir-nimble-parsec.Pierre-Henry Fröhring * gnu/packages/elixir-xyz.scm (elixir-nimble-parsec): New variable. Change-Id: I79bab8095aee3212bc295354ead55df49ef92d17 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>