-
-
Notifications
You must be signed in to change notification settings - Fork 656
Description
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 the sagelib
package using the scripts
facility of distutils/setuptools. If sagelib
is installed into a venv, these scripts are installed into the bin
directory of the venv. For the default installation in sage-the-distribution --with-system-python
, this venv is identical with SAGE_LOCAL
. But if other venvs are created by the user, it will be unrelated to SAGE_LOCAL
; in fact, SAGE_LOCAL
may be undefined (in distribution packaging and when installing sagelib through pip). As proposed in #29013, we use the variable SAGE_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 the sagelib
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 through SAGE_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:
- https://salsa.debian.org/science-team/sagemath/-/blob/master/debian/patches/u1-scripts-dir.patch
- src/bin/sage-env: Make sure $SAGE_VENV/bin is at the beginning of the PATH #30013
src/bin/sage-env
: Make sure$SAGE_VENV/bin
is at the beginning of the PATH - src/bin/sage-env: Make SAGE_ROOT and SAGE_LOCAL optional #29951
src/bin/sage-env
: MakeSAGE_ROOT
andSAGE_LOCAL
optional - Add src/requirements.txt for installation of sagelib in a venv #30578 Add
src/requirements.txt
for installation ofsagelib
in a venv
Depends 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