-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Replace "$SAGE_LOCAL/bin" by more specific variables to make Sage easier to package, use in venvs #22731
Comments
This comment has been minimized.
This comment has been minimized.
Author: Tobias Hanen |
Commit: |
New commits:
|
Changed author from Tobias Hanen to Tobias Hansen |
comment:4
The name Now, if you want a invent a new variable with the purpose of defining the bindir (to replace |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
I have not had a chance to try this out locally (as my Sage is rebuilding.) Is this more or less what you had in mind jdemeyer? |
Changed author from Tobias Hansen to Tobias Hansen, Julian Rüth |
comment:9
It makes no sense to add both |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:111
Thanks! |
Changed branch from u/mkoeppe/22731 to |
comment:113
|
Changed branch from |
comment:114
I noticed it as well in sage-on-gentoo. I was trying to minimize the patch to
Why is this line needed, I am wondering? |
comment:115
Replying to @kiwifb:
It generates part of the documentation. |
comment:116
Is at the error point the value of |
comment:117
I see how it is used now. And no, Some dummy values could be set in the bootstrap script on the assumption you do that on a clean tree. |
comment:118
The problem is solved in #30013, so I need to move some of the changes to this ticket. |
comment:120
I will work on this after the next beta comes out. |
comment:121
Anyhow, just in case, here one could do --- a/bootstrap
+++ b/bootstrap
@@ -113,6 +113,8 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
# ONLY stderr, and to re-output the results back to stderr leaving
# stdout alone. Basically we swap the two descriptors using a
# third, filter, and then swap them back.
+ touch src/bin/sage-env-config
+ SAGE_SCRIPTS_DIR=./src/bin
BOOTSTRAP_QUIET="${BOOTSTRAP_QUIET}" \
SAGE_ROOT="$SAGE_ROOT" \
src/doc/bootstrap && \ and it all goes through. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:123
Cherry-picked a commit from the original branch of #30888, where it was observed that |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:125
Merged the latest beta. Ready for another round of review. |
comment:126
this works, after "git clean" as above, too. |
comment:127
Thanks! |
Changed branch from u/mkoeppe/22731 to |
Various scripts refer to "$SAGE_LOCAL/bin" in a way that conflates several different uses. We introduce new variables to give packagers more flexibility without having to patch, and to enable new installation schemes, including the use of Sage in users' venvs.
1a. Introduce
$SAGE_BIN
as the place where the binaries of all the SPKGs get installed to. Default is$SAGE_LOCAL/bin/
.1b. (Wishlist item:) Make it configurable through
./configure --bindir
, but this would need major changes to spkg-configure scripts. (Supporting--bindir
would be another step toward more autotools compliance, see Meta-ticket #21566.)2a. Scripts such as
src/bin/sage
,src/bin/sage-eval
are installed by thesagelib
package using thescripts
facility of distutils/setuptools. Ifsagelib
is installed into a venv, these scripts are installed into thebin
directory of the venv. For the default installation in sage-the-distribution--with-system-python
, this venv is identical withSAGE_LOCAL
. But if other venvs are created by the user, it will be unrelated toSAGE_LOCAL
; in fact,SAGE_LOCAL
may be undefined (in distribution packaging and when installing sagelib through pip). As proposed in #29013, we use the variableSAGE_VENV
for this, so these scripts would be referred to as$SAGE_VENV/bin/sage-eval
etc.2b. Referring to the
python3
used for sage. Likewise, this comes from the venv, not$SAGE_LOCAL/bin
. So it should be referred to as$SAGE_VENV/bin/python3
.2c. The subset of the scripts in
src/bin
, currently installed by thesagelib
package, that are "libexec"-like (not user-facing). Distribution packagers would like to hide these scripts. (In the old description of this ticket, it was proposed to use$SAGE_SCRIPTS_DIR
for this, but a more specific name is needed: We will use$SAGE_VENV_SCRIPTS_DIR
.)In this ticket, we introduce
SAGE_VENV
for 2abc, ignoring the "libexec" aspect (using$SAGE_VENV/bin
directly instead of going throughSAGE_VENV_SCRIPTS_DIR
). Items 1 and the libexec aspect of 2c can be done on follow-up tickets.We also make
sage-env-config
optional from the viewpoint of the other scripts. This is preparation for #29850 / #29852.See also:
src/bin/sage-env
: Make sure$SAGE_VENV/bin
is at the beginning of the PATHsrc/bin/sage-env
: MakeSAGE_ROOT
andSAGE_LOCAL
optionalsrc/requirements.txt
for installation ofsagelib
in a venvDepends on #29951
CC: @mkoeppe @jhpalmieri @orlitzky @tobiasdiez @isuruf @antonio-rojas @mwageringel
Component: porting
Author: Matthias Koeppe
Branch/Commit:
38eebc3
Reviewer: Tobias Diez, Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/22731
The text was updated successfully, but these errors were encountered: