From: Federico Beffa <beffa@ieee.org>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH 1/4] build/python-build-system: Fix easy-install.pth collisions.
Date: Sun, 14 Dec 2014 20:39:10 +0100 [thread overview]
Message-ID: <CAKrPhPP5GZfKFiUJiQ4L6V86V3YFNYKYY4GPExqXWaUMABfXZg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 79 bytes --]
A patch to avoid python setuptools easy-install.pth collisions.
Regards,
Fede
[-- Attachment #2: 0001-build-python-build-system-Fix-easy-install.pth-colli.patch --]
[-- Type: text/x-patch, Size: 2153 bytes --]
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.
---
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
next reply other threads:[~2014-12-14 19:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-14 19:39 Federico Beffa [this message]
2014-12-14 20:28 ` [PATCH 1/4] build/python-build-system: Fix easy-install.pth collisions Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKrPhPP5GZfKFiUJiQ4L6V86V3YFNYKYY4GPExqXWaUMABfXZg@mail.gmail.com \
--to=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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.