all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: swedebugia@riseup.net
To: guix-devel <guix-devel@gnu.org>
Subject: Trying to fix an error in the pypi-importer
Date: Wed, 30 Dec 2015 20:53:47 +0100	[thread overview]
Message-ID: <da249e7466c012a9f8c4bbf3b6bc2a98@riseup.net> (raw)

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

             reply	other threads:[~2015-12-30 19:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30 19:53 swedebugia [this message]
     [not found] ` <56844BF3.10701@uq.edu.au>
2015-12-30 21:27   ` Trying to fix an error in the pypi-importer 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da249e7466c012a9f8c4bbf3b6bc2a98@riseup.net \
    --to=swedebugia@riseup.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.