-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
The distribution sagemath-environment has no dependencies and contains:
sage.env
sage.features
sage.misc.package
sage.misc.package_dir
(from Prepare sage.doctest for namespace packages #33033)sage.misc.temporary_file
(dependency onSAGE_TMP
/lazy_string
removed in sage.misc.temporary_file: Remove use of SAGE_TMP #33797)sage.misc.viewer
(The basic distributions sagemath-objects and sagemath-categories do not depend on these!)
It also includes the top-level scripts sage
and sage-env
, and the helper script sage-venv-config
. This will allow users to run sage -sh
even if sagelib is not installed.
To test:
$ ./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-environment && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
The distribution sagemath-repl depends on (install-requires) sagemath-environment and sagemath-objects and contains at least the following:
sage.repl
sage.doctest
(which depends onsage.repl
)sage.misc.sage_input
sage.misc.sage_eval
It also includes scripts such as sage-runtests
(which implements sage -t
), sage-ipython
(which is called when sage
is invoked with no arguments), etc.
Of course, with nothing else installed, neither sage -t
nor sage
will work fully because sage.all
is not available. But sage -t
already has the option --environment
for specifying a different top-level module in which to run the doctester; we use this in the test suite of sagemath-objects and sagemath-polyhedra (#32432).
To test:
$ ./bootstrap && ./sage -sh -c '(cd pkgs/sagemath-repl && SAGE_NUM_THREADS=16 tox -r -v -v -v -e py39)'
Afterwards:
$ source pkgs/sagemath-repl/.tox/py39/bin/activate
(py39) $ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.6.rc3, Release Date: 2022-04-29 │
│ Using Python 3.9.10. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┃ Warning: sage.all is not available; this is a limited REPL. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage:
Note the new warning about sage.all
.
We also change all pkgs/*/VERSION.txt
files from symlinks to regular files, updated by sage-update-version
when a new release is made. This makes it easier to cut post-versions such as 9.6.rc3.post4
or dev versions such as 9.6.rc4.dev1
, as was necessary during the development of this ticket. See documentation added in this ticket.
Follow-ups (see Meta-ticket #29705):
- We rework sagemath-objects, sagemath-categories as namespace packages (Modify find_python_sources to support modularization of sagelib by native namespace packages (PEP 420) #28925).
- Change sage-setup so that it install-requires sagemath-environment; then remove the load-path manipulations in
setup.py
. (Refactor distributions sagemath-{objects,categories} through sagemath-{environment,repl} #33812) - We change the distributions sagemath-objects and sagemath-categories (from Modularization of sagelib: Break out separate packages sagemath-objects, sagemath-categories #29865) so that they no longer includes the above modules but instead declare an
extras_require
"test" on sagemath-repl. (Refactor distributions sagemath-{objects,categories} through sagemath-{environment,repl} #33812) - Make
sage -help
,sage -advance
show what to install to make options work. Also show what to install on error. (#33795 comment:7) - Add to sagemath-environment:
sage.misc.sage_ostools
(need to split out Cython stuff),sage.misc.cython
(?) - Add an option to make
sage_eval
work with a smaller module thansage.all
, and use this option in most uses ofsage_eval
(Meta-ticket: Remove runtime dependency on everything viasage_eval
#33802)
Depends on #33797
Depends on #33016
Depends on #33799
Depends on #33801
Depends on #33803
CC: @kwankyu @tobiasdiez @kliem @orlitzky @dimpase @jhpalmieri @kiwifb
Component: refactoring
Keywords: sd111
Author: Matthias Koeppe
Branch/Commit: 3884373
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29941