This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'u/mkoeppe/change-src-bin-installation' of git://trac.sa…
…gemath.org/sage into t/29950/build_sagelib_using_installed_sage_setup
- Loading branch information
Showing
21 changed files
with
657 additions
and
1,058 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
#!/usr/bin/env bash | ||
# Handle options of the src/bin/sage script that pertain to SAGE_ROOT or sage-the-distribution. | ||
|
||
usage() { | ||
echo | ||
#### 1.......................26..................................................78 | ||
#### |.....................--.|...................................................| | ||
echo "Sage-the-distribution options:" | ||
echo " --optional -- list all optional packages that can be installed" | ||
echo " --experimental -- list all experimental packages that can be installed" | ||
echo " --info [packages] -- print the SPKG.txt or SPKG.rst of the given packages," | ||
echo " and some additional information." | ||
echo " -i [packages] -- install the given Sage packages" | ||
echo " --upgrade [version] -- download, build and install the given version. Here," | ||
echo " 'version' is a git branch or tag name. Useful values" | ||
echo " are 'master' (the current development version, this" | ||
echo " is the default) or a version number like '5.13'." | ||
} | ||
|
||
usage_advanced() { | ||
echo | ||
#### 1.......................26..................................................78 | ||
#### |.....................--.|...................................................| | ||
echo "Building the Sage library:" | ||
echo | ||
echo " -b -- build Sage library -- do this if you have" | ||
echo " modified any source code files in SAGE_ROOT/src/sage/" | ||
echo " -ba -- same as -b, but rebuild *all* Cython" | ||
echo " code. This could take a while, so you will be asked" | ||
echo " if you want to proceed." | ||
echo " --ba-force -- same as -ba, but don't query before rebuilding" | ||
echo " -br -- build and run Sage" | ||
echo | ||
echo " -bt [...] -- build Sage and test; same options as -t" | ||
echo " -btp <N> [...] -- build Sage and test in parallel; same options as -tp" | ||
echo " -btnew [...] -- build Sage and test modified files, as in -t --new" | ||
echo | ||
echo " -bn [...], --build-and-notebook [...]" | ||
echo " -- build the Sage library (as by running \"sage -b\")" | ||
echo " and then start the notebook" | ||
echo | ||
echo "Package handling:" | ||
echo | ||
echo " --package [args] -- call the package manager with given arguments." | ||
echo " Run without arguments for help." | ||
echo " --experimental -- list all experimental packages that can be installed" | ||
echo " -i [opts] [pkgs] -- install the given Sage packages. Options:" | ||
echo " -c -- run the packages' test suites," | ||
echo " overriding the settings of" | ||
echo " SAGE_CHECK and SAGE_CHECK_PACKAGES" | ||
echo " -d -- only download, do not install packages" | ||
echo " -f -- force build: install the packages even" | ||
echo " if they are already installed" | ||
echo " -s -- do not delete the temporary build directories" | ||
echo " after a successful build" | ||
echo " -y -- reply yes to prompts about experimental" | ||
echo " and old-style packages; warning: there" | ||
echo " is no guarantee that these packages will" | ||
echo " build correctly; use at your own risk" | ||
echo " -n -- reply no to prompts about experimental" | ||
echo " and old-style packages" | ||
echo " -f [opts] [pkgs] -- shortcut for -i -f: force build of the given Sage" | ||
echo " packages" | ||
echo " -p [opts] [packages]-- install the given Sage packages, without dependency" | ||
echo " checking. Options are the same as for the -i command." | ||
echo " --location -- if needed, fix paths to make Sage relocatable" | ||
echo " --optional -- list all optional packages that can be installed" | ||
echo " --standard -- list all standard packages that can be installed" | ||
echo " --installed -- list all installed packages" | ||
echo | ||
echo "Upgrading:" | ||
echo | ||
echo " --upgrade [version] -- download, build and install the given version. Here," | ||
echo " 'version' is a git branch or tag name. Useful values" | ||
echo " are 'master' (the current development version, this" | ||
echo " is the default) or a version number like '5.13'." | ||
|
||
echo | ||
#### 1.......................26..................................................78 | ||
#### |.....................--.|...................................................| | ||
echo "Making Sage distributions:" | ||
echo | ||
echo " --sdist -- build a source distribution of Sage" | ||
echo | ||
echo "Building the documentation:" | ||
echo | ||
echo " --docbuild [lang/]<document> <html|pdf|...> -- Build the Sage documentation" | ||
echo | ||
echo "Other developer tools:" | ||
echo | ||
echo " --root -- print the Sage root directory" | ||
echo " --git-branch -- print the current git branch" | ||
echo " --buildsh [...] -- run a shell with Sage environment variables" | ||
echo " as they are set while building Sage and its packages" | ||
echo | ||
#### 1.......................26..................................................78 | ||
#### |.....................--.|...................................................| | ||
} | ||
|
||
if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then | ||
usage | ||
exit 0 | ||
fi | ||
if [ "$1" = "-advanced" -o "$1" = "--advanced" ]; then | ||
usage_advanced | ||
exit 0 | ||
fi | ||
|
||
##################################################################### | ||
# Package handling | ||
##################################################################### | ||
|
||
if [ "$1" = '-package' -o "$1" = "--package" ]; then | ||
shift | ||
exec sage-package $@ | ||
fi | ||
|
||
if [ "$1" = '-optional' -o "$1" = "--optional" ]; then | ||
shift | ||
exec sage-list-packages optional $@ | ||
fi | ||
|
||
if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then | ||
shift | ||
exec sage-list-packages experimental $@ | ||
fi | ||
|
||
if [ "$1" = '-standard' -o "$1" = "--standard" ]; then | ||
shift | ||
exec sage-list-packages standard $@ | ||
fi | ||
|
||
if [ "$1" = '-installed' -o "$1" = "--installed" ]; then | ||
shift | ||
exec sage-list-packages all --installed-only $@ | ||
fi | ||
|
||
if [ "$1" = '-p' ]; then | ||
echo "Error: Installing old-style SPKGs is no longer supported." | ||
exit 1 | ||
fi | ||
|
||
if [ "$1" = '-info' -o "$1" = '--info' ]; then | ||
shift | ||
for PKG in "$@" | ||
do | ||
sage-spkg --info "$PKG" || exit $? | ||
done | ||
exit 0 | ||
fi | ||
|
||
##################################################################### | ||
# Building the documentation. | ||
##################################################################### | ||
|
||
if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then | ||
# Redirect stdin from /dev/null. This helps with running TeX which | ||
# tends to ask interactive questions if something goes wrong. These | ||
# cause the build to hang. If stdin is /dev/null, TeX just aborts. | ||
shift | ||
exec sage-python -m sage_setup.docbuild "$@" </dev/null | ||
fi | ||
|
||
if [ "$1" = '-git-branch' -o "$1" = '--git-branch' ]; then | ||
shift | ||
exec git --git-dir="$SAGE_ROOT"/.git rev-parse --abbrev-ref HEAD | ||
fi | ||
|
||
echo "Error: unknown option: $1" | ||
exit 1 |
Oops, something went wrong.