From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH 1/4] build/python-build-system: Fix easy-install.pth collisions.
Date: Sun, 14 Dec 2014 21:28:34 +0100 [thread overview]
Message-ID: <87y4qaugb1.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPP5GZfKFiUJiQ4L6V86V3YFNYKYY4GPExqXWaUMABfXZg@mail.gmail.com> (Federico Beffa's message of "Sun, 14 Dec 2014 20:39:10 +0100")
Federico Beffa <beffa@ieee.org> skribis:
> From e63ee558fe702d429e2365b4757ddce029dc75ed Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@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’.
next prev parent reply other threads:[~2014-12-14 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-14 19:39 [PATCH 1/4] build/python-build-system: Fix easy-install.pth collisions Federico Beffa
2014-12-14 20:28 ` Ludovic Courtès [this message]
2014-12-15 20:36 ` Federico Beffa
2014-12-15 21:24 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4qaugb1.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=beffa@ieee.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).