From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: pypi URL change Date: Wed, 27 Apr 2016 14:25:38 +0200 Message-ID: <87oa8v2q7x.fsf@gnu.org> References: <571C754A.1050506@gmail.com> <571D4811.4050300@gmail.com> <571D54EC.2030000@gmail.com> <571D612E.7000802@gmail.com> <87y482azsw.fsf@gnu.org> <571F551C.9040503@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avOXI-00044s-9a for guix-devel@gnu.org; Wed, 27 Apr 2016 08:25:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avOXF-0001so-0H for guix-devel@gnu.org; Wed, 27 Apr 2016 08:25:44 -0400 In-Reply-To: <571F551C.9040503@gmail.com> (Ben Woodcroft's message of "Tue, 26 Apr 2016 21:46:36 +1000") 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: Ben Woodcroft Cc: guix-devel@gnu.org Ben Woodcroft 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 =E2=80=A6 sha1 =E2=80=A6)) (sha256 (base32 sha256-string)))) and then use it like: (package (name "python-foo") (source (pypi-origin "foo" "cabba9e" "somelongstring"))) ? Ludo=E2=80=99.