diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2016-09-28 10:42:35 +0200 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2016-11-15 17:37:41 +0100 |
commit | 7db40bce58e149ecb541d295e01cfbfe953d39a3 (patch) | |
tree | ca69cfebdaf1763209bc502597ff014dd0795394 /guix/build/python-build-system.scm | |
parent | aaf75c890b5242d3ab3671766226bc53ab07049a (diff) | |
download | gnu-guix-7db40bce58e149ecb541d295e01cfbfe953d39a3.tar gnu-guix-7db40bce58e149ecb541d295e01cfbfe953d39a3.tar.gz |
guix: build all Python packages with --single-version-externally-managed.
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. Remove now unused argument "inputs".
Diffstat (limited to 'guix/build/python-build-system.scm')
-rw-r--r-- | guix/build/python-build-system.scm | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index e906e60699..2424fed310 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. ;;; @@ -60,25 +61,15 @@ (major+minor (take components 2))) (string-join major+minor "."))) -(define* (install #:key outputs inputs (configure-flags '()) +(define* (install #:key outputs (configure-flags '()) #: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) |