guix-devel
[Top][All Lists]
Advanced

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

Re: pypi URL change


From: Cyril Roelandt
Subject: Re: pypi URL change
Date: Mon, 25 Apr 2016 00:26:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.2

On 04/24/2016 09:27 AM, Ben Woodcroft wrote:
> Hi,
> 
> Today I tried using pypi-url to autogenerate a package that was only 
> released today. Unfortunately, it seems that the URL scheme has changed 
> and I was unable to download, though I believe this only affects newly 
> released package versions. I found this on the nix mailing list:
> http://comments.gmane.org/gmane.linux.distributions.nixos/20158
> 
>>    So, previously PyPI used URLs like :
>> //packages//{python version}/{name[0]}/{name}/{filename}
>>
>>    Now it uses:
>> //packages//{hash[:2]}/{hash[2:4]}/{hash[4:]}/{filename}
>>    Where hash is blake2b(file_content, digest_size=32).hexdigest().lower()
> 
> Is there a blake2b implemented in Guile? In the meantime, the URL will have 
> to be specified manually: 'guix import pypi ...' provides the correct and 
> updated URL.
> 

The URL should always be correct, because the pypi importer can detect
whether the URL build by pypi-uri is wrong (see make-pypi-sexp).

Now, in order to handle this new pattern, maybe pypi-uri should:

1) try to compute the "new URI"
2) issue a "curl --head $uri" using some Guile magic
3) return the URI or compute the "old URI" depending on 2)

WDYT?

Cyril.




reply via email to

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