From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/4] build/python-build-system: Fix easy-install.pth collisions. Date: Sun, 14 Dec 2014 21:28:34 +0100 Message-ID: <87y4qaugb1.fsf@gnu.org> References: 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]:60316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0FmW-0005BT-Ju for guix-devel@gnu.org; Sun, 14 Dec 2014 15:28:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0FmP-0005ov-GJ for guix-devel@gnu.org; Sun, 14 Dec 2014 15:28:44 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:48264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0FmP-0005op-96 for guix-devel@gnu.org; Sun, 14 Dec 2014 15:28:37 -0500 In-Reply-To: (Federico Beffa's message of "Sun, 14 Dec 2014 20:39:10 +0100") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Federico Beffa Cc: Guix-devel Federico Beffa skribis: > From e63ee558fe702d429e2365b4757ddce029dc75ed Mon Sep 17 00:00:00 2001 > From: Federico Beffa > Date: Sat, 13 Dec 2014 22:19:08 +0100 > Subject: [PATCH 1/4] build/python-build-system: Fix easy-install.pth > collisions. > > * guix/build/python-build-system.scm (fix-pth): New fix-pth phase. A good idea. > +(define* (fix-pth #:key name inputs outputs #:allow-other-keys) What about calling it =E2=80=98rename-pth-file=E2=80=99, which should be mo= re descriptive? Also please add a docstring. > + (let* ((out (assoc-ref outputs "out")) > + (python (assoc-ref inputs "python")) > + (site-packages (string-append out "/lib/python" > + (get-python-version python) > + "/site-packages")) > + (easy-install-pth (string-append site-packages "/easy-install.p= th")) > + (new-pth (string-append site-packages "/" name ".pth"))) > + (if (file-exists? easy-install-pth) > + (rename-file easy-install-pth new-pth)))) Please use =E2=80=98when=E2=80=99 instead of =E2=80=98if=E2=80=99, and add = a trailing #t, to make it clear that the phase succeeds. Is PACKAGE.pth a common convention? I mean, does Python (or setuptools?) actually use files called PYTHON.pth? Thanks for working on it! Ludo=E2=80=99.