mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-14 19:05:10 -05:00
import: pypi: Deduplicate requirements.
* guix/import/pypi.scm (parse-requires.txt): Remove potential duplicates.
This commit is contained in:
parent
803fb336d6
commit
cc9a77cd39
1 changed files with 5 additions and 1 deletions
|
@ -177,7 +177,11 @@ (define (section-header? line)
|
|||
;; (extra) requirements. Non-optional requirements must appear
|
||||
;; before any section is defined.
|
||||
(if (or (eof-object? line) (section-header? line))
|
||||
(reverse result)
|
||||
;; 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"
|
||||
(reverse (delete-duplicates result))
|
||||
(cond
|
||||
((or (string-null? line) (comment? line))
|
||||
(loop result))
|
||||
|
|
Loading…
Reference in a new issue