Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Jupyter kernel in the correct prefix #25546

Closed
jdemeyer opened this issue Jun 8, 2018 · 14 comments
Closed

Install Jupyter kernel in the correct prefix #25546

jdemeyer opened this issue Jun 8, 2018 · 14 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Jun 8, 2018

The Sage Jupyter kernel is unconditionally installed in sys.prefix. However, this should instead be the install_data directory. This defaults to the installation prefix, which in turn defaults to sys.prefix. So the default won't change, but it allows customization.

The reason for choosing install_data is to be compatible with other Jupyter packages, which use the data_files option to setup() for installing Jupyter files (see for example https://github.com/jupyter-widgets/ipywidgets/blob/master/widgetsnbextension/setup.py#L203).
Those files are installed in the install_data directory.

CC: @timokau @kiwifb

Component: distribution

Author: Jeroen Demeyer

Branch/Commit: ad0ee29

Reviewer: Vincent Klein

Issue created by migration from https://trac.sagemath.org/ticket/25546

@jdemeyer jdemeyer added this to the sage-8.3 milestone Jun 8, 2018
@jdemeyer
Copy link
Author

jdemeyer commented Jun 8, 2018

Branch: u/jdemeyer/ticket/25546

@jdemeyer
Copy link
Author

jdemeyer commented Jun 8, 2018

Commit: ad0ee29

@jdemeyer
Copy link
Author

jdemeyer commented Jun 8, 2018

New commits:

ad0ee29Install Jupyter kernel in install_data directory

@jdemeyer

This comment has been minimized.

@kiwifb
Copy link
Member

kiwifb commented Jun 8, 2018

comment:4

That looks like it may greatly simplify my life. I have still one issue about the current setup but it is comparatively minor - I think the code installing the kernel should live under sage_setup since you are not supposed to use it at runtime. But that can wait.

@timokau
Copy link
Contributor

timokau commented Jun 9, 2018

comment:5

What is the install_data directory? Is that variable documented somewhere?

@kiwifb
Copy link
Member

kiwifb commented Jun 10, 2018

comment:6

Replying to @timokau:

What is the install_data directory? Is that variable documented somewhere?

It's a standard distutils command it is mentioned on this page for example https://wiki.python.org/moin/Distutils/Tutorial.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

comment:8

Replying to @timokau:

What is the install_data directory? Is that variable documented somewhere?

I don't know whether it's documented, but it's the directory where data_files are installed. As I explained in the ticket description, it's certainly the right directory to use.

@jdemeyer
Copy link
Author

comment:9

Replying to @kiwifb:

https://wiki.python.org/moin/Distutils/Tutorial.

I think that page takes about about install_data command, not the install_data directory.

@timokau
Copy link
Contributor

timokau commented Jun 10, 2018

comment:10

Replying to @jdemeyer:

Replying to @timokau:

What is the install_data directory? Is that variable documented somewhere?

I don't know whether it's documented, but it's the directory where data_files are installed. As I explained in the ticket description, it's certainly the right directory to use.

I can't even find the default value of that variable by grepping through the distutils source. However as long as it is relative to --prefix, thats fine by me and should solve #25328.

@vinklein
Copy link
Mannequin

vinklein mannequin commented Jun 19, 2018

comment:11

Tested. It works for me.

@vinklein
Copy link
Mannequin

vinklein mannequin commented Jun 19, 2018

Reviewer: Vincent Klein

@vbraun
Copy link
Member

vbraun commented Jun 20, 2018

Changed branch from u/jdemeyer/ticket/25546 to ad0ee29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants