diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 3ff4da2..a8f8c9d 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -247,3 +247,44 @@ etc. ") (define-public python2-babel (package-with-python2 python-babel)) + +(define-public python-setuptools + (package + (name "python-setuptools") + (version "1.1.4") + (source + (origin + (method url-fetch) + (uri (string-append "https://pypi.python.org/packages/source/s/setuptools/setuptools-" + version ".tar.gz")) + (sha256 + (base32 + "0hl9sa5xr9bi2ifq51wy1bawsjv5nzvpbac7m9z1ciz778874csf")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; FIXME: try to run tests + #:phases + (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys #:rest args) + (let* ((install (assoc-ref %python-standard-phases 'install)) + (out (assoc-ref outputs "out")) + (path (string-append out "/lib/python3.3/site/packages/"))) + (mkdir-p path) + (setenv "PYTHONPATH" path) + (format #t "XXX ~a XXX~%" (getenv "PYTHONPATH")) + (apply install args))) + %python-standard-phases))) + (home-page "https://pypi.python.org/pypi/setuptools") + (synopsis + "Library designed to facilitate packaging Python projects") + (description + "Setuptools is a fully-featured, stable library designed to facilitate +packaging Python projects, where packaging includes: +Python package and module definitions, +distribution package metadata, +test hooks, +project installation, +platform-specific details, +Python 3 support.") + (license psfl))) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index f213a97..14cd086 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -19,14 +19,13 @@ ;;; along with GNU Guix. If not, see . (define-module (guix build python-build-system) - #:use-module ((guix build gnu-build-system) - #:renamer (symbol-prefix-proc 'gnu:)) + #:use-module (guix build gnu-build-system) #:use-module (guix build utils) #:use-module (ice-9 match) #:use-module (ice-9 ftw) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) - #:export (%standard-phases + #:export (%python-standard-phases python-build)) ;; Commentary: @@ -91,7 +90,7 @@ files))) bindirs))) -(define %standard-phases +(define %python-standard-phases ;; 'configure' and 'build' phases are not needed. Everything is done during ;; 'install'. (alist-cons-after @@ -103,11 +102,11 @@ 'check check (alist-replace 'install install (alist-delete 'configure - gnu:%standard-phases)))))) + %standard-phases)))))) (define* (python-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) "Build the given Python package, applying all of PHASES in order." - (apply gnu:gnu-build #:inputs inputs #:phases phases args)) + (apply gnu-build #:inputs inputs #:phases phases args)) ;;; python-build-system.scm ends here