From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [WIP 2/8] guix: build all Python packages with --single-version-externally-managed. Date: Mon, 10 Oct 2016 16:57:13 +0200 Message-ID: <1476111439-20812-3-git-send-email-h.goebel@crazy-compilers.com> References: <1476111439-20812-1-git-send-email-h.goebel@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btc1C-0008D5-C9 for guix-devel@gnu.org; Mon, 10 Oct 2016 10:57:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btc17-0000aY-9a for guix-devel@gnu.org; Mon, 10 Oct 2016 10:57:29 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:47592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btc16-0000aG-UI for guix-devel@gnu.org; Mon, 10 Oct 2016 10:57:25 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3st3BX2sVWz3hjSl for ; Mon, 10 Oct 2016 16:57:24 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3st3BX2mxGzvkWM for ; Mon, 10 Oct 2016 16:57:24 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id wizAkSqh_EzV for ; Mon, 10 Oct 2016 16:57:23 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-147-59.dynamic.mnet-online.de [188.174.147.59]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Mon, 10 Oct 2016 16:57:23 +0200 (CEST) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id AE6F560E9A for ; Mon, 10 Oct 2016 16:57:19 +0200 (CEST) In-Reply-To: <1476111439-20812-1-git-send-email-h.goebel@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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 ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2015 Mark H Weaver +;;; Copyright © 2016 Hartmut Goebel ;;; ;;; 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