--- guix/build-system/python.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 2532210..09074ce 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -41,13 +41,20 @@ ;; ;; Code: -(define (pypi-uri name version) +(define* (pypi-uri name version + #:optional + ending) "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/" +Index (PyPI) corresponding to NAME, VERSION and optionally ENDING." + (when (null? ending) + (string-append "https://pypi.python.org/packages/source/" (string-take name 1) "/" name "/" - name "-" version ".tar.gz")) - + name "-" version ".tar.gz") + ;; Ending is set -> use it. + (string-append "https://pypi.python.org/packages/source/" + (string-take name 1) "/" name "/" + name "-" version "." ending))) + (define %python-build-system-modules ;; Build-side modules imported by default. `((guix build python-build-system) -- 2.6.3