Skip to content

Meson: Install Jupyter kernel automatically #39643

@tobiasdiez

Description

@tobiasdiez

Also missing:

sagemath_standard-10.6b6.data/data/share/jupyter/kernels/sagemath/kernel.json
sagemath_standard-10.6b6.data/data/share/jupyter/kernels/sagemath/logo-64x64.png
sagemath_standard-10.6b6.data/data/share/jupyter/kernels/sagemath/logo.svg

The kernel argv is currently set to

["/usr/bin/sage", "--python", "-m", "sage.repl.ipython_kernel", "-f", "{connection_file}"]

and I guess it might change to something like

["python", "-m", "sage.repl.ipython_kernel", "-f", "{connection_file}"]

This is similar to what ipykernel does (indeed they use ["python", "-m", "ipykernel_launcher", "-f", "{connection_file}"])

Originally posted by @tornaria in #39548 (comment)

From https://jupyter-client.readthedocs.io/en/latest/kernels.html#packaging:

creates the kernel directory with the kernel.json and kernel icons, which is included as shared-data, ending up in the share/jupyter/kernels/ folder in the user’s installed environment. 

Existing code:

self.install_kernel_spec()

Might be a bit hard with meson atm: mesonbuild/meson-python#517, mesonbuild/meson-python#678

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions