diff options
| author | Federico Beffa <beffa@fbengineering.ch> | 2014-12-19 17:29:39 +0100 |
|---|---|---|
| committer | Federico Beffa <beffa@fbengineering.ch> | 2015-01-16 17:51:47 +0100 |
| commit | ae1ab9fe826c789a11fb5130fcf98bd0eece8e70 (patch) | |
| tree | aba4a08736607fcbcfe707d2679aa204c9160c55 /gnu | |
| parent | 2a666e9cfddc5ec25831618bc376ab4ca6692527 (diff) | |
gnu: Add IPython.
* gnu/packages/python.scm (python-ipython, python2-ipython): New variable.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/python.scm | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c2eab7dc6d5..1978d1cd454 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -2726,3 +2726,88 @@ PNG, PostScript, PDF, and SVG file output.") | |||
| 2726 | (define-public python2-cairocffi | 2726 | (define-public python2-cairocffi |
| 2727 | (package-with-python2 python-cairocffi)) | 2727 | (package-with-python2 python-cairocffi)) |
| 2728 | 2728 | ||
| 2729 | (define-public python-ipython | ||
| 2730 | (package | ||
| 2731 | (name "python-ipython") | ||
| 2732 | (version "2.3.1") | ||
| 2733 | (source | ||
| 2734 | (origin | ||
| 2735 | (method url-fetch) | ||
| 2736 | (uri (string-append "https://pypi.python.org/packages/source/i/" | ||
| 2737 | "ipython/ipython-" version ".tar.gz")) | ||
| 2738 | (sha256 | ||
| 2739 | (base32 "1764gi5m3ff481rjk336cw6i2h4zlc0nxam9rc5m8m7yl9m4d61y")))) | ||
| 2740 | (build-system python-build-system) | ||
| 2741 | (outputs '("out" "doc")) | ||
| 2742 | ;; FIXME: add optional dependencies when available: pyzmq, tornado, ... | ||
| 2743 | (inputs | ||
| 2744 | `(("readline" ,readline) | ||
| 2745 | ("python-matplotlib" ,python-matplotlib) | ||
| 2746 | ("python-numpy" ,python-numpy-bootstrap) | ||
| 2747 | ("python-numpydoc" ,python-numpydoc) | ||
| 2748 | ("python-nose" ,python-nose))) | ||
| 2749 | (native-inputs | ||
| 2750 | `(("pkg-config" ,pkg-config) | ||
| 2751 | ("python-sphinx" ,python-sphinx) | ||
| 2752 | ("texlive" ,texlive) | ||
| 2753 | ("texinfo" ,texinfo) | ||
| 2754 | ("python-setuptools" ,python-setuptools))) | ||
| 2755 | (arguments | ||
| 2756 | `(#:phases | ||
| 2757 | (alist-cons-after | ||
| 2758 | 'install 'install-doc | ||
| 2759 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 2760 | (let* ((data (string-append (assoc-ref outputs "doc") "/share")) | ||
| 2761 | (doc (string-append data "/doc/" ,name "-" ,version)) | ||
| 2762 | (html (string-append doc "/html")) | ||
| 2763 | (man1 (string-append data "/man/man1")) | ||
| 2764 | (info (string-append data "/info")) | ||
| 2765 | (examples (string-append doc "/examples"))) | ||
| 2766 | (setenv "LANG" "en_US.UTF-8") | ||
| 2767 | (with-directory-excursion "docs" | ||
| 2768 | ;; FIXME: html and pdf fail to build without optional pyzmq | ||
| 2769 | ;(system* "make" "html") | ||
| 2770 | ;(system* "make" "pdf" "PAPER=a4") | ||
| 2771 | (system* "make" "info")) | ||
| 2772 | (copy-recursively "docs/man" man1) | ||
| 2773 | (copy-recursively "examples" examples) | ||
| 2774 | ;; (copy-recursively "docs/build/html" html) | ||
| 2775 | ;; (copy-file "docs/build/latex/ipython.pdf" | ||
| 2776 | ;; (string-append doc "/ipython.pdf")) | ||
| 2777 | (mkdir-p info) | ||
| 2778 | (copy-file "docs/build/texinfo/ipython.info" | ||
| 2779 | (string-append info "/ipython.info")) | ||
| 2780 | (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))) | ||
| 2781 | ;; Tests can only be run after the library has been installed and not | ||
| 2782 | ;; within the source directory. | ||
| 2783 | (alist-cons-after | ||
| 2784 | 'install 'check | ||
| 2785 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 2786 | ;; The test procedure appears to miss the fact that some optional | ||
| 2787 | ;; dependencies are missing. | ||
| 2788 | ;; (with-directory-excursion "/tmp" | ||
| 2789 | ;; (zero? (system* (string-append (assoc-ref outputs "out") | ||
| 2790 | ;; "/bin/iptest")))) | ||
| 2791 | #t) | ||
| 2792 | (alist-delete | ||
| 2793 | 'check | ||
| 2794 | %standard-phases))))) | ||
| 2795 | (home-page "http://ipython.org") | ||
| 2796 | (synopsis "IPython is a tool for interactive computing in Python") | ||
| 2797 | (description | ||
| 2798 | "IPython provides a rich architecture for interactive computing with: | ||
| 2799 | Powerful interactive shells, a browser-based notebook, support for interactive | ||
| 2800 | data visualization, embeddable interpreters and tools for parallel | ||
| 2801 | computing.") | ||
| 2802 | (license bsd-3))) | ||
| 2803 | |||
| 2804 | (define-public python2-ipython | ||
| 2805 | (let ((ipython (package-with-python2 python-ipython))) | ||
| 2806 | (package (inherit ipython) | ||
| 2807 | ;; Make sure we use custom python2-NAME packages. | ||
| 2808 | (inputs | ||
| 2809 | `(("python2-numpydoc" ,python2-numpydoc) | ||
| 2810 | ("python2-matplotlib" ,python2-matplotlib) | ||
| 2811 | ,@(alist-delete "python-numpydoc" | ||
| 2812 | (alist-delete "python-matplotlib" | ||
| 2813 | (package-inputs ipython)))))))) | ||
