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.
This commit is contained in:
parent
3009334e3b
commit
d8bdd38201
|
@ -165,7 +165,7 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
|
||||||
(version ,version)
|
(version ,version)
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append ,@(factorize-uri source-url version)))
|
(uri (pypi-uri ,name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
,(guix-hash-url temp)))))
|
,(guix-hash-url temp)))))
|
||||||
|
|
|
@ -84,8 +84,7 @@ baz > 13.37")
|
||||||
('version "1.0.0")
|
('version "1.0.0")
|
||||||
('source ('origin
|
('source ('origin
|
||||||
('method 'url-fetch)
|
('method 'url-fetch)
|
||||||
('uri ('string-append "https://example.com/foo-"
|
('uri (pypi-uri "foo" version))
|
||||||
'version ".tar.gz"))
|
|
||||||
('sha256
|
('sha256
|
||||||
('base32
|
('base32
|
||||||
(? string? hash)))))
|
(? string? hash)))))
|
||||||
|
|
Loading…
Reference in New Issue