guix-devel
[Top][All Lists]
Advanced

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

Trying to fix an error in the pypi-importer


From: swedebugia
Subject: Trying to fix an error in the pypi-importer
Date: Wed, 30 Dec 2015 20:53:47 +0100
User-agent: Riseup mail

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 via email to

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