all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trying to fix an error in the pypi-importer
@ 2015-12-30 19:53 swedebugia
       [not found] ` <56844BF3.10701@uq.edu.au>
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: swedebugia @ 2015-12-30 19:53 UTC (permalink / raw)
  To: guix-devel

Hi :)

I am trying to fix this error in the pypi-importer:

~/src/guix$ ./pre-inst-env guix lint python-twisted
gnu/packages/python.scm:6628:0: python-twisted-15.5.0: all the source 
URIs are unreachable:
gnu/packages/python.scm:6628:0: python-twisted-15.5.0: URI 
https://pypi.python.org/packages/source/T/Twisted/Twisted-15.5.0.tar.gz 
not reachable: 404 ("Not Found")
-> it should be .tar.bz2* but the pypi-importer hardcodes tar.gz in 
guix/build-system/python.scm:

(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"))

I read up on if-else with Guile and changed it to:
(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."
   (if (zero? ending)
       (string-append "https://pypi.python.org/packages/source/"
                  (string-take name 1) "/" name "/"
                  name "-" version ".tar.gz"))
   (else
       (string-append "https://pypi.python.org/packages/source/"
                  (string-take name 1) "/" name "/"
                  name "-" version "." ending )))

Will this work?
I did a make and got:
   GUILEC guix/build-system/python.go
guix/build-system/python.scm:51:2: warning: possibly unbound variable 
`else'
wrote `guix/build-system/python.go'

The goal was to change in a way that would not break all other calls to 
the procedure pypi-uri.

Any thoughts?

* see https://pypi.python.org/pypi/Twisted/json

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

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-30 19:53 Trying to fix an error in the pypi-importer swedebugia
     [not found] ` <56844BF3.10701@uq.edu.au>
2015-12-30 21:27   ` Ben Woodcroft
2015-12-30 22:00 ` Cyril Roelandt
2016-01-01 18:10   ` swedebugia
2016-01-02 17:10     ` swedebugia
2016-01-02 18:06       ` How to test changes to guix locally? (Was: Re: Trying to fix an error in the pypi-importer) swedebugia
2016-01-02 18:58         ` Ricardo Wurmus
2016-01-02 18:26       ` Trying to fix an error in the pypi-importer Erik Edrosa
2016-01-03 14:09       ` Ludovic Courtès
2016-01-03 16:29         ` swedebugia
2016-01-03 18:47       ` Ricardo Wurmus
2015-12-31 11:22 ` Efraim Flashner
2016-01-01 18:15   ` swedebugia

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.