unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: guix-devel@gnu.org
Subject: [WIP 2/8] guix: build all Python packages with --single-version-externally-managed.
Date: Mon, 10 Oct 2016 16:57:13 +0200	[thread overview]
Message-ID: <1476111439-20812-3-git-send-email-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <1476111439-20812-1-git-send-email-h.goebel@crazy-compilers.com>

This requires setuptools to be installed together with python, which is
the case for Python 3 anyway and which we do for our build of Python 2
(see last commit).

* guix/build/python-build-system.scm (install): Add
  "--single-version-externally-managed" and "--root=/" to params to be
  passed to call-setuppy. Remove thus needless manipulation of
  PYTHONPATH.
---
 guix/build/python-build-system.scm | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index e906e60..05a01f3 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,21 +65,11 @@
                   #:allow-other-keys)
   "Install a given Python package."
   (let* ((out (assoc-ref outputs "out"))
-         (params (append (list (string-append "--prefix=" out))
-                         configure-flags))
-         (python-version (get-python-version (assoc-ref inputs "python")))
-         (old-path (getenv "PYTHONPATH"))
-         (add-path (string-append out "/lib/python" python-version
-                                  "/site-packages/")))
-        ;; create the module installation directory and add it to PYTHONPATH
-        ;; to make setuptools happy
-        (mkdir-p add-path)
-        (setenv "PYTHONPATH"
-                (string-append (if old-path
-                                   (string-append old-path ":")
-                                   "")
-                               add-path))
-        (call-setuppy "install" params)))
+         (params (append (list (string-append "--prefix=" out)
+                               "--single-version-externally-managed"
+                               "--root=/")
+                         configure-flags)))
+    (call-setuppy "install" params)))
 
 (define* (wrap #:key inputs outputs #:allow-other-keys)
   (define (list-of-files dir)
-- 
2.7.4

  parent reply	other threads:[~2016-10-10 14:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 14:57 [WIP 0/9] python-build-system set 1: please review Hartmut Goebel
2016-10-10 14:57 ` [WIP 1/8] gnu: ensure pip and setuptools are installed even for Python 2 Hartmut Goebel
2016-10-10 14:57 ` Hartmut Goebel [this message]
2016-10-10 14:57 ` [WIP 3/8] guix: python-build-system: Import setuptools before calling `setup.py' Hartmut Goebel
2016-10-10 14:57 ` [WIP 4/8] guix: python-build-system: Add option "#:use-setuptools?" (default true) Hartmut Goebel
2016-10-10 14:57 ` [WIP 5/8] guix: python-build-system: Add helpers for getting and setting PYTHONPATH Hartmut Goebel
2016-10-10 14:57 ` [WIP 6/8] guix: python-build-system: Delete .egg-info file created in phase check Hartmut Goebel
2016-10-10 14:57 ` [WIP 7/8] guix: Add lint-checker for packages which should be no inputs at all Hartmut Goebel
2016-10-10 14:57 ` [WIP 8/8] lint: more packages to probably be a native input Hartmut Goebel
2016-10-11  8:08 ` [WIP 0/9] python-build-system set 1: please review Hartmut Goebel
2016-10-11  8:37 ` Hartmut Goebel

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=1476111439-20812-3-git-send-email-h.goebel@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --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).