* guix/build-system/python.scm (pypi-origin): New macro. --- guix/build-system/python.scm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index c3d6c62..c40fd03 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <[email protected]> ;;; Copyright © 2013 Andreas Enge <[email protected]> ;;; Copyright © 2013 Nikita Karetnikov <[email protected]> +;;; Copyright © 2016 Ben Woodcroft <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,7 +36,8 @@ strip-python2-variant python-build python-build-system - pypi-uri)) + pypi-uri + pypi-origin)) ;; Commentary: ;; @@ -52,6 +54,25 @@ extension, such as '.tar.gz'." (string-take name 1) "/" name "/" name "-" version extension)) +(define-syntax-rule + (pypi-origin name version extension blake2 sha256-string ...) + (origin + (method url-fetch) + (uri (string-append + "https://pypi.python.org/packages/" + (substring blake2 0 2) + "/" + (substring blake2 2 4) + "/" + (substring blake2 4) + "/" + name + "-" + version + extension)) + (sha256 (base32 sha256-string)) + ...)) + (define %python-build-system-modules ;; Build-side modules imported by default. `((guix build python-build-system) -- 2.7.4
