summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2015-10-10 22:50:34 +0200
committerCyril Roelandt <tipecaml@gmail.com>2015-11-03 21:38:13 +0100
commit3009334e3b3c148d7a36c76952fbb32addfa2c07 (patch)
tree6838775d9135b9981a015f73c494bd7283b6744a
parentf8ae32a26a5f41466f5c7792261fdf2e78d1d35f (diff)
guix: Add a "pypi-uri" helper method.
* guix/download.scm (mirrors): New "pypi" mirror. * guix/build-system/python.scm (pypi-uri): New method.
-rw-r--r--guix/build-system/python.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index aeb04c83a41..1a5d9df473d 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -31,7 +31,8 @@
31 #:export (%python-build-system-modules 31 #:export (%python-build-system-modules
32 package-with-python2 32 package-with-python2
33 python-build 33 python-build
34 python-build-system)) 34 python-build-system
35 pypi-uri))
35 36
36;; Commentary: 37;; Commentary:
37;; 38;;
@@ -40,6 +41,13 @@
40;; 41;;
41;; Code: 42;; Code:
42 43
44(define (pypi-uri name version)
45 "Return a URI string for the Python package hosted on the Python Package
46Index (PyPI) corresponding to NAME and VERSION."
47 (string-append "https://pypi.python.org/packages/source/"
48 (string-take name 1) "/" name "/"
49 name "-" version ".tar.gz"))
50
43(define %python-build-system-modules 51(define %python-build-system-modules
44 ;; Build-side modules imported by default. 52 ;; Build-side modules imported by default.
45 `((guix build python-build-system) 53 `((guix build python-build-system)