summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2015-10-12 01:03:25 +0200
committerCyril Roelandt <tipecaml@gmail.com>2015-11-03 21:38:13 +0100
commitd8bdd38201328b95d849dc95073f842db6eb3b8d (patch)
treea8807b55d21649d36bea312299e5757ddb9b8d9e
parent3009334e3b3c148d7a36c76952fbb32addfa2c07 (diff)
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.
-rw-r--r--guix/import/pypi.scm2
-rw-r--r--tests/pypi.scm3
2 files changed, 2 insertions, 3 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index d04a68524d1..647ef615e0f 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -165,7 +165,7 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
165 (version ,version) 165 (version ,version)
166 (source (origin 166 (source (origin
167 (method url-fetch) 167 (method url-fetch)
168 (uri (string-append ,@(factorize-uri source-url version))) 168 (uri (pypi-uri ,name version))
169 (sha256 169 (sha256
170 (base32 170 (base32
171 ,(guix-hash-url temp))))) 171 ,(guix-hash-url temp)))))
diff --git a/tests/pypi.scm b/tests/pypi.scm
index c772474b829..960b8cd32ad 100644
--- a/tests/pypi.scm
+++ b/tests/pypi.scm
@@ -84,8 +84,7 @@ baz > 13.37")
84 ('version "1.0.0") 84 ('version "1.0.0")
85 ('source ('origin 85 ('source ('origin
86 ('method 'url-fetch) 86 ('method 'url-fetch)
87 ('uri ('string-append "https://example.com/foo-" 87 ('uri (pypi-uri "foo" version))
88 'version ".tar.gz"))
89 ('sha256 88 ('sha256
90 ('base32 89 ('base32
91 (? string? hash))))) 90 (? string? hash)))))