* guix/download.scm (mirrors): New "pypi" mirror. * guix/build-system/python.scm (pypi-uri): New method. --- guix/build-system/python.scm | 10 +++++++++- guix/download.scm | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index e9fffcc..01525f4 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 "mirror://pypi/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) diff --git a/guix/download.scm b/guix/download.scm index 8ec47ce..53b28be 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -200,7 +200,9 @@ (debian "http://ftp.de.debian.org/debian/" "http://ftp.fr.debian.org/debian/" - "http://ftp.debian.org/debian/")))) + "http://ftp.debian.org/debian/") + (pypi + "https://pypi.python.org/")))) (define %mirror-file ;; Copy of the list of mirrors to a file. This allows us to keep a single -- 2.1.4