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

Commit

Permalink
Merge tag '9.3.beta1' into t/30719/add_build_pkgs_spkg_install_requir…
Browse files Browse the repository at this point in the history
…es_txt_for_all_python_packages

SageMath version 9.3.beta1, Release Date: 2020-11-07
  • Loading branch information
mkoeppe committed Nov 11, 2020
2 parents f9ac70e + 2220595 commit f6a2c56
Show file tree
Hide file tree
Showing 650 changed files with 13,901 additions and 7,001 deletions.
4 changes: 2 additions & 2 deletions .ci/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ docker_build() {
# Docker's --cache-from does not really work with multi-stage builds: https://github.com/moby/moby/issues/34715
# So we just have to rely on the local cache.
time docker build -f docker/Dockerfile \
--build-arg "--build-arg "MAKEFLAGS=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS=${SAGE_NUM_THREADS}" --build-arg "MAKEFLAGS_DOCBUILD=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS_DOCBUILD=${SAGE_NUM_THREADS_DOCBUILD}" --build-arg ARTIFACT_BASE=$ARTIFACT_BASE $@
--build-arg "MAKEFLAGS=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS=${SAGE_NUM_THREADS}" --build-arg "MAKEFLAGS_DOCBUILD=${MAKEFLAGS}" --build-arg "SAGE_NUM_THREADS_DOCBUILD=${SAGE_NUM_THREADS_DOCBUILD}" --build-arg ARTIFACT_BASE=$ARTIFACT_BASE $@
}

# We use a multi-stage build /docker/Dockerfile. For the caching to be
Expand All @@ -53,7 +53,7 @@ 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.
# Note: It's important to build the dev image last because it might be tagged as ARTIFACT_BASE.
# Note: It is important to build the dev image last because it might be tagged as ARTIFACT_BASE.
docker_build --target sagemath-dev --tag "$DOCKER_IMAGE_DEV" .
# Display the layers of this image
docker history "$DOCKER_IMAGE_DEV"
6 changes: 0 additions & 6 deletions .ci/update-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ if [ -n "$CI_MONKEY_PATCH" ]; then
$SCRIPT
fi

WITH_PYTHON=${WITH_PYTHON:-2}

# From the docker documentation: "A tag name must be valid ASCII and may
# contain lowercase and uppercase letters, digits, underscores, periods and
# dashes. A tag name may not start with a period or a dash and may contain a
Expand All @@ -38,10 +36,6 @@ export DOCKER_TAG=`echo $DOCKER_TAG | tr -d '[:space:]' | tr -c '[:alnum:]_.-' '
[[ -z "$DOCKER_TAG" ]] && export DOCKER_TAG=none
[[ "$DOCKER_TAG" = "master" ]] && export DOCKER_TAG=latest

if [ $WITH_PYTHON = 3 ]; then
export DOCKER_TAG=${DOCKER_TAG}-py3
fi

export DOCKER_IMAGE_CLI=${DOCKER_NAMESPACE:-sagemath}/sagemath:$DOCKER_TAG
export DOCKER_IMAGE_DEV=${DOCKER_NAMESPACE:-sagemath}/sagemath-dev:$DOCKER_TAG

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ jobs:
if: contains(matrix.tox_system_factor, 'nobootstrap')
- name: Move homebrew away
run: |
(cd /usr/local && for a in bin etc include lib opt sbin share; do mv $a $a-moved; done)
(cd /usr/local && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done)
- name: Select Xcode version
run: |
if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi
- name: Install test prerequisites
run: |
/usr/bin/python3 -m pip install --user tox
sudo /usr/bin/python3 -m pip install tox
- name: Install python3 from python.org
# As of 2020-03-30 (https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md),
# Python 3.7.7 is installed on GitHub Actions runners. But we install our own copy from the python.org binary package.
Expand Down
83 changes: 58 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
/logs
/upstream

#############################
# Autotools generated files #
#############################
# Autotools generated files
/aclocal.m4
/autom4te.cache/
/config/
Expand All @@ -20,10 +18,6 @@
# no longer generated, but may still be in user worktrees
/src/lib/pkgconfig

###################
# Temporary Files #
###################

# Various editors
*~

Expand All @@ -43,7 +37,7 @@
.iml

# VSCode
.vscode
.vscode/*

# XCode
xcuserdata/
Expand Down Expand Up @@ -77,40 +71,79 @@ $RECYCLE.BIN/
# SublimeText
*.sublime-workspace

#################
# SageMathCloud #
#################
# SageMathCloud
*.sage-chat
*.sage-history
*.syncdoc*

###########
# Jupyter #
###########
# Jupyter
.ipynb_checkpoints
Untitled*.ipynb

#############################
# GitLab CI generated files #
#############################
# GitLab CI generated files
gitlab-build-docker.log

/src/.cython_version
/src/build
/src/Makefile
/src/bin/sage-env-config
/build/bin/sage-build-env-config
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Generated Cython files
*.so
src/sage/**/*.c
src/sage/**/*.cpp
src/sage/modular/arithgroup/farey_symbol.h
!src/sage/cpython/debugimpl.c
!src/sage/graphs/base/boost_interface.cpp
!src/sage/graphs/cliquer/cl.c
!src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp
!src/sage/libs/eclib/wrap.cpp
!src/sage/misc/inherit_comparison_impl.c
!src/sage/modular/arithgroup/farey.cpp
!src/sage/modular/arithgroup/sl2z.cpp
!src/sage/rings/bernmm/bern_modp.cpp
!src/sage/rings/bernmm/bern_modp_util.cpp
!src/sage/rings/bernmm/bern_rat.cpp
!src/sage/rings/bernmm/bernmm-test.cpp
!src/sage/rings/padics/transcendantal.c
!src/sage/rings/polynomial/weil/power_sums.c
!src/sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp
!src/sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp
!src/sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_zn_poly.cpp
!src/sage/stats/distributions/dgs_bern.c
!src/sage/stats/distributions/dgs_gauss_dp.c
!src/sage/stats/distributions/dgs_gauss_mp.c

# Temporary build files
build/temp.*/
build/bin/sage-build-env-config

/build/pkgs/*/src/build
/build/pkgs/*/src/dist
/build/pkgs/*/src/MANIFEST
/build/pkgs/*/src/*.egg-info
/build/pkgs/*/src/.tox

#######################
# tox generated files #
#######################
# Distribution / packaging
src/*.egg-info/
/src/.cython_version
/src/build
/src/Makefile
/src/bin/sage-env-config

# Virtual environments
src/.env
src/.venv
src/env/
src/venv/
src/ENV/
src/env.bak/
src/venv.bak/

# mypy
**/.mypy_cache/

# tox generated files
/.tox
/prefix
worktree*
2 changes: 1 addition & 1 deletion .homebrew-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# that activate keg-only homebrew package installations

HOMEBREW=`brew --prefix` || return 1
for l in gettext bzip2; do
for l in gettext bzip2 texinfo; do
if [ -d "$HOMEBREW/opt/$l/bin" ]; then
PATH="$HOMEBREW/opt/$l/bin:$PATH"
fi
Expand Down
27 changes: 27 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 9.3.beta1",
"version": "9.3.beta1",
"upload_type": "software",
"publication_date": "2020-11-07",
"creators": [
{
"affiliation": "SageMath.org",
"name": "The SageMath Developers"
}
],
"access_right": "open",
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/9.3.beta1",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.593563",
"relation": "isVersionOf"
}
]
}
27 changes: 27 additions & 0 deletions .zenodo.json.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: ${SAGE_VERSION}",
"version": "${SAGE_VERSION}",
"upload_type": "software",
"publication_date": "${SAGE_RELEASE_DATE}",
"creators": [
{
"affiliation": "SageMath.org",
"name": "The SageMath Developers"
}
],
"access_right": "open",
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/${SAGE_VERSION}",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.593563",
"relation": "isVersionOf"
}
]
}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ Guide](https://doc.sagemath.org/html/en/installation).

- [Git] Alternatively, clone the Sage git repository:

$ git clone -c core.symlinks=true --branch master git://trac.sagemath.org/sage.git
$ git clone -c core.symlinks=true --branch master https://github.com/sagemath/sage.git

This will create the subdirectory `sage`.
This will create the subdirectory `sage`. `cd sage/` and pick the branch you need
by doing `git checkout` - typically you want the latest development branch, thus do
`git checkout develop`.

- [Windows] The Sage source tree contains symbolic links, and the
build will not work if Windows line endings rather than UNIX
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.beta14, Release Date: 2020-09-30
SageMath version 9.3.beta1, Release Date: 2020-11-07
7 changes: 0 additions & 7 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,6 @@ MAKE_SILENT=""
$MAKE ${MAKE_SILENT} bootstrap-clean 2>/dev/null
mkdir config 2>/dev/null

# If Sage has not been built yet, this will fail due to a missing
# sage-env-config.
if [ -f src/bin/sage-env-config ]; then
. src/bin/sage-env-config
. src/bin/sage-env
fi

if [ $ALWAYSDOWNLOAD = yes ]; then
if [ -n "$CONFTARBALL_URL" ]; then
URL="$CONFTARBALL_URL"/configure-$CONFVERSION.tar.gz
Expand Down
1 change: 1 addition & 0 deletions build/bin/sage-clone-source
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ git clone "$SRC" "$DST"

cd "$DST"
git remote set-url origin "$SAGE_REPO_ANONYMOUS"
git remote set-url --push origin "$SAGE_REPO_AUTHENTICATED"

# Save space
git gc --aggressive --prune=now
Expand Down
15 changes: 12 additions & 3 deletions build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
SYSTEM=$1
if [ -z "$SYSTEM" ]; then
echo >&2 "usage: $0 {debian|arch|conda|...} SPKGS..."
echo >&2 "usage: $0 {debian|arch|conda|pip|...} SPKGS..."
exit 1
fi
shift
Expand All @@ -10,9 +10,18 @@ SPKGS="$*"
if [ -z "$SAGE_ROOT" ]; then
SAGE_ROOT=`pwd`
fi
STRIP_COMMENTS="sed s/#.*//;"
case "$SYSTEM" in
pip)
SYSTEM_PACKAGES_FILE_NAME="requirements.txt"
STRIP_COMMENTS='sed s/#.*//;s/[[:space:]]//g;'
;;
*)
SYSTEM_PACKAGES_FILE_NAME="distros/$SYSTEM.txt"
STRIP_COMMENTS="sed s/#.*//;"
;;
esac
for PKG_BASE in $SPKGS; do
SYSTEM_PACKAGES_FILE=$SAGE_ROOT/build/pkgs/$PKG_BASE/distros/$SYSTEM.txt
SYSTEM_PACKAGES_FILE="$SAGE_ROOT"/build/pkgs/$PKG_BASE/$SYSTEM_PACKAGES_FILE_NAME
if [ -f $SYSTEM_PACKAGES_FILE ]; then
echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE)
fi
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-guess-package-system
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# First test for user-installable package systems, then system package systems
if conda --version > /dev/null 2>&1; then
if [ -z "$CONDA_DEFAULT_ENV" ]; then
echo >&2 -n "(ignoring conda because no environment is active) "
printf >&2 "(ignoring conda because no environment is active) "
else
echo conda
exit
Expand Down
8 changes: 7 additions & 1 deletion build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ do
# Whether to print sudo for package managers that need sudo for non-root users
SUDO="sudo "
;;
--prompt=*)
PROMPT=${1#--prompt=}
;;
--prompt)
PROMPT=' $ '
;;
-*)
echo >&2 "$0: unknown option $2"
echo >&2 "$0: unknown option $1"
exit 1
;;
*)
Expand Down Expand Up @@ -86,6 +89,9 @@ case $system:$command in
freebsd*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pkg install $system_packages"
;;
pip:install)
[ -n "$system_packages" ] && echo "${PROMPT}sage -pip install $system_packages"
;;
*:update)
# Nothing needed
;;
Expand Down
6 changes: 5 additions & 1 deletion build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ if [ -z "$SAGE_BUILD_DIR" ]; then
export SAGE_BUILD_DIR="$SAGE_LOCAL/var/tmp/sage/build"
fi

export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
export SAGE_SPKG_WHEELS="$SAGE_LOCAL/var/lib/sage/wheels"

# Remove '.' from PYTHONPATH, to avoid trouble with setuptools / easy_install
# (cf. #10192, #10176):
Expand Down Expand Up @@ -486,6 +489,7 @@ export SAGE_ROOT="$SAGE_ROOT"
export SAGE_SRC="$SAGE_SRC"
export SAGE_PKG_DIR="$script_dir"
export SAGE_SPKG_SCRIPTS="$SAGE_SPKG_SCRIPTS"
export SAGE_SPKG_WHEELS="$SAGE_SPKG_WHEELS"
export PKG_NAME="$PKG_NAME"
export PKG_BASE="$PKG_BASE"
Expand Down Expand Up @@ -522,7 +526,7 @@ __EOF__
}


WRAPPED_SCRIPTS="build install check preinst postinst legacy-uninstall prerm postrm"
WRAPPED_SCRIPTS="build install check preinst postinst prerm postrm"
INSTALLED_SCRIPTS="prerm postrm"


Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for system_package_file in "$PKG_DISTROS"/*.txt; do
echo "$system:"
;;
esac
echo -n " "
printf " "
sage-print-system-package-command $system --prompt --sudo install $system_packages
fi
done
Expand Down
4 changes: 2 additions & 2 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ for PKG_SCRIPTS in build/pkgs/*; do
if [ -d $PKG_SCRIPTS ]; then
PKG_BASE=$(basename $PKG_SCRIPTS)
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
if [ -f $SYSTEM_PACKAGES_FILE -a -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
if [ -f $PKG_SCRIPTS/type -a -f $SYSTEM_PACKAGES_FILE -a -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE))
if [ -n "PKG_SYSTEM_PACKAGES" ]; then
case "$PKG_TYPE" in
Expand Down
Loading

0 comments on commit f6a2c56

Please sign in to comment.