civodul pushed a commit to branch master
in repository guix.

commit 4ebc1aba19d75af1b22f269f042a51513205f20c
Author: Ludovic Courtès <[email protected]>
AuthorDate: Mon Dec 30 10:40:37 2024 +0100

    import: pypi: Preserve order of dependencies from ‘requires.txt’ and wheel.
    
    Fixes a regression introduced in
    a3ffb920f14cd0d31d1e7067e11dc523fe380996 and revealed by
    ‘tests/pypi.scm’.
    
    * guix/import/pypi.scm (parse-requires.txt): Reverse REQUIRED-DEPS and
    TEST-DEPS when returning.
    (parse-wheel-metadata): Likewise.
    
    Change-Id: I2c374505052f0d9e46e7cc1c11d3e97ab522e068
---
 guix/import/pypi.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 935ecd33d0..4af02dd250 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -283,7 +283,8 @@ satisfy."
         (let ((line (read-line port)))
           (cond
            ((eof-object? line)
-            (list required-deps test-deps))
+            (list (reverse required-deps)
+                  (reverse test-deps)))
            ((or (string-null? line) (comment? line))
             (loop required-deps test-deps inside-test-section? optional?))
            ((section-header? line)
@@ -337,7 +338,8 @@ returned value."
         (let ((line (read-line port)))
           (cond
            ((eof-object? line)
-            (list required-deps test-deps))
+            (list (reverse required-deps)
+                  (reverse test-deps)))
            ((and (requires-dist-header? line) (not (extra? line)))
             (loop (cons (specification->requirement-name
                          (requires-dist-value line))

Reply via email to