From 4ebc1aba19d75af1b22f269f042a51513205f20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 30 Dec 2024 10:40:37 +0100 Subject: [PATCH] =?UTF-8?q?import:=20pypi:=20Preserve=20order=20of=20depen?= =?UTF-8?q?dencies=20from=20=E2=80=98requires.txt=E2=80=99=20and=20wheel.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 @@ (define (section-header? line) (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 @@ (define (test-requirement? line) (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))