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

Put SAGE_ROOT/src/bin in PATH only when invoked by SAGE_ROOT/sage or sage-build-env #32933

Closed
mkoeppe opened this issue Nov 25, 2021 · 14 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Nov 25, 2021

Only when invoked as SAGE_ROOT/sage or SAGE_ROOT/src/bin/sage, then $SAGE_ROOT/src/bin should be put in the front of PATH.

When the installed sage script, SAGE_VENV/bin/sage, is invoked directly, it should not put $SAGE_ROOT/src/bin on the PATH.

CC: @kwankyu @jhpalmieri

Component: scripts

Author: Matthias Koeppe

Branch/Commit: 7519048

Reviewer: Kwankyu Lee

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

@mkoeppe mkoeppe added this to the sage-9.5 milestone Nov 25, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 26, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 26, 2021

New commits:

7519048src/bin/sage[-env]: Put SAGE_ROOT/src/bin in front of path only if run out of this directory

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 26, 2021

Author: Matthias Koeppe

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 26, 2021

Commit: 7519048

@jhpalmieri
Copy link
Member

comment:3

Is this supposed to solve a particular problem, or is it general cleanup?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 27, 2021

comment:4

It fixes a problem when sagemath-standard is installed in a user-defined venv. In this case, before this ticket, the installed sage script would actually end up running sage from SAGE_ROOT/venv.

We ran into this in #29865. The distribution sagemath-objects, as of #29865, also installs the sage script, and it had this behavior.

@kwankyu
Copy link
Collaborator

kwankyu commented Nov 27, 2021

comment:5

Replying to @mkoeppe:

We ran into this in #29865. The distribution sagemath-objects, as of #29865, also installs the sage script, and it had this behavior.

As this is merged with #29865, we can set the status when we do so for #29865. Is this okay?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 27, 2021

comment:6

That's fine, but the idea with opening this separate ticket was that it can be reviewed separately.

@kwankyu
Copy link
Collaborator

kwankyu commented Nov 27, 2021

comment:7

Replying to @mkoeppe:

That's fine, but the idea with opening this separate ticket was that it can be reviewed separately.

Of course, it is okay that someone else, perhaps John, reviews this, earlier than #29865.

@kwankyu
Copy link
Collaborator

kwankyu commented Nov 29, 2021

comment:8

Already merged with #29865

@kwankyu kwankyu removed this from the sage-9.5 milestone Nov 29, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 29, 2021

comment:9

It's better to merge it, so that the ticket description is included in the commit message.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 29, 2021

Reviewer: Kwankyu Lee

@vbraun
Copy link
Member

vbraun commented Dec 23, 2021

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