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

Commit

Permalink
Merge branch 't/29111/specify_a_subset_of_sage_command_line_options_t…
Browse files Browse the repository at this point in the history
…hat_are_supported_by_sagelib___rather_than_sage_the_distribution' into t/21559/change-src-bin-installation
  • Loading branch information
Matthias Koeppe committed Jun 23, 2020
2 parents 8d10bb9 + 3a0193c commit 6b04075
Show file tree
Hide file tree
Showing 668 changed files with 17,715 additions and 12,253 deletions.
3 changes: 3 additions & 0 deletions .ci/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ rsync html_/ html/ -a --copy-links

# Build the release image without build artifacts.
docker_build --target sagemath --tag "$DOCKER_IMAGE_CLI" .
# Tag the sagemath:$DOCKER_TAG image that CI has just built as
# sagemath:$COMMIT_HASH so we can refer to it uniquely later.
docker tag "$DOCKER_IMAGE_CLI" "$DOCKER_IMAGE_BINDER"
# Display the layers of this image
docker history "$DOCKER_IMAGE_CLI"
# Build the developer image with the build artifacts intact.
Expand Down
2 changes: 2 additions & 0 deletions .ci/update-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ fi
export DOCKER_IMAGE_CLI=${DOCKER_NAMESPACE:-sagemath}/sagemath:$DOCKER_TAG
export DOCKER_IMAGE_DEV=${DOCKER_NAMESPACE:-sagemath}/sagemath-dev:$DOCKER_TAG

export DOCKER_IMAGE_BINDER="${DOCKER_NAMESPACE:-sagemath}/sagemath:${CI_COMMIT_SHA}"

# Seed the build cache with this image (set to source-clean to build from
# scratch.)
export ARTIFACT_BASE=${ARTIFACT_BASE:-$DEFAULT_ARTIFACT_BASE}
950 changes: 0 additions & 950 deletions .github/workflows/ci-cygwin-standard-python2.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/tox-gcc_spkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fail-fast: false
matrix:
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, centos-7, centos-8, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [minimal-gcc_spkg, standard-gcc_spkg, standard-python2-gcc_spkg]
tox_packages_factor: [minimal-gcc_spkg, standard-gcc_spkg]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
fail-fast: false
matrix:
tox_system_factor: [conda-forge-ubuntu]
tox_packages_factor: [minimal-gcc_spkg, standard-gcc_spkg, standard-python2-gcc_spkg]
tox_packages_factor: [minimal-gcc_spkg, standard-gcc_spkg]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tox-optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
fail-fast: false
max-parallel: 3
matrix:
tox_system_factor: [homebrew-macos-python2, homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, conda-forge-macos]
tox_packages_factor: [maximal]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
max-parallel: 20
matrix:
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, centos-7, centos-8, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [minimal, standard, standard-python2]
tox_packages_factor: [minimal, standard]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
tox_system_factor: [homebrew-macos-python2, homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, homebrew-macos-python3_xcode-gcc_spkg, conda-forge-macos]
tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, homebrew-macos-python3_pythonorg, homebrew-macos-python3_xcode-gcc_spkg, conda-forge-macos]
tox_packages_factor: [minimal, standard]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
max-parallel: 1
matrix:
tox_system_factor: [conda-forge-ubuntu]
tox_packages_factor: [minimal, standard, standard-python2]
tox_packages_factor: [minimal, standard]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down
5 changes: 3 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# If you want to provide your own runners, make sure to tag them as follows:
# * "big" (60GB of disk space are available) to make build-from-clean pass.

image: docker:latest
image: docker:stable

stages:
- build
Expand Down Expand Up @@ -77,7 +77,7 @@ before_script:
# better isolation. If you expect many builds to run simultaneously on a host,
# conflicting tags can cause issues with a mounted DOCKER_HOST.
services:
- docker:18.05.0-ce-dind
- docker:stable-dind

# Build Sage and its documentation.
# The build starts from the build artifacts of DEFAULT_ARTIFACT_BASE which is
Expand All @@ -100,6 +100,7 @@ build-from-latest:
- .ci/build-docker.sh | tee gitlab-build-docker.log | .ci/head-tail.sh 1048576
- .ci/push-gitlab.sh sagemath-dev
- .ci/push-gitlab.sh sagemath
- DOCKER_TAG=$CI_COMMIT_SHA .ci/push-gitlab.sh sagemath
except:
- master
- develop
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ distclean: build-clean
bootstrap-clean:
rm -rf config configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt
rm -rf src/doc/en/reference/spkg/*.rst
rm -f src/doc/en/reference/repl/*.txt

# Remove absolutely everything which isn't part of the git repo
maintainer-clean: distclean bootstrap-clean
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.2.beta0, Release Date: 2020-05-28
SageMath version 9.2.beta1, Release Date: 2020-06-13
2 changes: 1 addition & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ save () {
# Create configure tarball
echo "Creating $NEWCONFBALL..."
mkdir -p upstream
tar zcf "$NEWCONFBALL" configure config/* build/make/Makefile-auto.in src/doc/en/installation/*.txt
tar zcf "$NEWCONFBALL" configure config/* build/make/Makefile-auto.in src/doc/en/installation/*.txt src/doc/en/reference/spkg/*.rst src/doc/en/reference/repl/*.txt

# Update version
echo "$NEWCONFVERSION" >$PKG/package-version.txt
Expand Down
170 changes: 170 additions & 0 deletions build/bin/sage-site
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
Loading

0 comments on commit 6b04075

Please sign in to comment.