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 aeb04c83a4..1a5d9df473 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -31,7 +31,8 @@
#:export (%python-build-system-modules
package-with-python2
python-build
- python-build-system))
+ python-build-system
+ pypi-uri))
;; Commentary:
;;
@@ -40,6 +41,13 @@
;;
;; Code:
+(define (pypi-uri name version)
+ "Return a URI string for the Python package hosted on the Python Package
+Index (PyPI) corresponding to NAME and VERSION."
+ (string-append "https://pypi.python.org/packages/source/"
+ (string-take name 1) "/" name "/"
+ name "-" version ".tar.gz"))
+
(define %python-build-system-modules
;; Build-side modules imported by default.
`((guix build python-build-system)