From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: pypi URL change Date: Tue, 26 Apr 2016 21:46:36 +1000 Message-ID: <571F551C.9040503@gmail.com> References: <571C754A.1050506@gmail.com> <571D4811.4050300@gmail.com> <571D54EC.2030000@gmail.com> <571D612E.7000802@gmail.com> <87y482azsw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1av1S4-0003Rk-8s for guix-devel@gnu.org; Tue, 26 Apr 2016 07:46:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1av1S0-0004WY-TI for guix-devel@gnu.org; Tue, 26 Apr 2016 07:46:48 -0400 In-Reply-To: <87y482azsw.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= , Cyril Roelandt Cc: guix-devel@gnu.org On 25/04/16 17:54, Ludovic Courtès wrote: > Cyril Roelandt skribis: > >> On 04/25/2016 01:21 AM, Ben Woodcroft wrote: >>> 2) The new URLs are even uglier than the old one and a working pypi-uri >>> would hide them from our eyes. >> Yeah but it is my understanding that the new pattern will only be >> applied to new releases, so how will pypi-uri know what pattern to apply? > How about changing ‘pypi-uri’ to return two URIs, the new one and the > old one, in this order? > > That way, attempts to download will first try the first URI, then the > second. > > Alternately, we could define a “pypi” mirror in (guix download) that > would contain at least these two URIs, and have ‘pypi-uri’ return > “mirror://pypi/…”. That only works if the two URIs share the same > suffix, though. > > WDYT? 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. 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. ben