Federico Beffa <be...@ieee.org> skribis: > From e63ee558fe702d429e2365b4757ddce029dc75ed Mon Sep 17 00:00:00 2001 > From: Federico Beffa <be...@fbengineering.ch> > 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 ‘rename-pth-file’, which should be more 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.pth")) > + (new-pth (string-append site-packages "/" name ".pth"))) > + (if (file-exists? easy-install-pth) > + (rename-file easy-install-pth new-pth)))) Please use ‘when’ instead of ‘if’, 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’.