Skip to content
Snippets Groups Projects
Commit d8bdd382 authored by Cyril Roelandt's avatar Cyril Roelandt
Browse files

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.
parent 3009334e
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,7 @@ (define (make-pypi-sexp name version source-url home-page synopsis ...@@ -165,7 +165,7 @@ (define (make-pypi-sexp name version source-url home-page synopsis
(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 @@ (define test-requirements ...@@ -84,8 +84,7 @@ (define test-requirements
('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)))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment