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. --- guix/build/python-build-system.scm | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 2f3d04a..44f2639 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -105,19 +105,33 @@ files))) bindirs))) +(define* (fix-pth #:key name inputs outputs #:allow-other-keys) + (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)))) + (define %standard-phases ;; 'configure' and 'build' phases are not needed. Everything is done during ;; 'install'. - (alist-cons-after - 'install 'wrap - wrap - (alist-replace - 'build build + (alist-cons-before + 'strip 'fix-pth + fix-pth + (alist-cons-after + 'install 'wrap + wrap (alist-replace - 'check check - (alist-replace 'install install - (alist-delete 'configure - gnu:%standard-phases)))))) + 'build build + (alist-replace + 'check check + (alist-replace 'install install + (alist-delete 'configure + gnu:%standard-phases))))))) (define* (python-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) -- 1.8.4