import: pypi: Emit 'pypi-uri' only when it yields the right URL.
authorLudovic Courtès <ludo@gnu.org>
Sat, 19 Mar 2016 22:49:59 +0000 (23:49 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 19 Mar 2016 22:54:19 +0000 (23:54 +0100)
commit522773b70024272555aab0448fae8606add4c582
tree3978e8b64cd56a88e98b3597142a2a0006384217
parent329a702634ec9b12f41676fb7b0680f0797f5907
import: pypi: Emit 'pypi-uri' only when it yields the right URL.

Fixes <http://bugs.gnu.org/23062>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.

* guix/import/pypi.scm (make-pypi-sexp): Check whether 'pypi-uri'
returns SOURCE-URL and fall back to the full URL otherwise.
* tests/pypi.scm ("pypi->guix-package"): Adjust expected URI
accordingly.

Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
guix/import/pypi.scm
tests/pypi.scm