unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* pypi-uri
       [not found]     ` <8760gntqkm.fsf@fastmail.com>
@ 2017-05-31 19:37       ` Danny Milosavljevic
  2017-05-31 19:43         ` pypi-uri Danny Milosavljevic
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Milosavljevic @ 2017-05-31 19:37 UTC (permalink / raw)
  To: Marius Bakke, guix-devel; +Cc: José Miguel Sánchez García

Hi,

>> Can you change this to use 'pypi-uri' instead?  
> Any reason why `guix import` doesn't do that by default? I just copied
> the output from that command, so I believed it was the way it should
> be done.  

PyPI switched to content-addressing only (with a hash function different from ours) and doesn't support fetching a package by name with the usual simple URL anymore.  Therefore, we are using pypi.io as an alternative.

Example: <https://pypi.python.org/packages/fa/12/4a837dc26173819a29e713cbfb490a83d5296545abbe53422d7b14604d8f/marshmallow-3.0.0b2.tar.gz> vs <https://pypi.io/packages/source/m/marshmallow/marshmallow-3.0.0b2.tar.gz>.

Unrelated to this, back in the day I adapted make-pypi-sexp to handle a special case (for example for uwsgi):  pypi urls are case-sensitive and for some reason in Guix we mangle the package names to be all-lowercase.  That means that (naturally) some of the urls returned by pypi-uri don't work because the case is different.

So I've adapted make-pypi-sexp to find out whether the pypi-uri and the actual source url it just downloaded from agree - and if not, it prefers the latter.  The latter just worked when downloading it so it's the safe choice.

That said, I've just tried to fetch <https://pypi.io/packages/source/u/uwsgi/uwsgi-2.0.15.tar.gz> (note: case is wrong, should be "uWSGI") and it works (!).

So I guess we can remove the special case again.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: pypi-uri
  2017-05-31 19:37       ` pypi-uri Danny Milosavljevic
@ 2017-05-31 19:43         ` Danny Milosavljevic
  0 siblings, 0 replies; 2+ messages in thread
From: Danny Milosavljevic @ 2017-05-31 19:43 UTC (permalink / raw)
  To: Marius Bakke, guix-devel; +Cc: José Miguel Sánchez García

> That said, I've just tried to fetch <https://pypi.io/packages/source/u/uwsgi/uwsgi-2.0.15.tar.gz> (note: case is wrong, should be "uWSGI") and it works (!).

Earlier the correct URL was something like: <https://pypi.io/packages/source/u/uWSGI/uwsgi-2.0.15.tar.gz>.  Turns out that this still works but <https://pypi.io/packages/source/u/uwsgi/uwsgi-2.0.15.tar.gz> also works now and is the same file.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-31 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <02de3feec1033d408e8f9e15cebb9c45@openmailbox.org>
     [not found] ` <87y3tktva1.fsf@fastmail.com>
     [not found]   ` <1710abf8c15616976d5b79e5e61364ac@openmailbox.org>
     [not found]     ` <8760gntqkm.fsf@fastmail.com>
2017-05-31 19:37       ` pypi-uri Danny Milosavljevic
2017-05-31 19:43         ` pypi-uri Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).