guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] build/python-build-system: Fix easy-install.pth collisio


From: Ludovic Courtès
Subject: Re: [PATCH 1/4] build/python-build-system: Fix easy-install.pth collisions.
Date: Sun, 14 Dec 2014 21:28:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Federico Beffa <address@hidden> skribis:

> From e63ee558fe702d429e2365b4757ddce029dc75ed Mon Sep 17 00:00:00 2001
> From: Federico Beffa <address@hidden>
> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]