steap pushed a commit to branch master
in repository guix.
commit 3009334e3b3c148d7a36c76952fbb32addfa2c07
Author: Cyril Roelandt <[email protected]>
Date: Sat Oct 10 22:50:34 2015 +0200
guix: Add a "pypi-uri" helper method.
* guix/download.scm (mirrors): New "pypi" mirror.
* guix/build-system/python.scm (pypi-uri): New method.
---
guix/build-system/python.scm | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index aeb04c8..1a5d9df 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)