[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: build-system/python: 'pypi-uri' takes an optional file name exten
From: |
Ludovic Courtès |
Subject: |
01/01: build-system/python: 'pypi-uri' takes an optional file name extension. |
Date: |
Fri, 08 Jan 2016 18:13:11 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 17ad0a2714271dd3567808637f451d86f1291cab
Author: Ludovic Courtès <address@hidden>
Date: Fri Jan 8 19:06:26 2016 +0100
build-system/python: 'pypi-uri' takes an optional file name extension.
Suggested by swedebugia <address@hidden>.
* guix/build-system/python.scm (pypi-uri): Add 'extension' parameter and
use it.
---
guix/build-system/python.scm | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index 2532210..86efc1a 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
;;; Copyright © 2013 Andreas Enge <address@hidden>
;;; Copyright © 2013 Nikita Karetnikov <address@hidden>
;;;
@@ -41,12 +41,13 @@
;;
;; Code:
-(define (pypi-uri name version)
+(define* (pypi-uri name version #:optional (extension ".tar.gz"))
"Return a URI string for the Python package hosted on the Python Package
-Index (PyPI) corresponding to NAME and VERSION."
+Index (PyPI) corresponding to NAME and VERSION. EXTENSION is the file name
+extension, such as '.tar.gz'."
(string-append "https://pypi.python.org/packages/source/"
(string-take name 1) "/" name "/"
- name "-" version ".tar.gz"))
+ name "-" version extension))
(define %python-build-system-modules
;; Build-side modules imported by default.