From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: pypi URL change Date: Sat, 18 Jun 2016 08:33:29 +1000 Message-ID: <1466202812-18604-1-git-send-email-donttrustben@gmail.com> References: <87oa8v2q7x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE2Kp-0005rN-Ie for guix-devel@gnu.org; Fri, 17 Jun 2016 18:33:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bE2Kn-00088S-RY for guix-devel@gnu.org; Fri, 17 Jun 2016 18:33:54 -0400 In-Reply-To: <87oa8v2q7x.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: ludo@gnu.org, guix-devel@gnu.org >> 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"))) Thanks for the specific advice. I've attached some patches, the first of which makes this change, the others using it. However, it wasn't clear to me how to include patches or other parts of 'origin' here. Alos, Having to define ".tar.gz" each time seems a bit inelegant. Do you have any suggestions on how to improve this approach? Thanks, ben