mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
guix: Add a "pypi-uri" helper method.
* guix/download.scm (mirrors): New "pypi" mirror. * guix/build-system/python.scm (pypi-uri): New method.
This commit is contained in:
parent
f8ae32a26a
commit
3009334e3b
1 changed files with 9 additions and 1 deletions
|
@ -31,7 +31,8 @@ (define-module (guix build-system python)
|
|||
#:export (%python-build-system-modules
|
||||
package-with-python2
|
||||
python-build
|
||||
python-build-system))
|
||||
python-build-system
|
||||
pypi-uri))
|
||||
|
||||
;; Commentary:
|
||||
;;
|
||||
|
@ -40,6 +41,13 @@ (define-module (guix build-system python)
|
|||
;;
|
||||
;; 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)
|
||||
|
|
Loading…
Reference in a new issue