1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages jupyter)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system python)
26 #:use-module (gnu packages check)
27 #:use-module (gnu packages cpp)
28 #:use-module (gnu packages linux)
29 #:use-module (gnu packages networking)
30 #:use-module (gnu packages pkg-config)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages python-xyz)
33 #:use-module (gnu packages time)
34 #:use-module (gnu packages tls))
36 (define-public python-jupyter-protocol
38 (name "python-jupyter-protocol")
42 (uri (pypi-uri "jupyter_protocol" version))
45 "1bk3as5yw9y5nmq6l15nr46aby34phmvsx9kxgqnm5pd5q2b5h57"))))
46 (build-system python-build-system)
48 `(("python-dateutil" ,python-dateutil)
49 ("python-jupyter-core" ,python-jupyter-core)
50 ("python-pyzmq" ,python-pyzmq)
51 ("python-traitlets" ,python-traitlets)))
53 `(("python-ipykernel" ,python-ipykernel)
54 ("python-ipython" ,python-ipython)
55 ("python-mock" ,python-mock)
56 ("python-pytest" ,python-pytest)))
57 (home-page "https://jupyter.org")
58 (synopsis "Jupyter protocol implementation")
60 "This Python library is an experimental implementation of the
61 @uref{https://jupyter-client.readthedocs.io/en/latest/messaging.html, Jupyter
62 protocol} to be used by both clients and kernels.")
63 (license license:bsd-3)
64 (properties '((upstream-name . "jupyter_protocol")))))
66 (define-public python-jupyter-kernel-mgmt
68 (name "python-jupyter-kernel-mgmt")
72 (uri (pypi-uri "jupyter_kernel_mgmt" version))
75 "0i7a78dn89ca8h0a42giyxwcmk6y4wrdr7q8h2ax9vybb84c795q"))))
76 (build-system python-build-system)
78 `(("python-dateutil" ,python-dateutil)
79 ("python-entrypoints" ,python-entrypoints)
80 ("python-jupyter-core" ,python-jupyter-core)
81 ("python-jupyter-protocol" ,python-jupyter-protocol)
82 ("python-pyzmq" ,python-pyzmq)
83 ("python-traitlets" ,python-traitlets)))
85 `(("python-ipykernel" ,python-ipykernel)
86 ("python-ipython" ,python-ipython)
87 ("python-mock" ,python-mock)
88 ("python-pytest" ,python-pytest)))
89 (home-page "https://jupyter.org")
90 (synopsis "Discover, launch, and communicate with Jupyter kernels")
92 "This package is an experimental refactoring of the machinery for
93 launching and using Jupyter kernels.")
94 (license license:bsd-3)
95 (properties '((upstream-name . "jupyter_kernel_mgmt")))))
97 (define-public python-jupyter-kernel-test
99 (name "python-jupyter-kernel-test")
101 (home-page "https://github.com/jupyter/jupyter_kernel_test")
103 ;; PyPI has a ".whl" file but not a proper source release.
104 ;; Thus, fetch code from Git.
106 (uri (git-reference (url home-page) (commit version)))
107 (file-name (git-file-name name version))
110 "00iy74i4i8is6axb9vlsm0b9wxkvyyxnbl8r0i4gaj3xd788jm83"))))
111 (build-system python-build-system)
113 ;; The repo doesn't contain a "setup.py" file so install files manually.
114 '(#:phases (modify-phases %standard-phases
118 (lambda* (#:key inputs outputs #:allow-other-keys)
119 (let* ((out (assoc-ref outputs "out"))
120 (version (python-version (assoc-ref inputs "python")))
121 (pydir (string-append out "/lib/python"
122 version "/site-packages/"
123 "jupyter_kernel_test")))
124 (for-each (lambda (file)
125 (install-file file pydir))
126 (find-files "jupyter_kernel_test"
130 `(("python-jupyter-kernel-mgmt" ,python-jupyter-kernel-mgmt)
131 ("python-jupyter-protocol" ,python-jupyter-protocol)
132 ("python-jsonschema" ,python-jsonschema)))
133 (synopsis "Test Jupyter kernels")
135 "@code{jupyter_kernel_test} is a tool for testing Jupyter kernels. It
136 tests kernels for successful code execution and conformance with the
137 @uref{https://jupyter-client.readthedocs.io/en/latest/messaging.html, Jupyter
138 Messaging Protocol}.")
139 (license license:bsd-3)))
148 (url "https://github.com/QuantStack/xeus.git")
152 "1m1b6z1538r7mv2ggn7bdbd9570ja7cadplq64zl8rgl2c8vdi2a"))
153 (file-name (git-file-name name version))))
154 (build-system cmake-build-system)
156 '(#:configure-flags '("-DBUILD_STATIC_LIBS=OFF"
157 "-DDISABLE_ARCH_NATIVE=ON" ;no '-march=native'
158 "-DBUILD_TESTING=ON")))
160 `(("pkg-config" ,pkg-config)
162 ;; The following inputs are used by the test suite.
163 ("googletest" ,googletest)
164 ("python-pytest" ,python-pytest)
166 ("python-jupyter-kernel-test" ,python-jupyter-kernel-test)
167 ("python-jupyter-client" ,python-jupyter-client)))
170 ("json-modern-cxx" ,json-modern-cxx)
174 ("util-linux" ,util-linux))) ;libuuid
175 (home-page "https://quantstack.net/xeus")
176 (synopsis "C++ implementation of the Jupyter Kernel protocol")
178 "@code{xeus} is a library meant to facilitate the implementation of
179 kernels for Jupyter. It takes the burden of implementing the Jupyter Kernel
180 protocol so developers can focus on implementing the interpreter part of the
183 Several Jupyter kernels are built upon @code{xeus}, such as @code{xeus-cling},
184 a kernel for the C++ programming language, and @code{xeus-python}, an
185 alternative Python kernel for Jupyter.")
186 (license license:bsd-3)))