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

Commit f6a2c56

Browse files
author
Matthias Koeppe
committed
Merge tag '9.3.beta1' into t/30719/add_build_pkgs_spkg_install_requires_txt_for_all_python_packages
SageMath version 9.3.beta1, Release Date: 2020-11-07
2 parents f9ac70e + 2220595 commit f6a2c56

File tree

650 files changed

+13901
-7001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

650 files changed

+13901
-7001
lines changed

.ci/build-docker.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ docker_build() {
2626
# Docker's --cache-from does not really work with multi-stage builds: https://github.com/moby/moby/issues/34715
2727
# So we just have to rely on the local cache.
2828
time docker build -f docker/Dockerfile \
29-
--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 $@
29+
--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 $@
3030
}
3131

3232
# We use a multi-stage build /docker/Dockerfile. For the caching to be
@@ -53,7 +53,7 @@ docker tag "$DOCKER_IMAGE_CLI" "$DOCKER_IMAGE_BINDER"
5353
# Display the layers of this image
5454
docker history "$DOCKER_IMAGE_CLI"
5555
# Build the developer image with the build artifacts intact.
56-
# Note: It's important to build the dev image last because it might be tagged as ARTIFACT_BASE.
56+
# Note: It is important to build the dev image last because it might be tagged as ARTIFACT_BASE.
5757
docker_build --target sagemath-dev --tag "$DOCKER_IMAGE_DEV" .
5858
# Display the layers of this image
5959
docker history "$DOCKER_IMAGE_DEV"

.ci/update-env.sh

-6
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ if [ -n "$CI_MONKEY_PATCH" ]; then
2727
$SCRIPT
2828
fi
2929

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

41-
if [ $WITH_PYTHON = 3 ]; then
42-
export DOCKER_TAG=${DOCKER_TAG}-py3
43-
fi
44-
4539
export DOCKER_IMAGE_CLI=${DOCKER_NAMESPACE:-sagemath}/sagemath:$DOCKER_TAG
4640
export DOCKER_IMAGE_DEV=${DOCKER_NAMESPACE:-sagemath}/sagemath-dev:$DOCKER_TAG
4741

.github/workflows/tox.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ jobs:
239239
if: contains(matrix.tox_system_factor, 'nobootstrap')
240240
- name: Move homebrew away
241241
run: |
242-
(cd /usr/local && for a in bin etc include lib opt sbin share; do mv $a $a-moved; done)
242+
(cd /usr/local && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done)
243243
- name: Select Xcode version
244244
run: |
245245
if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi
246246
- name: Install test prerequisites
247247
run: |
248-
/usr/bin/python3 -m pip install --user tox
248+
sudo /usr/bin/python3 -m pip install tox
249249
- name: Install python3 from python.org
250250
# As of 2020-03-30 (https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md),
251251
# Python 3.7.7 is installed on GitHub Actions runners. But we install our own copy from the python.org binary package.

.gitignore

+58-25
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
/logs
55
/upstream
66

7-
#############################
8-
# Autotools generated files #
9-
#############################
7+
# Autotools generated files
108
/aclocal.m4
119
/autom4te.cache/
1210
/config/
@@ -20,10 +18,6 @@
2018
# no longer generated, but may still be in user worktrees
2119
/src/lib/pkgconfig
2220

23-
###################
24-
# Temporary Files #
25-
###################
26-
2721
# Various editors
2822
*~
2923

@@ -43,7 +37,7 @@
4337
.iml
4438

4539
# VSCode
46-
.vscode
40+
.vscode/*
4741

4842
# XCode
4943
xcuserdata/
@@ -77,40 +71,79 @@ $RECYCLE.BIN/
7771
# SublimeText
7872
*.sublime-workspace
7973

80-
#################
81-
# SageMathCloud #
82-
#################
74+
# SageMathCloud
8375
*.sage-chat
8476
*.sage-history
8577
*.syncdoc*
8678

87-
###########
88-
# Jupyter #
89-
###########
79+
# Jupyter
9080
.ipynb_checkpoints
9181
Untitled*.ipynb
9282

93-
#############################
94-
# GitLab CI generated files #
95-
#############################
83+
# GitLab CI generated files
9684
gitlab-build-docker.log
9785

98-
/src/.cython_version
99-
/src/build
100-
/src/Makefile
101-
/src/bin/sage-env-config
102-
/build/bin/sage-build-env-config
86+
# Byte-compiled / optimized / DLL files
87+
__pycache__/
88+
*.py[cod]
89+
*$py.class
90+
91+
# Generated Cython files
92+
*.so
93+
src/sage/**/*.c
94+
src/sage/**/*.cpp
95+
src/sage/modular/arithgroup/farey_symbol.h
96+
!src/sage/cpython/debugimpl.c
97+
!src/sage/graphs/base/boost_interface.cpp
98+
!src/sage/graphs/cliquer/cl.c
99+
!src/sage/graphs/graph_decompositions/tdlib/sage_tdlib.cpp
100+
!src/sage/libs/eclib/wrap.cpp
101+
!src/sage/misc/inherit_comparison_impl.c
102+
!src/sage/modular/arithgroup/farey.cpp
103+
!src/sage/modular/arithgroup/sl2z.cpp
104+
!src/sage/rings/bernmm/bern_modp.cpp
105+
!src/sage/rings/bernmm/bern_modp_util.cpp
106+
!src/sage/rings/bernmm/bern_rat.cpp
107+
!src/sage/rings/bernmm/bernmm-test.cpp
108+
!src/sage/rings/padics/transcendantal.c
109+
!src/sage/rings/polynomial/weil/power_sums.c
110+
!src/sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp
111+
!src/sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp
112+
!src/sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_zn_poly.cpp
113+
!src/sage/stats/distributions/dgs_bern.c
114+
!src/sage/stats/distributions/dgs_gauss_dp.c
115+
!src/sage/stats/distributions/dgs_gauss_mp.c
116+
117+
# Temporary build files
118+
build/temp.*/
119+
build/bin/sage-build-env-config
103120

104121
/build/pkgs/*/src/build
105122
/build/pkgs/*/src/dist
106123
/build/pkgs/*/src/MANIFEST
107124
/build/pkgs/*/src/*.egg-info
108125
/build/pkgs/*/src/.tox
109126

110-
#######################
111-
# tox generated files #
112-
#######################
127+
# Distribution / packaging
128+
src/*.egg-info/
129+
/src/.cython_version
130+
/src/build
131+
/src/Makefile
132+
/src/bin/sage-env-config
133+
134+
# Virtual environments
135+
src/.env
136+
src/.venv
137+
src/env/
138+
src/venv/
139+
src/ENV/
140+
src/env.bak/
141+
src/venv.bak/
142+
143+
# mypy
144+
**/.mypy_cache/
113145

146+
# tox generated files
114147
/.tox
115148
/prefix
116149
worktree*

.homebrew-build-env

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# that activate keg-only homebrew package installations
33

44
HOMEBREW=`brew --prefix` || return 1
5-
for l in gettext bzip2; do
5+
for l in gettext bzip2 texinfo; do
66
if [ -d "$HOMEBREW/opt/$l/bin" ]; then
77
PATH="$HOMEBREW/opt/$l/bin:$PATH"
88
fi

.zenodo.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"description": "Mirror of the Sage https://sagemath.org/ source tree",
3+
"license": "other-open",
4+
"title": "sagemath/sage: 9.3.beta1",
5+
"version": "9.3.beta1",
6+
"upload_type": "software",
7+
"publication_date": "2020-11-07",
8+
"creators": [
9+
{
10+
"affiliation": "SageMath.org",
11+
"name": "The SageMath Developers"
12+
}
13+
],
14+
"access_right": "open",
15+
"related_identifiers": [
16+
{
17+
"scheme": "url",
18+
"identifier": "https://github.com/sagemath/sage/tree/9.3.beta1",
19+
"relation": "isSupplementTo"
20+
},
21+
{
22+
"scheme": "doi",
23+
"identifier": "10.5281/zenodo.593563",
24+
"relation": "isVersionOf"
25+
}
26+
]
27+
}

.zenodo.json.in

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"description": "Mirror of the Sage https://sagemath.org/ source tree",
3+
"license": "other-open",
4+
"title": "sagemath/sage: ${SAGE_VERSION}",
5+
"version": "${SAGE_VERSION}",
6+
"upload_type": "software",
7+
"publication_date": "${SAGE_RELEASE_DATE}",
8+
"creators": [
9+
{
10+
"affiliation": "SageMath.org",
11+
"name": "The SageMath Developers"
12+
}
13+
],
14+
"access_right": "open",
15+
"related_identifiers": [
16+
{
17+
"scheme": "url",
18+
"identifier": "https://github.com/sagemath/sage/tree/${SAGE_VERSION}",
19+
"relation": "isSupplementTo"
20+
},
21+
{
22+
"scheme": "doi",
23+
"identifier": "10.5281/zenodo.593563",
24+
"relation": "isVersionOf"
25+
}
26+
]
27+
}

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ Guide](https://doc.sagemath.org/html/en/installation).
173173

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

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

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

180182
- [Windows] The Sage source tree contains symbolic links, and the
181183
build will not work if Windows line endings rather than UNIX

VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SageMath version 9.2.beta14, Release Date: 2020-09-30
1+
SageMath version 9.3.beta1, Release Date: 2020-11-07

bootstrap

-7
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,6 @@ MAKE_SILENT=""
256256
$MAKE ${MAKE_SILENT} bootstrap-clean 2>/dev/null
257257
mkdir config 2>/dev/null
258258

259-
# If Sage has not been built yet, this will fail due to a missing
260-
# sage-env-config.
261-
if [ -f src/bin/sage-env-config ]; then
262-
. src/bin/sage-env-config
263-
. src/bin/sage-env
264-
fi
265-
266259
if [ $ALWAYSDOWNLOAD = yes ]; then
267260
if [ -n "$CONFTARBALL_URL" ]; then
268261
URL="$CONFTARBALL_URL"/configure-$CONFVERSION.tar.gz

build/bin/sage-clone-source

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ git clone "$SRC" "$DST"
3535

3636
cd "$DST"
3737
git remote set-url origin "$SAGE_REPO_ANONYMOUS"
38+
git remote set-url --push origin "$SAGE_REPO_AUTHENTICATED"
3839

3940
# Save space
4041
git gc --aggressive --prune=now

build/bin/sage-get-system-packages

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
SYSTEM=$1
33
if [ -z "$SYSTEM" ]; then
4-
echo >&2 "usage: $0 {debian|arch|conda|...} SPKGS..."
4+
echo >&2 "usage: $0 {debian|arch|conda|pip|...} SPKGS..."
55
exit 1
66
fi
77
shift
@@ -10,9 +10,18 @@ SPKGS="$*"
1010
if [ -z "$SAGE_ROOT" ]; then
1111
SAGE_ROOT=`pwd`
1212
fi
13-
STRIP_COMMENTS="sed s/#.*//;"
13+
case "$SYSTEM" in
14+
pip)
15+
SYSTEM_PACKAGES_FILE_NAME="requirements.txt"
16+
STRIP_COMMENTS='sed s/#.*//;s/[[:space:]]//g;'
17+
;;
18+
*)
19+
SYSTEM_PACKAGES_FILE_NAME="distros/$SYSTEM.txt"
20+
STRIP_COMMENTS="sed s/#.*//;"
21+
;;
22+
esac
1423
for PKG_BASE in $SPKGS; do
15-
SYSTEM_PACKAGES_FILE=$SAGE_ROOT/build/pkgs/$PKG_BASE/distros/$SYSTEM.txt
24+
SYSTEM_PACKAGES_FILE="$SAGE_ROOT"/build/pkgs/$PKG_BASE/$SYSTEM_PACKAGES_FILE_NAME
1625
if [ -f $SYSTEM_PACKAGES_FILE ]; then
1726
echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE)
1827
fi

build/bin/sage-guess-package-system

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# First test for user-installable package systems, then system package systems
44
if conda --version > /dev/null 2>&1; then
55
if [ -z "$CONDA_DEFAULT_ENV" ]; then
6-
echo >&2 -n "(ignoring conda because no environment is active) "
6+
printf >&2 "(ignoring conda because no environment is active) "
77
else
88
echo conda
99
exit

build/bin/sage-print-system-package-command

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ do
1515
# Whether to print sudo for package managers that need sudo for non-root users
1616
SUDO="sudo "
1717
;;
18+
--prompt=*)
19+
PROMPT=${1#--prompt=}
20+
;;
1821
--prompt)
1922
PROMPT=' $ '
2023
;;
2124
-*)
22-
echo >&2 "$0: unknown option $2"
25+
echo >&2 "$0: unknown option $1"
2326
exit 1
2427
;;
2528
*)
@@ -86,6 +89,9 @@ case $system:$command in
8689
freebsd*:install)
8790
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pkg install $system_packages"
8891
;;
92+
pip:install)
93+
[ -n "$system_packages" ] && echo "${PROMPT}sage -pip install $system_packages"
94+
;;
8995
*:update)
9096
# Nothing needed
9197
;;

build/bin/sage-spkg

+5-1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ if [ -z "$SAGE_BUILD_DIR" ]; then
181181
export SAGE_BUILD_DIR="$SAGE_LOCAL/var/tmp/sage/build"
182182
fi
183183

184+
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
185+
export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
186+
export SAGE_SPKG_WHEELS="$SAGE_LOCAL/var/lib/sage/wheels"
184187

185188
# Remove '.' from PYTHONPATH, to avoid trouble with setuptools / easy_install
186189
# (cf. #10192, #10176):
@@ -486,6 +489,7 @@ export SAGE_ROOT="$SAGE_ROOT"
486489
export SAGE_SRC="$SAGE_SRC"
487490
export SAGE_PKG_DIR="$script_dir"
488491
export SAGE_SPKG_SCRIPTS="$SAGE_SPKG_SCRIPTS"
492+
export SAGE_SPKG_WHEELS="$SAGE_SPKG_WHEELS"
489493
490494
export PKG_NAME="$PKG_NAME"
491495
export PKG_BASE="$PKG_BASE"
@@ -522,7 +526,7 @@ __EOF__
522526
}
523527

524528

525-
WRAPPED_SCRIPTS="build install check preinst postinst legacy-uninstall prerm postrm"
529+
WRAPPED_SCRIPTS="build install check preinst postinst prerm postrm"
526530
INSTALLED_SCRIPTS="prerm postrm"
527531

528532

build/bin/sage-spkg-info

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ for system_package_file in "$PKG_DISTROS"/*.txt; do
4040
echo "$system:"
4141
;;
4242
esac
43-
echo -n " "
43+
printf " "
4444
sage-print-system-package-command $system --prompt --sudo install $system_packages
4545
fi
4646
done

build/bin/write-dockerfile.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ for PKG_SCRIPTS in build/pkgs/*; do
1717
if [ -d $PKG_SCRIPTS ]; then
1818
PKG_BASE=$(basename $PKG_SCRIPTS)
1919
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt
20-
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
21-
if [ -f $SYSTEM_PACKAGES_FILE -a -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
20+
if [ -f $PKG_SCRIPTS/type -a -f $SYSTEM_PACKAGES_FILE -a -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
21+
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
2222
PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE))
2323
if [ -n "PKG_SYSTEM_PACKAGES" ]; then
2424
case "$PKG_TYPE" in

0 commit comments

Comments
 (0)