guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to fix an error in the pypi-importer


From: swedebugia
Subject: Re: Trying to fix an error in the pypi-importer
Date: Fri, 01 Jan 2016 19:10:20 +0100
User-agent: Riseup mail

On 2015-12-30 23:00, Cyril Roelandt wrote:
On 12/30/2015 08:53 PM, address@hidden wrote:
I am trying to fix this error in the pypi-importer:

Could you send your fix as a unified diff? If you work from the git
repo, you can just run "git diff" to produce one.

diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index 2532210..f9b88d2 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -41,13 +41,18 @@
 ;;
 ;; Code:

-(define (pypi-uri name version)
+(define (pypi-uri name version 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."
+  (if (zero? ending)
+      (string-append "https://pypi.python.org/packages/source/";
                  (string-take name 1) "/" name "/"
-                 name "-" version ".tar.gz"))
-
+                 name "-" version ".tar.gz")
+  ;else
+      (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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]