Skip to content

sage.features.Executable: Prepend $SAGE_VENV/bin:$SAGE_LOCAL/bin to PATH #31296

@mkoeppe

Description

@mkoeppe

Follow-up from #22731.

This is so that Sage becomes fully functional even when not being run from within sage-env (which sets PATH)

Of course, PATH is not actually manipulated, only Executable finds the executable in more places.

As an illustration, we update sage.interfaces.four_ti_2 and sage.interfaces.latte to use Executable.absolute_filename() from #31292. Then, after sage -i 4ti2 latte_int, the following works with this ticket:

$ venv/bin/python3 -c 'import sage.all; from sage.interfaces.four_ti_2 import four_ti_2; print(four_ti_2.groebner(lat=[[1,2,3],[1,1,1]]))'
$ venv/bin/python3 -c 'from sage.all import *; print(Polyhedron([[-3, 0], [0, 9]]).volume(measure="induced_rational"))'
3

In follow-up tickets, other code that calls executables needs to be updated to use Executable.absolute_path() from #31292. The first tickets to do so are #33440, #33465, #33466, #32645, #33467, #33405.

This is work towards:

Depends on #31292

CC: @tobiasdiez @kiwifb @tobihan @antonio-rojas @orlitzky

Component: build: configure

Author: Matthias Koeppe

Branch/Commit: 160e9af

Reviewer: Dima Pasechnik, Tobias Diez

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions