Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #33624: doctest unnecessarily assumes SAGE_VENV/bin contains `sa…
…ge` binary In my setup `SAGE_VENV` is left unset so it defaults to `sys.prefix = '/usr'`; in this way, sage uses system python packages (and everything works). However, the `sage` binary is not necessarily installed as `/usr/bin/sage`. For example: - I build just sagelib from source, so that the sage python packages are placed in `.../pkgs/sagemath-standard/build/lib.linux-x86_64-3.10/` and the sage scripts are placed in `.../pkgs/sagemath- standard/build/scripts-3.10/`. I want to use and doctest this sagelib without installing (which can be done easily by setting PATH and PYTHONPATH to those directories). Now `/usr/bin/sage` may or may not exist (depends on whether I have the system sagemath installed -- this is never true in github CI where the void linux package for sagemath is built and tested in a clean container) In any case, the directory where the actual `sage` script is located can be obtained as `os.path.dirname(sys.argv[0])` (this will normally be the same as `SAGE_VENV/bin`). URL: https://trac.sagemath.org/33624 Reported by: tornaria Ticket author(s): Gonzalo Tornaría Reviewer(s): Matthias Koeppe
- Loading branch information