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

sage: Determine SAGE_LOCAL, SAGE_ROOT via sage-config if it exists #29852

Closed
mkoeppe opened this issue Jun 13, 2020 · 26 comments
Closed

sage: Determine SAGE_LOCAL, SAGE_ROOT via sage-config if it exists #29852

mkoeppe opened this issue Jun 13, 2020 · 26 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Jun 13, 2020

We reduce the runtime dependency of sage on sage-env-config.

We query sage-config (installed by sage_conf, which has a dependency on our python3 package) for the values of SAGE_LOCAL and SAGE_ROOT. sage-config must be in the same directory as $0.

This allows the installed sage script to be invoked directly from $SAGE_LOCAL/bin in an environment without SAGE_... variables, restoring what was previously implemented in #25486.

Also, we move sourcing of sage-env-config (but not sage-env!) earlier in the sage script.
This is so that commands such as $SAGE_LOCAL/bin/sage --root work correctly.

Follow-up tickets:

CC: @kiwifb @orlitzky @jhpalmieri @antonio-rojas @seblabbe

Component: build

Keywords: sd111

Author: Matthias Koeppe

Branch/Commit: eb3793e

Reviewer: Dima Pasechnik, François Bissey

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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Jun 13, 2020
@mkoeppe mkoeppe removed this from the sage-9.2 milestone Jul 26, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 10, 2020

Changed dependencies from #29825 to #29850

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 13, 2020

Changed dependencies from #29850 to #22731

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 13, 2020

Branch: u/mkoeppe/get_rid_of_sage_env_config

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 13, 2020

Author: Matthias Koeppe

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 13, 2020

Last 10 new commits:

8f88709src/bin/sage: Only source sage-env-config if it exists
ab2655esrc/bin/sage: Use python3 etc. from PATH instead of using SAGE_LOCAL
4577f37src/bin/sage-env: Make sage-env-config optional
c35c170sage.env: Add SAGE_VENV
c585d94src/sage: Replace some SAGE_LOCAL by SAGE_VENV
2fd195fsrc/bin/sage: Fix reference to trac ticket
f3b7a9csrc/sage/env.py: Add documentation
995af9fMerge branch 't/22731/22731' into t/29852/get_rid_of_sage_env_config
2bce7b8src/bin/sage: Find SAGE_ROOT, SAGE_LOCAL from sage-config
9810f49src/bin/sage: Determine SAGE_ROOT, SAGE_LOCAL earlier

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 13, 2020

Commit: 9810f49

@mkoeppe mkoeppe changed the title Get rid of sage-env-config sage: Determine SAGE_LOCAL, SAGE_ROOT via sage-config if it exists Nov 13, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe added this to the sage-9.3 milestone Nov 13, 2020
@mkoeppe

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Nov 19, 2020

comment:10

lgtm

@dimpase
Copy link
Member

dimpase commented Nov 19, 2020

Reviewer: Dima Pasechnik

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 19, 2020

comment:11

Thanks!

@vbraun
Copy link
Member

vbraun commented Nov 22, 2020

Changed branch from u/mkoeppe/get_rid_of_sage_env_config to 9810f49

@vbraun
Copy link
Member

vbraun commented Nov 22, 2020

Changed branch from 9810f49 to u/mkoeppe/get_rid_of_sage_env_config

@vbraun vbraun reopened this Nov 22, 2020
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 23, 2020

Changed commit from 9810f49 to eb3793e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 23, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

1fe77a8src/bin/sage-env: Do not set SAGE_SCRIPTS_DIR
eb3793eMerge branch 't/22731/22731' into t/29852/get_rid_of_sage_env_config

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 23, 2020

comment:16

Merged the updated #22731 - needs another round of review

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 6, 2020

Changed keywords from none to sd111

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 6, 2020

comment:17

Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 6, 2020

Changed dependencies from #22731 to none

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 11, 2020

comment:20

Finishing the review of this ticket would be helpful - #30888 and #30013 depend on it.

@kiwifb
Copy link
Member

kiwifb commented Dec 11, 2020

Changed reviewer from Dima Pasechnik to Dima Pasechnik, François Bissey

@kiwifb
Copy link
Member

kiwifb commented Dec 11, 2020

comment:21

I was rather convinced that was already in. Oh yes, it has been reverted once. It should be fine now.

@mkoeppe
Copy link
Member Author

mkoeppe commented Dec 11, 2020

comment:22

Thank you!

@vbraun
Copy link
Member

vbraun commented Dec 13, 2020

Changed branch from u/mkoeppe/get_rid_of_sage_env_config to eb3793e

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