[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/12] import: pypi: Use "pypi-uri" instead of building the URL m
From: |
Cyril Roelandt |
Subject: |
[PATCH 03/12] import: pypi: Use "pypi-uri" instead of building the URL manually. |
Date: |
Mon, 12 Oct 2015 23:40:59 +0200 |
* guix/import/pypi.scm (make-pypi-sexp): Use "pypi-uri".
* tests/pypi.scm: Update the tests accordingly.
---
guix/import/pypi.scm | 2 +-
tests/pypi.scm | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index d04a685..647ef61 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -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)))))
diff --git a/tests/pypi.scm b/tests/pypi.scm
index c772474..960b8cd 100644
--- a/tests/pypi.scm
+++ b/tests/pypi.scm
@@ -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)))))
--
2.1.4