Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit c77ecb0

Browse files
committed
trac 30207: deprecate install_scripts (from sage.misc.dist)
1 parent 67c34fe commit c77ecb0

File tree

3 files changed

+12
-23
lines changed

3 files changed

+12
-23
lines changed

build/make/install

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,3 @@ fi
137137

138138
# Build succeeded.
139139
echo "Sage build/upgrade complete!"
140-
141-
if [ "$1" = "all" ]; then
142-
echo
143-
echo "To install small scripts to directly run Sage's versions of GAP,"
144-
echo "the PARI/GP interpreter, Maxima, or Singular etc. (by typing e.g."
145-
echo "just 'gap' or 'gp') into a standard 'bin' directory, start Sage"
146-
echo "by typing 'sage' (or './sage') and enter something like"
147-
echo
148-
echo " install_scripts('/usr/local/bin')"
149-
echo
150-
echo "at the Sage command prompt ('sage:')."
151-
echo
152-
fi

src/doc/en/installation/source.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,11 +735,6 @@ General procedure
735735
Then type ``sage -i <package-name>`` to automatically download and install
736736
a given package.
737737

738-
#. Optional:
739-
Run the ``install_scripts`` command from within Sage to create GAP, GP,
740-
Maxima, Singular, etc., scripts in your :envvar:`PATH`.
741-
Type ``install_scripts?`` in Sage for details.
742-
743738
#. Have fun! Discover some amazing conjectures!
744739

745740
Rebasing issues on Cygwin

src/sage/misc/dist.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,25 @@
44

55
import os
66

7+
from sage.misc.superseded import deprecation
8+
79
def install_scripts(directory=None, ignore_existing=False):
810
r"""
11+
This function has been deprecated.
12+
913
Running ``install_scripts(directory)`` creates scripts in the
1014
given directory that run various software components included with
1115
Sage. Each of these scripts essentially just runs ``sage --CMD``
1216
where ``CMD`` is also the name of the script:
1317
1418
- 'gap' runs GAP
1519
- 'gp' runs the PARI/GP interpreter
16-
- 'hg' runs Mercurial
1720
- 'ipython' runs IPython
1821
- 'maxima' runs Maxima
1922
- 'mwrank' runs mwrank
2023
- 'R' runs R
2124
- 'singular' runs Singular
2225
- 'sqlite3' runs SQLite version 3
23-
- 'kash' runs Kash if it is installed
24-
- 'M2' runs Macaulay2 if it is installed
2526
2627
This command:
2728
@@ -69,9 +70,15 @@ def install_scripts(directory=None, ignore_existing=False):
6970
EXAMPLES::
7071
7172
sage: install_scripts(str(SAGE_TMP), ignore_existing=True)
73+
doctest:warning...
74+
the function install_scripts has been deprecated and will be removed in a future version of Sage
75+
See https://trac.sagemath.org/30207 for details.
7276
Checking that Sage has the command 'gap' installed
7377
...
7478
"""
79+
deprecation(30207, 'the function install_scripts has been deprecated and '
80+
'will be removed in a future version of Sage')
81+
7582
if directory is None:
7683
# We do this since the intended user of install_scripts
7784
# will likely be pretty clueless about how to use Sage or
@@ -110,8 +117,8 @@ def install_scripts(directory=None, ignore_existing=False):
110117
dir_in_path = any(os.path.samefile(directory, d) for d in PATH)
111118
PATH = os.pathsep.join(d for d in PATH
112119
if not os.path.samefile(d, SAGE_BIN))
113-
for cmd in ['gap', 'gp', 'hg', 'ipython', 'maxima',
114-
'mwrank', 'R', 'singular', 'sqlite3', 'M2', 'kash']:
120+
for cmd in ['gap', 'gp', 'ipython', 'maxima',
121+
'mwrank', 'R', 'singular', 'sqlite3']:
115122
print(f"Checking that Sage has the command '{cmd}' installed")
116123
# Check to see if Sage includes cmd.
117124
cmd_inside_sage = have_program(cmd, path=SAGE_BIN)

0 commit comments

Comments
 (0)