passagemath-standard-no-symbolics 10.6.31rc3__cp314-cp314-musllinux_1_2_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-standard-no-symbolics might be problematic. Click here for more details.
- passagemath_standard_no_symbolics-10.6.31rc3.data/scripts/sage-grep +5 -0
- passagemath_standard_no_symbolics-10.6.31rc3.data/scripts/sage-grepdoc +5 -0
- passagemath_standard_no_symbolics-10.6.31rc3.data/scripts/sage-list-packages +103 -0
- passagemath_standard_no_symbolics-10.6.31rc3.dist-info/METADATA +150 -0
- passagemath_standard_no_symbolics-10.6.31rc3.dist-info/RECORD +82 -0
- passagemath_standard_no_symbolics-10.6.31rc3.dist-info/WHEEL +5 -0
- passagemath_standard_no_symbolics-10.6.31rc3.dist-info/top_level.txt +1 -0
- sage/all.py +207 -0
- sage/all_cmdline.py +36 -0
- sage/cli/__init__.py +61 -0
- sage/cli/__main__.py +5 -0
- sage/cli/eval_cmd.py +45 -0
- sage/cli/eval_cmd_test.py +25 -0
- sage/cli/interactive_shell_cmd.py +28 -0
- sage/cli/notebook_cmd.py +51 -0
- sage/cli/notebook_cmd_test.py +39 -0
- sage/cli/options.py +26 -0
- sage/cli/run_file_cmd.py +50 -0
- sage/cli/version_cmd.py +26 -0
- sage/databases/all.py +83 -0
- sage/databases/cubic_hecke_db.py +1527 -0
- sage/dynamics/all.py +31 -0
- sage/dynamics/surface_dynamics_deprecation.py +32 -0
- sage/ext_data/kenzo/CP2.txt +45 -0
- sage/ext_data/kenzo/CP3.txt +349 -0
- sage/ext_data/kenzo/CP4.txt +4774 -0
- sage/ext_data/kenzo/README.txt +49 -0
- sage/ext_data/kenzo/S4.txt +20 -0
- sage/ext_data/mwrank/PRIMES +1 -0
- sage/ext_data/nbconvert/postprocess.py +48 -0
- sage/ext_data/nbconvert/rst_sage.tpl +99 -0
- sage/ext_data/nodoctest +0 -0
- sage/ext_data/notebook-ipython/kernel.json.in +11 -0
- sage/ext_data/notebook-ipython/logo-64x64.png +0 -0
- sage/ext_data/notebook-ipython/logo.svg +352 -0
- sage/ext_data/valgrind/pyalloc.supp +58 -0
- sage/ext_data/valgrind/sage-additional.supp +417 -0
- sage/ext_data/valgrind/sage.supp +43 -0
- sage/ext_data/valgrind/valgrind-python.supp +480 -0
- sage/geometry/all.py +12 -0
- sage/groups/matrix_gps/pickling_overrides.py +110 -0
- sage/homology/tests.py +66 -0
- sage/interacts/algebra.py +20 -0
- sage/interacts/all.py +25 -0
- sage/interacts/calculus.py +24 -0
- sage/interacts/fractals.py +18 -0
- sage/interacts/geometry.py +19 -0
- sage/interacts/library.py +1950 -0
- sage/interacts/library_cython.cpython-314-x86_64-linux-musl.so +0 -0
- sage/interacts/statistics.py +19 -0
- sage/interfaces/axiom.py +1002 -0
- sage/interfaces/kash.py +834 -0
- sage/interfaces/lie.py +950 -0
- sage/interfaces/matlab.py +413 -0
- sage/interfaces/mupad.py +686 -0
- sage/interfaces/octave.py +858 -0
- sage/interfaces/phc.py +943 -0
- sage/interfaces/psage.py +189 -0
- sage/interfaces/qsieve.py +4 -0
- sage/interfaces/r.py +2096 -0
- sage/interfaces/read_data.py +46 -0
- sage/interfaces/scilab.py +576 -0
- sage/interfaces/tests.py +81 -0
- sage/libs/all.py +11 -0
- sage/libs/cremona/__init__.py +0 -0
- sage/libs/mwrank/__init__.py +0 -0
- sage/logic/all.py +3 -0
- sage/logic/booleval.py +160 -0
- sage/logic/boolformula.py +1490 -0
- sage/logic/logic.py +856 -0
- sage/logic/logicparser.py +696 -0
- sage/logic/logictable.py +272 -0
- sage/logic/propcalc.py +311 -0
- sage/misc/all.py +28 -0
- sage/misc/lazy_attribute.pyi +11 -0
- sage/rings/all.py +48 -0
- sage/rings/commutative_algebra.py +38 -0
- sage/rings/finite_rings/all.py +21 -0
- sage/rings/numbers_abc.py +58 -0
- sage/rings/polynomial/all.py +22 -0
- sage/rings/polynomial/convolution.py +421 -0
- sage/symbolic/all__sagemath_standard_no_symbolics.py +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!python
|
|
2
|
+
r"""
|
|
3
|
+
Script to list the Sage packages
|
|
4
|
+
|
|
5
|
+
This is script can be called with one argument which might be either
|
|
6
|
+
"all", "standard", "optional", or "experimental". It is mostly a
|
|
7
|
+
script interface to sage_setup.packages.list_packages.
|
|
8
|
+
"""
|
|
9
|
+
import os
|
|
10
|
+
import argparse
|
|
11
|
+
|
|
12
|
+
if "SAGE_ROOT" not in os.environ:
|
|
13
|
+
raise RuntimeError("The environment variable SAGE_ROOT must be set.")
|
|
14
|
+
SAGE_ROOT = os.environ["SAGE_ROOT"]
|
|
15
|
+
|
|
16
|
+
from sage.misc.package import list_packages
|
|
17
|
+
|
|
18
|
+
# Input parsing #
|
|
19
|
+
#################
|
|
20
|
+
|
|
21
|
+
parser = argparse.ArgumentParser(description="List Sage's packages")
|
|
22
|
+
parser.add_argument('category', choices=['all', 'standard', 'optional',
|
|
23
|
+
'experimental', 'installed'],
|
|
24
|
+
metavar="category",
|
|
25
|
+
help="The type of packages. Can be 'all', 'standard', "
|
|
26
|
+
"'optional', or 'experimental'.")
|
|
27
|
+
parser.add_argument('--installed-only', dest='installed_only',
|
|
28
|
+
default=False, action='store_true',
|
|
29
|
+
help='only display installed packages')
|
|
30
|
+
parser.add_argument('--not-installed-only', dest='not_installed_only',
|
|
31
|
+
default=False, action='store_true',
|
|
32
|
+
help='only display non installed packages')
|
|
33
|
+
parser.add_argument('--dump', dest='dump', default=False, action='store_true',
|
|
34
|
+
help='computer-friendly format')
|
|
35
|
+
parser.add_argument('--no-version', dest='version', default=True,
|
|
36
|
+
action='store_false',
|
|
37
|
+
help='no version number')
|
|
38
|
+
parser.add_argument('--local', dest='local', default=False,
|
|
39
|
+
action='store_true',
|
|
40
|
+
help='only read local data')
|
|
41
|
+
|
|
42
|
+
args = vars(parser.parse_args())
|
|
43
|
+
|
|
44
|
+
# Get the data #
|
|
45
|
+
################
|
|
46
|
+
|
|
47
|
+
if args['category'] == 'installed':
|
|
48
|
+
WARN = "*" * 60 + "\n"
|
|
49
|
+
WARN += 'The "installed" category is deprecated. Use\n'
|
|
50
|
+
WARN += '"list-packages all --installed-only" instead\n'
|
|
51
|
+
WARN += "*" * 60
|
|
52
|
+
|
|
53
|
+
args['category'] = 'all'
|
|
54
|
+
args['installed_only'] = True
|
|
55
|
+
else:
|
|
56
|
+
WARN = None
|
|
57
|
+
|
|
58
|
+
if args['installed_only'] and args['not_installed_only']:
|
|
59
|
+
raise ValueError("only one of --installed-only or --not-installed-only can be specified")
|
|
60
|
+
|
|
61
|
+
# set the output format
|
|
62
|
+
if args['version']:
|
|
63
|
+
if args['category'] == 'installed':
|
|
64
|
+
format_string = "{installed_version}"
|
|
65
|
+
else:
|
|
66
|
+
format_string = "{remote_version} ({installed_version})"
|
|
67
|
+
else:
|
|
68
|
+
args['dump'] = True
|
|
69
|
+
format_string = ''
|
|
70
|
+
|
|
71
|
+
if args['dump']:
|
|
72
|
+
format_string = "{name} " + format_string
|
|
73
|
+
else:
|
|
74
|
+
format_string = "{name:.<40}" + format_string
|
|
75
|
+
print(format_string.format(name="[package]", installed_version="[version]",
|
|
76
|
+
remote_version="[latest version]"))
|
|
77
|
+
print()
|
|
78
|
+
|
|
79
|
+
# make the list of packages
|
|
80
|
+
if args['category'] == 'all':
|
|
81
|
+
L = list(list_packages(local=True, ignore_URLError=True).values())
|
|
82
|
+
elif args['category'] == 'optional':
|
|
83
|
+
L = list(list_packages('optional', local=args['local'], ignore_URLError=True).values())
|
|
84
|
+
else:
|
|
85
|
+
L = list(list_packages(args['category'], local=args['local'], ignore_URLError=True).values())
|
|
86
|
+
|
|
87
|
+
# possible filter by installed/not installed
|
|
88
|
+
if WARN:
|
|
89
|
+
print(WARN)
|
|
90
|
+
if args['installed_only']:
|
|
91
|
+
L = [pkg for pkg in L if pkg.is_installed()]
|
|
92
|
+
elif args['not_installed_only']:
|
|
93
|
+
L = [pkg for pkg in L if not pkg.is_installed()]
|
|
94
|
+
|
|
95
|
+
L.sort(key=lambda pkg: pkg.name)
|
|
96
|
+
|
|
97
|
+
# print (while getting rid of None in versions)
|
|
98
|
+
for pkg in L:
|
|
99
|
+
pkg = pkg._replace(installed_version=pkg.installed_version or 'not_installed',
|
|
100
|
+
remote_version=pkg.remote_version or '?')
|
|
101
|
+
print(format_string.format(**pkg._asdict()))
|
|
102
|
+
if WARN:
|
|
103
|
+
print(WARN)
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: passagemath-standard-no-symbolics
|
|
3
|
+
Version: 10.6.31rc3
|
|
4
|
+
Summary: passagemath: Sage library without the symbolics subsystem
|
|
5
|
+
Author-email: The Sage Developers <sage-support@googlegroups.com>
|
|
6
|
+
Maintainer: Matthias Köppe, passagemath contributors
|
|
7
|
+
License-Expression: GPL-2.0-or-later
|
|
8
|
+
Project-URL: release notes, https://github.com/passagemath/passagemath/releases
|
|
9
|
+
Project-URL: repo (upstream), https://github.com/sagemath/sage
|
|
10
|
+
Project-URL: repo, https://github.com/passagemath/passagemath
|
|
11
|
+
Project-URL: documentation, https://passagemath.org/docs/latest
|
|
12
|
+
Project-URL: homepage (upstream), https://www.sagemath.org
|
|
13
|
+
Project-URL: discourse, https://passagemath.discourse.group
|
|
14
|
+
Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
|
|
15
|
+
Project-URL: tracker, https://github.com/passagemath/passagemath/issues
|
|
16
|
+
Classifier: Development Status :: 6 - Mature
|
|
17
|
+
Classifier: Intended Audience :: Education
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Classifier: Operating System :: POSIX
|
|
20
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
22
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
28
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
29
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
30
|
+
Requires-Python: <3.15,>=3.10
|
|
31
|
+
Description-Content-Type: text/x-rst
|
|
32
|
+
Requires-Dist: six>=1.15.0
|
|
33
|
+
Requires-Dist: passagemath-brial==10.6.31rc3
|
|
34
|
+
Requires-Dist: passagemath-categories==10.6.31rc3
|
|
35
|
+
Requires-Dist: passagemath-cddlib==10.6.31rc3
|
|
36
|
+
Requires-Dist: passagemath-combinat==10.6.31rc3
|
|
37
|
+
Requires-Dist: passagemath-eclib==10.6.31rc3
|
|
38
|
+
Requires-Dist: passagemath-environment==10.6.31rc3
|
|
39
|
+
Requires-Dist: passagemath-flint==10.6.31rc3
|
|
40
|
+
Requires-Dist: passagemath-gap==10.6.31rc3
|
|
41
|
+
Requires-Dist: passagemath-gap-pkg-transgrp-data==10.6.31rc3
|
|
42
|
+
Requires-Dist: passagemath-gap-pkg-ctbllib-data==10.6.31rc3
|
|
43
|
+
Requires-Dist: passagemath-gap-pkg-tomlib-data==10.6.31rc3
|
|
44
|
+
Requires-Dist: passagemath-gap-pkg-irredsol-data==10.6.31rc3
|
|
45
|
+
Requires-Dist: passagemath-glpk==10.6.31rc3
|
|
46
|
+
Requires-Dist: passagemath-graphs==10.6.31rc3
|
|
47
|
+
Requires-Dist: passagemath-groups==10.6.31rc3
|
|
48
|
+
Requires-Dist: passagemath-homfly==10.6.31rc3
|
|
49
|
+
Requires-Dist: passagemath-lcalc==10.6.31rc3
|
|
50
|
+
Requires-Dist: passagemath-libbraiding==10.6.31rc3
|
|
51
|
+
Requires-Dist: passagemath-libecm==10.6.31rc3
|
|
52
|
+
Requires-Dist: passagemath-linbox==10.6.31rc3
|
|
53
|
+
Requires-Dist: passagemath-modules==10.6.31rc3
|
|
54
|
+
Requires-Dist: passagemath-nauty==10.6.31rc3
|
|
55
|
+
Requires-Dist: passagemath-ntl==10.6.31rc3
|
|
56
|
+
Requires-Dist: passagemath-objects==10.6.31rc3
|
|
57
|
+
Requires-Dist: passagemath-palp==10.6.31rc3
|
|
58
|
+
Requires-Dist: passagemath-pari==10.6.31rc3
|
|
59
|
+
Requires-Dist: passagemath-pari-galdata==10.6.31rc3
|
|
60
|
+
Requires-Dist: passagemath-pari-seadata-small==10.6.31rc3
|
|
61
|
+
Requires-Dist: passagemath-planarity==10.6.31rc3
|
|
62
|
+
Requires-Dist: passagemath-plot==10.6.31rc3
|
|
63
|
+
Requires-Dist: passagemath-polyhedra==10.6.31rc3
|
|
64
|
+
Requires-Dist: passagemath-repl==10.6.31rc3
|
|
65
|
+
Requires-Dist: passagemath-schemes==10.6.31rc3
|
|
66
|
+
Requires-Dist: passagemath-singular==10.6.31rc3
|
|
67
|
+
Requires-Dist: passagemath-tachyon==10.6.31rc3
|
|
68
|
+
Requires-Dist: cysignals<1.12.4; sys_platform == "win32"
|
|
69
|
+
Requires-Dist: cysignals!=1.12.0,>=1.11.2
|
|
70
|
+
Requires-Dist: cython<3.2.0,>=3.0.8
|
|
71
|
+
Requires-Dist: cython<3.2.0,>=3.0.8
|
|
72
|
+
Requires-Dist: gmpy2~=2.1.b999
|
|
73
|
+
Requires-Dist: jupyter-core
|
|
74
|
+
Requires-Dist: lrcalc
|
|
75
|
+
Requires-Dist: memory_allocator
|
|
76
|
+
Requires-Dist: numpy>=1.19
|
|
77
|
+
Requires-Dist: numpy>=1.22.4
|
|
78
|
+
Requires-Dist: pkgconfig
|
|
79
|
+
Requires-Dist: passagemath-ppl
|
|
80
|
+
Requires-Dist: passagemath-primesieve-primecount
|
|
81
|
+
Requires-Dist: requests>=2.13.0
|
|
82
|
+
Requires-Dist: ipython>=7.13.0
|
|
83
|
+
Requires-Dist: pexpect>=4.8.0
|
|
84
|
+
Requires-Dist: sphinx<9,>=5.2
|
|
85
|
+
Requires-Dist: networkx>=2.4
|
|
86
|
+
Requires-Dist: scipy>=1.5
|
|
87
|
+
Requires-Dist: matplotlib>=3.5.1
|
|
88
|
+
Requires-Dist: pillow>=7.2.0
|
|
89
|
+
Requires-Dist: ipykernel>=5.2.1
|
|
90
|
+
Requires-Dist: jupyter-client
|
|
91
|
+
Requires-Dist: ipywidgets>=7.5.1
|
|
92
|
+
Requires-Dist: fpylll>=0.5.9
|
|
93
|
+
Requires-Dist: ptyprocess>0.5
|
|
94
|
+
Provides-Extra: test
|
|
95
|
+
|
|
96
|
+
======================================================================================
|
|
97
|
+
passagemath: Sage library without the symbolics subsystem
|
|
98
|
+
======================================================================================
|
|
99
|
+
|
|
100
|
+
`passagemath <https://github.com/passagemath/passagemath>`__ is open
|
|
101
|
+
source mathematical software in Python, released under the GNU General
|
|
102
|
+
Public Licence GPLv2+.
|
|
103
|
+
|
|
104
|
+
It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
|
|
105
|
+
developed 2005-2025 under the motto “Creating a Viable Open Source
|
|
106
|
+
Alternative to Magma, Maple, Mathematica, and MATLAB”.
|
|
107
|
+
|
|
108
|
+
The passagemath fork uses the motto "Creating a Free Passage Between the
|
|
109
|
+
Scientific Python Ecosystem and Mathematical Software Communities."
|
|
110
|
+
It was created in October 2024 with the following goals:
|
|
111
|
+
|
|
112
|
+
- providing modularized installation with pip,
|
|
113
|
+
- establishing first-class membership in the scientific Python
|
|
114
|
+
ecosystem,
|
|
115
|
+
- giving `clear attribution of upstream
|
|
116
|
+
projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
|
|
117
|
+
- providing independently usable Python interfaces to upstream
|
|
118
|
+
libraries,
|
|
119
|
+
- offering `platform portability and integration testing
|
|
120
|
+
services <https://github.com/passagemath/passagemath/issues/704>`__
|
|
121
|
+
to upstream projects,
|
|
122
|
+
- inviting collaborations with upstream projects,
|
|
123
|
+
- `building a professional, respectful, inclusive
|
|
124
|
+
community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
|
|
125
|
+
- `empowering Sage users to participate in the scientific Python ecosystem
|
|
126
|
+
<https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
|
|
127
|
+
- developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
|
|
128
|
+
serverless deployment with Javascript,
|
|
129
|
+
- developing a native Windows port.
|
|
130
|
+
|
|
131
|
+
`Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
|
|
132
|
+
available online.
|
|
133
|
+
|
|
134
|
+
passagemath attempts to support and provides binary wheels suitable for
|
|
135
|
+
all major Linux distributions and recent versions of macOS.
|
|
136
|
+
|
|
137
|
+
Binary wheels for native Windows (x86_64) are are available for a subset of
|
|
138
|
+
the passagemath distributions. Use of the full functionality of passagemath
|
|
139
|
+
on Windows currently requires the use of Windows Subsystem for Linux (WSL)
|
|
140
|
+
or virtualization.
|
|
141
|
+
|
|
142
|
+
The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.13.x.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
About this pip-installable distribution package
|
|
146
|
+
-----------------------------------------------
|
|
147
|
+
|
|
148
|
+
This pip-installable distribution ``passagemath-standard-no-symbolics`` is a distribution of a part of the Sage Library.
|
|
149
|
+
|
|
150
|
+
Its main purpose is as a technical tool for the modularization project, to test that large parts of the Sage library are independent of the symbolics subsystem.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
passagemath_standard_no_symbolics-10.6.31rc3.data/scripts/sage-grep,sha256=y7No1LTYggkkven17dnoZKnBiZm8TO6iw8KEJkJSRmg,119
|
|
2
|
+
passagemath_standard_no_symbolics-10.6.31rc3.data/scripts/sage-grepdoc,sha256=R855yu3m539GvfdhptwsDG3Dgwb8wvHBJQDhBIrv4jA,70
|
|
3
|
+
passagemath_standard_no_symbolics-10.6.31rc3.data/scripts/sage-list-packages,sha256=4vwXzr1iKz2NPJwlfd7j0uBExqkxkSyhyyIqPtqVFFM,3650
|
|
4
|
+
sage/all.py,sha256=_7HnXjnSwDO3HYTZIpkw5-Jpmp45IzzpIoWwAQXXu7Q,6297
|
|
5
|
+
sage/all_cmdline.py,sha256=CJOAQpBYbSivmPwuVeWH-9G1tPpRuckNlEV7VXOTb7c,1252
|
|
6
|
+
sage/cli/__init__.py,sha256=ZaFsFSOM_G2n_hORDG2iG-8XU8p6EaG7xJqDKxHs4v0,1759
|
|
7
|
+
sage/cli/__main__.py,sha256=8jofuQS-kuFm4aDVYryVvqkBYmgihE98O9I_cnwjjo4,56
|
|
8
|
+
sage/cli/eval_cmd.py,sha256=K32GrC6565_X_gmW5SS8wmMcHFc-Abhk6Sl7gshRwZY,1066
|
|
9
|
+
sage/cli/eval_cmd_test.py,sha256=wtSU7GgSyl4XJEYEcqOlIdVY5jx9NRQj6daDZjp6i94,682
|
|
10
|
+
sage/cli/interactive_shell_cmd.py,sha256=by_Hlv0v8VP1oa6Su-BlSObigkEGqanTTHv2i4MzTYg,865
|
|
11
|
+
sage/cli/notebook_cmd.py,sha256=ZOIurUXekeXuxRGIKlmfnziDRQin04fUTHpGvvq5UWE,1315
|
|
12
|
+
sage/cli/notebook_cmd_test.py,sha256=vRFKfjrasNY7myfmq6Otw3-h9S6NMhbuxAGKEvC4gjo,1117
|
|
13
|
+
sage/cli/options.py,sha256=bxvZVp-TP1d0UB9-snjeSs-l1WeLcEHGNq3nFJ5aNi8,598
|
|
14
|
+
sage/cli/run_file_cmd.py,sha256=j1rKCqPGVp_kyV7mCde5ONRjVcbAli3fgDtYWZyi9F4,1474
|
|
15
|
+
sage/cli/version_cmd.py,sha256=VywFqd60dcjr5wl-cfUNYi6YLNF0YM30DfBxPWDBraQ,530
|
|
16
|
+
sage/databases/all.py,sha256=7bgfPwuS97DCdHgKj61zXoBibwoGkRgtS9kf_jwcQ50,2647
|
|
17
|
+
sage/databases/cubic_hecke_db.py,sha256=r5L5BdjpoxcnkdtpdCLhj9XfdiU4jZNZnjzqYph_qaE,63703
|
|
18
|
+
sage/dynamics/all.py,sha256=tZTKTXcMirX--xGRQgw4y5j4BA0vd_xPmcDg79_OsQs,854
|
|
19
|
+
sage/dynamics/surface_dynamics_deprecation.py,sha256=Dxxnecz3JvFvJkehFqM-TuheZtTTWm1tvW7Ac4D68AA,1749
|
|
20
|
+
sage/ext_data/nodoctest,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
sage/ext_data/kenzo/CP2.txt,sha256=DYHV8ETaavPvch7t5KdEuGhEqoOAozD7NVAzFGbR3ws,1757
|
|
22
|
+
sage/ext_data/kenzo/CP3.txt,sha256=zyCb_0Lh5zAUrK_RJ-wFdCckivlMRyIEnN9xVg1sDsE,27973
|
|
23
|
+
sage/ext_data/kenzo/CP4.txt,sha256=WXb63Qce3f9Z3Q6K3_zkI0W4-cHBM93XMn7K5bNQD3U,640878
|
|
24
|
+
sage/ext_data/kenzo/README.txt,sha256=SZywXyUDRE8JUt2_JajOYslQiEBSkkB5-14jtxPIt08,1912
|
|
25
|
+
sage/ext_data/kenzo/S4.txt,sha256=iSXavQqy7ep6HFOWnnsHtqoDhL4Hu3s1SpsaUKbizWs,272
|
|
26
|
+
sage/ext_data/mwrank/PRIMES,sha256=VdZJeX1ncCcqaK3bPpXwh8nQ2GB-yN5LaerX4Roet2o,9
|
|
27
|
+
sage/ext_data/nbconvert/postprocess.py,sha256=BNUH6heL9P9OEaUhv9-07Nq_Dny_sqbkF0kdIDJL6RI,1355
|
|
28
|
+
sage/ext_data/nbconvert/rst_sage.tpl,sha256=DclRJXPuUn4ecc6WRyMngH8zulcstKAP78Z6HPhiFSc,2090
|
|
29
|
+
sage/ext_data/notebook-ipython/kernel.json.in,sha256=RWoarFgeEifk6Jfiew6gWgclIC91k_cLje0CfIaYIIk,177
|
|
30
|
+
sage/ext_data/notebook-ipython/logo-64x64.png,sha256=pE3myKl2ywp6zDUD0JiMs-lvAk6T4O3z5PdEC_B0ZL4,3421
|
|
31
|
+
sage/ext_data/notebook-ipython/logo.svg,sha256=C9lkyX-_DqtTKOlcLFRu36k7scdBufRnYdy4AMHa7GQ,19074
|
|
32
|
+
sage/ext_data/valgrind/pyalloc.supp,sha256=_lVt4GPAW-A2b7jXp2v_OwJzYofKcieW6HNY-ixNsoA,1126
|
|
33
|
+
sage/ext_data/valgrind/sage-additional.supp,sha256=mE2SwaNJmAHDCu4COIF3LusW9RbWDkXqT0GGPjE1iRM,11236
|
|
34
|
+
sage/ext_data/valgrind/sage.supp,sha256=bcM0vUlyAPBVVV1KiEv9oWTGLxgEeLjtA9Ic1vNJ0kQ,820
|
|
35
|
+
sage/ext_data/valgrind/valgrind-python.supp,sha256=ZbOFK7o8_1OSbIChO7nknWmTriikUgM05EHHZbX63Zs,8132
|
|
36
|
+
sage/geometry/all.py,sha256=NQPsJnu3WwkcKUEFwyKXBge2bNVZtok9w2PEs3MLk7Y,229
|
|
37
|
+
sage/groups/matrix_gps/pickling_overrides.py,sha256=sMNc5grOwQRBKhav2AJhz1xXLVamrUSWfRyMsr_PK5M,3785
|
|
38
|
+
sage/homology/tests.py,sha256=acwIBFS2EBorSUZxXhJatNoywKznl23ka4ImXyNvBrg,2288
|
|
39
|
+
sage/interacts/algebra.py,sha256=B7fB9VbvwVLltBke12simyvB_AV6vGFiThg_fO8VAnE,686
|
|
40
|
+
sage/interacts/all.py,sha256=qoGaOfIpY0vwd0qxsYdsE-KytQrn0wM1TirJSwxCWJs,913
|
|
41
|
+
sage/interacts/calculus.py,sha256=I1YYNg4JNrNscQDg7Uj2OhHaz8YwFcBYJbXpFWrgd-4,1013
|
|
42
|
+
sage/interacts/fractals.py,sha256=ut5BvBl9ipTCVDdtxFx6qfDR2pwwPX4rwuHKhIlvkyg,677
|
|
43
|
+
sage/interacts/geometry.py,sha256=E5DfdtL6n41ebMn_DkYZx8cjPdNA--lvoaVlq-hFGmM,722
|
|
44
|
+
sage/interacts/library.py,sha256=IpuLIpwoxJaEgfWicBgSOlAsmRz-oTxE9rbY4S5dT-8,78244
|
|
45
|
+
sage/interacts/library_cython.cpython-314-x86_64-linux-musl.so,sha256=bXmL3C_UIRmP7nTvlTPvXwra7tGCk3R9_ibKGmPhxaM,272032
|
|
46
|
+
sage/interacts/statistics.py,sha256=msjkOecE0O26CBnHAXw714UbxHxFAFTFOpRZfIZ7Cow,656
|
|
47
|
+
sage/interfaces/axiom.py,sha256=0UlocV8XStZ0rK_kRtTIxi22mM4oe7aMz2a4L6ZdxJ8,31758
|
|
48
|
+
sage/interfaces/kash.py,sha256=lj10-Ugcs5gooqGsces2Wk-shAOSUTtP7RSqV4jo5GI,23612
|
|
49
|
+
sage/interfaces/lie.py,sha256=wHma3IiM3dkLA2gaAtDDY42x4aqdAI4ZiS1p1na_614,27304
|
|
50
|
+
sage/interfaces/matlab.py,sha256=VsqEOhwack401-7vdOtQ2Cj0ELZuX84Qf5ctlUr9u_w,11856
|
|
51
|
+
sage/interfaces/mupad.py,sha256=RsPAsFh03gM8gw73NIyBQtNY9liS8K7Xs_sVTzICROU,21332
|
|
52
|
+
sage/interfaces/octave.py,sha256=j-FnECnSVLs1Xyd_gN835v-v1TXZe_Moe2SPAGuNTkg,25662
|
|
53
|
+
sage/interfaces/phc.py,sha256=PMbDZqP_QVzs79Se8pHH40hWPDLTJuZCU6f5pbuD2ic,38502
|
|
54
|
+
sage/interfaces/psage.py,sha256=bmZDJrhnl94eDjnxb1K8tqmkuk-Xy-VmZCIk8dmLMCA,6108
|
|
55
|
+
sage/interfaces/qsieve.py,sha256=YdBXrJAsDIAvhXFuzmO1Y-Zq73W6-_HCm4Mzcb5HjJU,169
|
|
56
|
+
sage/interfaces/r.py,sha256=BjJqFfm48CZdHUfKzQ_0bYHpYXK17P1Uii5SSwjE0rA,60773
|
|
57
|
+
sage/interfaces/read_data.py,sha256=WmlEcwHaz-pIMmcnHqFZ-KPEeiD5A1DIweNZNl9HL1U,1342
|
|
58
|
+
sage/interfaces/scilab.py,sha256=B-pvSah83Ah3JA1Z4TJ_kvNuVFiSUl_tWFQcPLf5uak,16422
|
|
59
|
+
sage/interfaces/tests.py,sha256=gy8JR4lCAqWe-ihVH473r8i013eQI9xV998AzDD3qWo,2265
|
|
60
|
+
sage/libs/all.py,sha256=g-0ccz5_fTKzg2BdLg_fTnTg6IO8-uum9ts6-EgwlZs,349
|
|
61
|
+
sage/libs/cremona/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
|
+
sage/libs/mwrank/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
|
+
sage/logic/all.py,sha256=k8iqDAtgNbd6ogkp3N2IRiuvxbEgCEkRr9oXwAJX7HM,76
|
|
64
|
+
sage/logic/booleval.py,sha256=zMIHHza0-gfstN-L94gG9-slSMCi2iX2RcCi5eTk6eg,3930
|
|
65
|
+
sage/logic/boolformula.py,sha256=011F5gtOOV0pLVmq7YxuH5ayPcf7BOPyBaHEKVJ8PwU,46981
|
|
66
|
+
sage/logic/logic.py,sha256=Ym4_s8LJSbmUf03nK5_jhAJ_Co5MxJb0IgIsyBOjlzI,24038
|
|
67
|
+
sage/logic/logicparser.py,sha256=Y3saIYmF9aKJI-Ao4a0Nx0YwxA6wNWS9GKwpzOcrfiU,21269
|
|
68
|
+
sage/logic/logictable.py,sha256=gzCTegP9Bq5fE64u6lCxJ0A2qhm3smKnNOh-etiWQ_U,8567
|
|
69
|
+
sage/logic/propcalc.py,sha256=Ne4k0ptXC0xj6NEvs0LJ6SmH2uKqYPDeey9rE1Gv2YI,8672
|
|
70
|
+
sage/misc/all.py,sha256=oIpAlwSBebAtKQxqIcrdHSu97Ea56FIH7CdrzwUBN7g,1372
|
|
71
|
+
sage/misc/lazy_attribute.pyi,sha256=lEUbITjqow28vc89Nov-k82LDLrYH6D2Q86kiYbBCJ4,425
|
|
72
|
+
sage/rings/all.py,sha256=5-T2Pcx0ufiL0Sm1IHJnEwVz9homNigSwSuKT-93HMI,1476
|
|
73
|
+
sage/rings/commutative_algebra.py,sha256=45gXSWGM1vxUpeWosDrw7_fdgVMoD-Z5EcsIDzZEavM,1503
|
|
74
|
+
sage/rings/numbers_abc.py,sha256=hZPTxMjvMrd3LjSalNe7K5AyAhNojonpuTJrscmuXMY,2282
|
|
75
|
+
sage/rings/finite_rings/all.py,sha256=9IcLDjMyrp21vtTCCRd2ZRbkqBDB6ZnBTb4eojDuWTA,792
|
|
76
|
+
sage/rings/polynomial/all.py,sha256=KYAdtNHlFBmqpCsNDWXXNqolFgSJc8TLWT-u4hfOFuM,804
|
|
77
|
+
sage/rings/polynomial/convolution.py,sha256=nLYMRSQaibws2O5Qgz4p5HO0qhUMZbbXuxPbsqcTQLI,13004
|
|
78
|
+
sage/symbolic/all__sagemath_standard_no_symbolics.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
+
passagemath_standard_no_symbolics-10.6.31rc3.dist-info/METADATA,sha256=Aq-EVrFxomU8xQTDOJLTPU1XX0hrPP2HKoqjUVtrUpc,6917
|
|
80
|
+
passagemath_standard_no_symbolics-10.6.31rc3.dist-info/WHEEL,sha256=K2_TehZnioJBDmm5baDVfhoCxaclJzJsPrng3hg7WD0,112
|
|
81
|
+
passagemath_standard_no_symbolics-10.6.31rc3.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
|
|
82
|
+
passagemath_standard_no_symbolics-10.6.31rc3.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sage
|
sage/all.py
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"""
|
|
2
|
+
all.py -- much of sage is imported into this module, so you don't
|
|
3
|
+
have to import everything individually.
|
|
4
|
+
|
|
5
|
+
TESTS:
|
|
6
|
+
|
|
7
|
+
This is to test :issue:`10570`. If the number of stackframes at startup
|
|
8
|
+
changes due to a patch you made, please check that this was an
|
|
9
|
+
intended effect of your patch.
|
|
10
|
+
|
|
11
|
+
::
|
|
12
|
+
|
|
13
|
+
sage: import gc
|
|
14
|
+
sage: import inspect
|
|
15
|
+
sage: from sage import *
|
|
16
|
+
sage: frames = [x for x in gc.get_objects() if inspect.isframe(x)]
|
|
17
|
+
|
|
18
|
+
We exclude the dependencies and check to see that there are no others
|
|
19
|
+
except for the known bad apples::
|
|
20
|
+
|
|
21
|
+
sage: allowed = [
|
|
22
|
+
....: 'IPython', 'prompt_toolkit', 'jedi', # sage dependencies
|
|
23
|
+
....: 'threading', 'multiprocessing', # doctest dependencies
|
|
24
|
+
....: 'pytz', 'importlib.resources', # doctest dependencies
|
|
25
|
+
....: '__main__', 'sage.doctest', # doctesting
|
|
26
|
+
....: 'signal', 'enum', 'types' # may appear in Python 3
|
|
27
|
+
....: ]
|
|
28
|
+
sage: def is_not_allowed(frame):
|
|
29
|
+
....: module = inspect.getmodule(frame)
|
|
30
|
+
....: if module is None: return False
|
|
31
|
+
....: return not any(module.__name__.startswith(name)
|
|
32
|
+
....: for name in allowed)
|
|
33
|
+
sage: [inspect.getmodule(f).__name__ for f in frames if is_not_allowed(f)]
|
|
34
|
+
[]
|
|
35
|
+
|
|
36
|
+
Check lazy import of ``interacts``::
|
|
37
|
+
|
|
38
|
+
sage: type(interacts)
|
|
39
|
+
<class 'sage.misc.lazy_import.LazyImport'>
|
|
40
|
+
sage: interacts
|
|
41
|
+
<module 'sage.interacts.all' from '...'>
|
|
42
|
+
|
|
43
|
+
Check that :issue:`34506` is resolved::
|
|
44
|
+
|
|
45
|
+
sage: x = int('1'*4301)
|
|
46
|
+
"""
|
|
47
|
+
# ****************************************************************************
|
|
48
|
+
# Copyright (C) 2005-2012 William Stein <wstein@gmail.com>
|
|
49
|
+
#
|
|
50
|
+
# This program is free software: you can redistribute it and/or modify
|
|
51
|
+
# it under the terms of the GNU General Public License as published by
|
|
52
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
53
|
+
# (at your option) any later version.
|
|
54
|
+
# https://www.gnu.org/licenses/
|
|
55
|
+
# ****************************************************************************
|
|
56
|
+
|
|
57
|
+
import sage.misc.lazy_import
|
|
58
|
+
|
|
59
|
+
sage.misc.lazy_import.commence_startup()
|
|
60
|
+
|
|
61
|
+
import os
|
|
62
|
+
import operator
|
|
63
|
+
import math
|
|
64
|
+
import sys
|
|
65
|
+
|
|
66
|
+
# ############### end setup warnings ###############################
|
|
67
|
+
|
|
68
|
+
# includes .all__sagemath_objects, .all__sagemath_environment
|
|
69
|
+
from sage.all__sagemath_repl import *
|
|
70
|
+
from sage.all__sagemath_modules import *
|
|
71
|
+
|
|
72
|
+
from time import sleep
|
|
73
|
+
from functools import reduce # in order to keep reduce in python3
|
|
74
|
+
|
|
75
|
+
# ##################################################################
|
|
76
|
+
|
|
77
|
+
from sage.misc.all import * # takes a while
|
|
78
|
+
|
|
79
|
+
from sage.libs.all import *
|
|
80
|
+
from sage.data_structures.all import *
|
|
81
|
+
|
|
82
|
+
from sage.rings.all import *
|
|
83
|
+
|
|
84
|
+
from sage.algebras.all import *
|
|
85
|
+
|
|
86
|
+
from sage.all__sagemath_schemes import *
|
|
87
|
+
from sage.all__sagemath_combinat import *
|
|
88
|
+
from sage.all__sagemath_graphs import *
|
|
89
|
+
from sage.all__sagemath_groups import *
|
|
90
|
+
from sage.all__sagemath_polyhedra import *
|
|
91
|
+
|
|
92
|
+
from sage.databases.all import *
|
|
93
|
+
from sage.sets.all import *
|
|
94
|
+
from sage.interfaces.all import *
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
from sage.combinat.all import *
|
|
98
|
+
|
|
99
|
+
from sage.geometry.all import *
|
|
100
|
+
from sage.geometry.triangulation.all import *
|
|
101
|
+
|
|
102
|
+
from sage.dynamics.all import *
|
|
103
|
+
|
|
104
|
+
from sage.homology.all import *
|
|
105
|
+
|
|
106
|
+
from sage.quadratic_forms.all import *
|
|
107
|
+
|
|
108
|
+
from sage.logic.all import *
|
|
109
|
+
|
|
110
|
+
from sage.numerical.all import *
|
|
111
|
+
|
|
112
|
+
# Lazily import interacts (#15335)
|
|
113
|
+
lazy_import('sage.interacts', 'all', 'interacts')
|
|
114
|
+
|
|
115
|
+
try:
|
|
116
|
+
from .all__sagemath_plot import *
|
|
117
|
+
except ImportError:
|
|
118
|
+
pass
|
|
119
|
+
|
|
120
|
+
try:
|
|
121
|
+
from .all__sagemath_symbolics import *
|
|
122
|
+
except ImportError:
|
|
123
|
+
pass
|
|
124
|
+
|
|
125
|
+
from sage.combinat.all import Posets # so that sage.combinat.all.Posets wins over sage.categories.all.Posets
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
###########################################################
|
|
129
|
+
# WARNING:
|
|
130
|
+
# DO *not* import numpy / matplotlib / networkx here!!
|
|
131
|
+
# Each takes a surprisingly long time to initialize,
|
|
132
|
+
# and that initialization should be done more on-the-fly
|
|
133
|
+
# when they are first needed.
|
|
134
|
+
###########################################################
|
|
135
|
+
|
|
136
|
+
from sage.misc.copying import license
|
|
137
|
+
copying = license
|
|
138
|
+
copyright = license
|
|
139
|
+
|
|
140
|
+
from sage.misc.persist import register_unpickle_override
|
|
141
|
+
register_unpickle_override('sage.categories.category', 'Sets', Sets)
|
|
142
|
+
register_unpickle_override('sage.categories.category_types', 'HeckeModules',
|
|
143
|
+
HeckeModules)
|
|
144
|
+
register_unpickle_override('sage.categories.category_types', 'Objects',
|
|
145
|
+
Objects)
|
|
146
|
+
register_unpickle_override('sage.categories.category_types', 'Rings',
|
|
147
|
+
Rings)
|
|
148
|
+
register_unpickle_override('sage.categories.category_types', 'Fields',
|
|
149
|
+
Fields)
|
|
150
|
+
register_unpickle_override('sage.categories.category_types', 'VectorSpaces',
|
|
151
|
+
VectorSpaces)
|
|
152
|
+
register_unpickle_override('sage.categories.category_types',
|
|
153
|
+
'Schemes_over_base',
|
|
154
|
+
sage.categories.schemes.Schemes_over_base)
|
|
155
|
+
register_unpickle_override('sage.categories.category_types',
|
|
156
|
+
'ModularAbelianVarieties',
|
|
157
|
+
ModularAbelianVarieties)
|
|
158
|
+
register_unpickle_override('sage.libs.pari.gen_py', 'pari', pari)
|
|
159
|
+
|
|
160
|
+
# Cache the contents of star imports.
|
|
161
|
+
sage.misc.lazy_import.save_cache_file()
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
# ##### Debugging for Singular, see issue #10903
|
|
165
|
+
# from sage.libs.singular.ring import poison_currRing
|
|
166
|
+
# sys.settrace(poison_currRing)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
# Set a new random number seed as the very last thing
|
|
170
|
+
# (so that printing initial_seed() and using that seed
|
|
171
|
+
# in set_random_seed() will result in the same sequence you got at
|
|
172
|
+
# Sage startup).
|
|
173
|
+
set_random_seed()
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
# Relink imported lazy_import objects to point to the appropriate namespace
|
|
177
|
+
|
|
178
|
+
from sage.misc.lazy_import import clean_namespace
|
|
179
|
+
clean_namespace()
|
|
180
|
+
del clean_namespace
|
|
181
|
+
|
|
182
|
+
# From now on it is ok to resolve lazy imports
|
|
183
|
+
sage.misc.lazy_import.finish_startup()
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# Python broke large ints; see trac #34506
|
|
187
|
+
|
|
188
|
+
if hasattr(sys, "set_int_max_str_digits"):
|
|
189
|
+
sys.set_int_max_str_digits(0)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def sage_globals():
|
|
193
|
+
r"""
|
|
194
|
+
Return the Sage namespace.
|
|
195
|
+
|
|
196
|
+
EXAMPLES::
|
|
197
|
+
|
|
198
|
+
sage: 'log' in sage_globals()
|
|
199
|
+
True
|
|
200
|
+
sage: 'MatrixSpace' in sage_globals()
|
|
201
|
+
True
|
|
202
|
+
sage: 'Permutations' in sage_globals()
|
|
203
|
+
True
|
|
204
|
+
sage: 'TheWholeUniverse' in sage_globals()
|
|
205
|
+
False
|
|
206
|
+
"""
|
|
207
|
+
return globals()
|
sage/all_cmdline.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""
|
|
2
|
+
All imports for the Sage (IPython) command line
|
|
3
|
+
|
|
4
|
+
This is all.py (load all sage functions) plus set-up for the Sage commandline.
|
|
5
|
+
"""
|
|
6
|
+
# ****************************************************************************
|
|
7
|
+
# Copyright (C) 2007 William Stein <wstein@gmail.com>
|
|
8
|
+
#
|
|
9
|
+
# This program is free software: you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
|
11
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
12
|
+
# (at your option) any later version.
|
|
13
|
+
# https://www.gnu.org/licenses/
|
|
14
|
+
# ****************************************************************************
|
|
15
|
+
sage_mode = 'cmdline'
|
|
16
|
+
|
|
17
|
+
from sage.all import *
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
from sage.calculus.predefined import x
|
|
21
|
+
except ImportError:
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
from sage.misc.lazy_import import lazy_import
|
|
25
|
+
|
|
26
|
+
for pkg in ['axiom', 'fricas', 'gap', 'gap3', 'giac', 'gp',
|
|
27
|
+
'gnuplot', 'kash', 'magma', 'macaulay2', 'maple',
|
|
28
|
+
'mathematica', 'mathics', 'matlab',
|
|
29
|
+
'mupad', 'mwrank', 'octave', 'qepcad', 'singular',
|
|
30
|
+
'sage0', 'lie', 'r']:
|
|
31
|
+
lazy_import(f'sage.interfaces.{pkg}', f'{pkg}_console')
|
|
32
|
+
del pkg
|
|
33
|
+
|
|
34
|
+
lazy_import('sage.interfaces.maxima_abstract', 'maxima_console')
|
|
35
|
+
|
|
36
|
+
sage.misc.session.init()
|
sage/cli/__init__.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import logging
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
from sage.cli.eval_cmd import EvalCmd
|
|
8
|
+
from sage.cli.interactive_shell_cmd import InteractiveShellCmd
|
|
9
|
+
from sage.cli.notebook_cmd import JupyterNotebookCmd
|
|
10
|
+
from sage.cli.options import CliOptions
|
|
11
|
+
from sage.cli.version_cmd import VersionCmd
|
|
12
|
+
from sage.cli.run_file_cmd import RunFileCmd
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main() -> int:
|
|
16
|
+
input_args = sys.argv[1:]
|
|
17
|
+
parser = argparse.ArgumentParser(
|
|
18
|
+
prog="sage",
|
|
19
|
+
description="If no command is given, starts the interactive interpreter where you can enter statements and expressions, immediately execute them and see their results.",
|
|
20
|
+
)
|
|
21
|
+
parser.add_argument(
|
|
22
|
+
"-v",
|
|
23
|
+
"--verbose",
|
|
24
|
+
action="store_true",
|
|
25
|
+
default=False,
|
|
26
|
+
help="print additional information",
|
|
27
|
+
)
|
|
28
|
+
parser.add_argument(
|
|
29
|
+
"-q",
|
|
30
|
+
"--quiet",
|
|
31
|
+
action="store_true",
|
|
32
|
+
default=False,
|
|
33
|
+
help="do not display the banner",
|
|
34
|
+
)
|
|
35
|
+
parser.add_argument(
|
|
36
|
+
"--simple-prompt",
|
|
37
|
+
action="store_true",
|
|
38
|
+
default=False,
|
|
39
|
+
help="use simple prompt IPython mode",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
VersionCmd.extend_parser(parser)
|
|
43
|
+
JupyterNotebookCmd.extend_parser(parser)
|
|
44
|
+
EvalCmd.extend_parser(parser)
|
|
45
|
+
RunFileCmd.extend_parser(parser)
|
|
46
|
+
|
|
47
|
+
if not input_args:
|
|
48
|
+
return InteractiveShellCmd(CliOptions()).run()
|
|
49
|
+
|
|
50
|
+
args = parser.parse_args(input_args)
|
|
51
|
+
options = CliOptions(**vars(args))
|
|
52
|
+
|
|
53
|
+
logging.basicConfig(level=logging.DEBUG if options.verbose else logging.INFO)
|
|
54
|
+
|
|
55
|
+
if args.file:
|
|
56
|
+
return RunFileCmd(options).run()
|
|
57
|
+
elif args.command:
|
|
58
|
+
return EvalCmd(options).run()
|
|
59
|
+
elif args.notebook:
|
|
60
|
+
return JupyterNotebookCmd(options).run()
|
|
61
|
+
return InteractiveShellCmd(options).run()
|