unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] guix pypi importer: Add ending as an optional argument to pypi-uri.
@ 2016-01-03 21:36 swedebugia
  2016-01-03 21:53 ` swedebugia
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: swedebugia @ 2016-01-03 21:36 UTC (permalink / raw)
  To: guix-devel

---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-08 18:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-03 21:36 [PATCH] guix pypi importer: Add ending as an optional argument to pypi-uri swedebugia
2016-01-03 21:53 ` swedebugia
2016-01-05  0:53 ` Cyril Roelandt
2016-01-05  9:58   ` Efraim Flashner
2016-01-05 10:23     ` Cyril Roelandt
2016-01-08 18:14 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).