Cyril Roelandt <tipec...@gmail.com> skribis:

> * guix/import/pypi.scm (guess-requirement-from-source): Read
> test-requirements.txt as well as requirements.txt.
> * tests/pypi.scm ("pypi->guix-package"): Update accordingly.

[...]

>            (let* ((req-file (string-append dirname "/requirements.txt"))
> -                 (exit-code (system* "tar" "xf" tarball req-file)))
> +                 (test-req-file (string-append dirname 
> "/test-requirements.txt"))
> +                 (exit-code (system* "tar" "xf" tarball req-file))
> +                 (test-exit-code (system* "tar" "xf" tarball test-req-file)))
>              ;; TODO: support more formats.
> -            (if (zero? exit-code)
> +            (if (or (zero? exit-code)
> +                    (zero? test-exit-code))

This seems to suggest that this could be factorized somehow.  Maybe
unpack once and read the two files at once?

Ludo’.

Reply via email to