~ruther/guix-local

4ebc1aba19d75af1b22f269f042a51513205f20c — Ludovic Courtès 1 year, 10 months ago 13e7caf
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
1 files changed, 4 insertions(+), 2 deletions(-)

M guix/import/pypi.scm
M guix/import/pypi.scm => guix/import/pypi.scm +4 -2
@@ 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))