guix-devel
[Top][All Lists]
Advanced

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

Re: pypi URL change


From: Ludovic Courtès
Subject: Re: pypi URL change
Date: Wed, 27 Apr 2016 14:25:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ben Woodcroft <address@hidden> skribis:

> Hmm. It just dawned on me that it is impossible to implement the
> pypi-uri so that it returns the new format because the new URI is
> generated from the content of the package, not just the name and
> version.

Oh indeed.

> So I think we must either write the hash or the entire URL into the
> package, or grab the json from pypi each time we download.

The former, I guess.

I guess the hash is SHA1, right?

Maybe we could make something like:

  (define-syntax-rule (pypi-origin package sha1 sha256-string)
    (origin
      (method url-fetch)
      (uri (string-append … sha1 …))
      (sha256 (base32 sha256-string))))

and then use it like:

  (package
    (name "python-foo")
    (source (pypi-origin "foo" "cabba9e" "somelongstring")))

?

Ludo’.



reply via email to

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