~ruther/guix-local

d8bdd38201328b95d849dc95073f842db6eb3b8d — Cyril Roelandt 10 years ago 3009334
import: pypi: Use "pypi-uri" instead of building the URL manually.

* guix/import/pypi.scm (make-pypi-sexp): Use "pypi-uri".
* tests/pypi.scm: Update the tests accordingly.
2 files changed, 2 insertions(+), 3 deletions(-)

M guix/import/pypi.scm
M tests/pypi.scm
M guix/import/pypi.scm => guix/import/pypi.scm +1 -1
@@ 165,7 165,7 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
             (version ,version)
             (source (origin
                       (method url-fetch)
                       (uri (string-append ,@(factorize-uri source-url version)))
                       (uri (pypi-uri ,name version))
                       (sha256
                        (base32
                         ,(guix-hash-url temp)))))

M tests/pypi.scm => tests/pypi.scm +1 -2
@@ 84,8 84,7 @@ baz > 13.37")
         ('version "1.0.0")
         ('source ('origin
                    ('method 'url-fetch)
                    ('uri ('string-append "https://example.com/foo-"
                                          'version ".tar.gz"))
                    ('uri (pypi-uri "foo" version))
                    ('sha256
                     ('base32
                      (? string? hash)))))