|
4 | 4 |
|
5 | 5 | import os |
6 | 6 |
|
| 7 | +from sage.misc.superseded import deprecation |
| 8 | + |
7 | 9 | def install_scripts(directory=None, ignore_existing=False): |
8 | 10 | r""" |
| 11 | + This function has been deprecated. |
| 12 | +
|
9 | 13 | Running ``install_scripts(directory)`` creates scripts in the |
10 | 14 | given directory that run various software components included with |
11 | 15 | Sage. Each of these scripts essentially just runs ``sage --CMD`` |
12 | 16 | where ``CMD`` is also the name of the script: |
13 | 17 |
|
14 | 18 | - 'gap' runs GAP |
15 | 19 | - 'gp' runs the PARI/GP interpreter |
16 | | - - 'hg' runs Mercurial |
17 | 20 | - 'ipython' runs IPython |
18 | 21 | - 'maxima' runs Maxima |
19 | 22 | - 'mwrank' runs mwrank |
20 | 23 | - 'R' runs R |
21 | 24 | - 'singular' runs Singular |
22 | 25 | - 'sqlite3' runs SQLite version 3 |
23 | | - - 'kash' runs Kash if it is installed |
24 | | - - 'M2' runs Macaulay2 if it is installed |
25 | 26 |
|
26 | 27 | This command: |
27 | 28 |
|
@@ -69,9 +70,15 @@ def install_scripts(directory=None, ignore_existing=False): |
69 | 70 | EXAMPLES:: |
70 | 71 |
|
71 | 72 | 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. |
72 | 76 | Checking that Sage has the command 'gap' installed |
73 | 77 | ... |
74 | 78 | """ |
| 79 | + deprecation(30207, 'the function install_scripts has been deprecated and ' |
| 80 | + 'will be removed in a future version of Sage') |
| 81 | + |
75 | 82 | if directory is None: |
76 | 83 | # We do this since the intended user of install_scripts |
77 | 84 | # will likely be pretty clueless about how to use Sage or |
@@ -110,8 +117,8 @@ def install_scripts(directory=None, ignore_existing=False): |
110 | 117 | dir_in_path = any(os.path.samefile(directory, d) for d in PATH) |
111 | 118 | PATH = os.pathsep.join(d for d in PATH |
112 | 119 | 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']: |
115 | 122 | print(f"Checking that Sage has the command '{cmd}' installed") |
116 | 123 | # Check to see if Sage includes cmd. |
117 | 124 | cmd_inside_sage = have_program(cmd, path=SAGE_BIN) |
|
0 commit comments