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.beta8' into t/31335/homebrew__unused_packages__singula…
Browse files Browse the repository at this point in the history
…r__pari_______in__usr_local_leak_into_sagelib_build

SageMath version 9.3.beta8, Release Date: 2021-03-07
  • Loading branch information
Matthias Koeppe committed Mar 9, 2021
2 parents add7db4 + fbca269 commit 4e777e7
Show file tree
Hide file tree
Showing 489 changed files with 5,334 additions and 1,753 deletions.
572 changes: 326 additions & 246 deletions .github/workflows/ci-cygwin-minimal.yml

Large diffs are not rendered by default.

572 changes: 326 additions & 246 deletions .github/workflows/ci-cygwin-standard.yml

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions .github/workflows/extract-sage-local.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
#!/usr/bin/env bash
# to be run from $SAGE_ROOT, with arguments sage-local-${{ env.PREVIOUS_STAGES }}.tar

if [ -z "$SAGE_LOCAL" ]; then
SAGE_LOCAL=$(pwd)/local
fi

# Show all tar files
ls -l $*

# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
for a in $*; do
echo Extracting $a
tar xf $a
(cd / && tar xf -) < $a
rm -f $a
done

# Also get rid of the stages that were not extracted
rm -f sage-local-*.tar

# We set the installation records to the same mtime so that no rebuilds due to dependencies
# among these packages are triggered.
(cd local/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *)
(cd "$SAGE_LOCAL"/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *)

# Show what has been built already.
ls -l local local/var/lib/sage/installed/
ls -l "$SAGE_LOCAL" "$SAGE_LOCAL"/var/lib/sage/installed/
df -h

# Rebase!
src/bin/sage-rebase.sh local
src/bin/sage-rebase.sh "$SAGE_LOCAL"
2 changes: 1 addition & 1 deletion .github/workflows/tox-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Try to login to docker.pkg.github.com
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tox-gcc_spkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Try to login to docker.pkg.github.com
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: |
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Build and test with tox
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
# For doctesting, we use a lower parallelization to avoid timeouts.
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 @@ -64,7 +64,7 @@ jobs:
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Try to login to docker.pkg.github.com
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Try to login to docker.pkg.github.com
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: |
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install python-tox
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Build and test with tox
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
# For doctesting, we use a lower parallelization to avoid timeouts.
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ 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/graphs/graph_decompositions/sage_tdlib.cpp
!src/sage/libs/eclib/wrap.cpp
!src/sage/misc/inherit_comparison_impl.c
!src/sage/modular/arithgroup/farey.cpp
Expand Down
8 changes: 4 additions & 4 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 9.3.beta7",
"version": "9.3.beta7",
"title": "sagemath/sage: 9.3.beta8",
"version": "9.3.beta8",
"upload_type": "software",
"publication_date": "2021-02-07",
"publication_date": "2021-03-07",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,7 +15,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/9.3.beta7",
"identifier": "https://github.com/sagemath/sage/tree/9.3.beta8",
"relation": "isSupplementTo"
},
{
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.3.beta7, Release Date: 2021-02-07
SageMath version 9.3.beta8, Release Date: 2021-03-07
20 changes: 10 additions & 10 deletions build/bin/sage-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,34 @@
# The compiler flags are set in order of priority by
# 1) environment variables
# 2) flags set at configuration time
if [ "x$CFLAGS" == "x" ]; then
if [ "x$CFLAGS" = "x" ]; then
export ORIGINAL_CFLAGS="$CONFIGURED_CFLAGS"
else
export ORIGINAL_CFLAGS="$CFLAGS"
fi
if [ "x$CXXFLAGS" == "x" ]; then
if [ "x$CXXFLAGS" = "x" ]; then
export ORIGINAL_CXXFLAGS="$CONFIGURED_CXXFLAGS"
else
export ORIGINAL_CXXFLAGS="$CXXFLAGS"
fi
if [ "x$FCFLAGS" == "x" ]; then
if [ "x$FCFLAGS" = "x" ]; then
export ORIGINAL_FCFLAGS="$CONFIGURED_FCFLAGS"
else
export ORIGINAL_FCFLAGS="$FCFLAGS"
fi
if [ "x$F77FLAGS" == "x" ]; then
if [ "x$F77FLAGS" = "x" ]; then
export ORIGINAL_F77FLAGS="$CONFIGURED_F77FLAGS"
else
export ORIGINAL_F77FLAGS="$F77FLAGS"
fi

# We optimize according to $SAGE_DEBUG.
if [ "x$ORIGINAL_CFLAGS" == "x" ]; then
if [ "x$ORIGINAL_CFLAGS" = "x" ]; then
# Evaluate SAGE_DEBUG:
if [ "x$SAGE_DEBUG" == "xyes" ]; then
if [ "x$SAGE_DEBUG" = "xyes" ]; then
export CFLAGS_NON_NATIVE="-Og -g"
export CFLAGS_O3_NON_NATIVE="-Og -g"
elif [ "x$SAGE_DEBUG" == "xno" ]; then
elif [ "x$SAGE_DEBUG" = "xno" ]; then
export CFLAGS_NON_NATIVE="-O2"
export CFLAGS_O3_NON_NATIVE="-O3"
else
Expand All @@ -69,7 +69,7 @@ else
fi

# Copy to CXXFLAGS if this is not set.
if [ "x$ORIGINAL_CXXFLAGS" == "x" ]; then
if [ "x$ORIGINAL_CXXFLAGS" = "x" ]; then
export CXXFLAGS="$CFLAGS"
export CXXFLAGS_O3="$CFLAGS_O3"
export CXXFLAGS_NON_NATIVE="$CFLAGS_NON_NATIVE"
Expand All @@ -82,7 +82,7 @@ else
fi

# Copy CFLAGS to FCFLAGS if this is not set.
if [ "x$ORIGINAL_FCFLAGS" == "x" ]; then
if [ "x$ORIGINAL_FCFLAGS" = "x" ]; then
export FCFLAGS="$CFLAGS"
export FCFLAGS_O3="$CFLAGS_O3"
export FCFLAGS_NON_NATIVE="$CFLAGS_NON_NATIVE"
Expand All @@ -95,7 +95,7 @@ else
fi

# Copy FCFLAGS to F77FLAGS if this is not set.
if [ "x$ORIGINAL_F77FLAGS" == "x" ]; then
if [ "x$ORIGINAL_F77FLAGS" = "x" ]; then
export F77FLAGS="$FCFLAGS"
export F77FLAGS_O3="$FCFLAGS_O3"
export F77FLAGS_NON_NATIVE="$FCFLAGS_NON_NATIVE"
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-build-env-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export SAGE_FAT_BINARY="@SAGE_FAT_BINARY@"

# Export SAGE_DEBUG if this was enabled during configure,
# but be respectful of the current settings.
if [ "x$SAGE_DEBUG" == "x" ]; then
if [ "x$SAGE_DEBUG" = "x" ]; then
export SAGE_DEBUG="@SAGE_DEBUG@"
fi

Expand Down
24 changes: 17 additions & 7 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -227,17 +227,14 @@ sdh_pip_install() {
sdh_store_and_pip_install_wheel .
}

sdh_store_and_pip_install_wheel() {
sdh_store_wheel() {
if [ -n "$SAGE_DESTDIR" ]; then
local sudo=""
# --no-warn-script-location: Suppress a warning caused by --root
local root="--root=$SAGE_DESTDIR --no-warn-script-location"
else
local sudo="$SAGE_SUDO"
local root=""
fi
if [ "$*" != "." ]; then
sdh_die "Error: sdh_store_and_pip_install_wheel requires . as only argument"
sdh_die "Error: sdh_store_wheel requires . as only argument"
fi
wheel=""
for w in dist/*.whl; do
Expand All @@ -252,11 +249,24 @@ sdh_store_and_pip_install_wheel() {
sdh_die "Error: no wheel found after building"
fi

$sudo sage-pip-install $root "$wheel" || \
sdh_die "Error installing $wheel"
mkdir -p "${SAGE_DESTDIR}${SAGE_SPKG_WHEELS}" && \
$sudo mv "$wheel" "${SAGE_DESTDIR}${SAGE_SPKG_WHEELS}/" || \
sdh_die "Error storing $wheel"
wheel="${SAGE_DESTDIR}${SAGE_SPKG_WHEELS}/${wheel##*/}"
}

sdh_store_and_pip_install_wheel() {
sdh_store_wheel "$@"
if [ -n "$SAGE_DESTDIR" ]; then
local sudo=""
# --no-warn-script-location: Suppress a warning caused by --root
local root="--root=$SAGE_DESTDIR --no-warn-script-location"
else
local sudo="$SAGE_SUDO"
local root=""
fi
$sudo sage-pip-install $root "$wheel" || \
sdh_die "Error installing ${wheel##*/}"
}

sdh_cmake() {
Expand Down
74 changes: 55 additions & 19 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ shift
IF_VERBOSE=:
SUDO=
PROMPT=
COMMENT="# "
if [ -n "$OUTPUT_RST" ]; then
COMMENT=""
else
COMMENT="# "
fi
while :
do
case "$1" in
Expand Down Expand Up @@ -51,6 +55,25 @@ system_packages="$*"
options=
env=
shopt -s extglob

function print_shell_command()
{
if [ -n "$OUTPUT_RST" ]; then
echo
echo ".. CODE-BLOCK:: bash"
echo
fi
echo "${PROMPT}$1"
if [ -n "$OUTPUT_RST" ]; then
echo
fi
}

function print_comment()
{
echo "${COMMENT}$1"
}

case $system:$command in
homebrew*:setup-build-env)
$IF_VERBOSE echo "${COMMENT}"
Expand All @@ -70,66 +93,79 @@ case $system:$command in
# Verbs handled above are our own inventions. Verbs handled below are apt-get verbs.
#
@(debian*|ubuntu*):update)
echo "${PROMPT}${SUDO}apt-get $command $system_packages"
print_shell_command "${SUDO}apt-get $command $system_packages"
;;
@(debian*|ubuntu*):*)
[ "$NO_INSTALL_RECOMMENDS" = yes ] && options="$options --no-install-recommends"
[ "$YES" = yes ] && options="$options --yes" env="DEBIAN_FRONTEND=noninteractive "
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}${env}apt-get $command $options $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}${env}apt-get $command $options $system_packages"
;;
@(fedora*|redhat*|centos*):install)
[ "$YES" = yes ] && options="$options -y"
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}yum install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}yum install $options $system_packages"
;;
gentoo*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}emerge $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}emerge $system_packages"
;;
arch*:update)
echo "${PROMPT}${SUDO}pacman -Sy"
print_shell_command "${SUDO}pacman -Sy"
;;
arch*:install)
[ "$YES" = yes ] && options="$options --noconfirm"
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pacman -S $options $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}pacman -S $options $system_packages"
;;
void*:update)
echo "${PROMPT}${SUDO}xbps-install -Su"
print_shell_command "${SUDO}xbps-install -Su"
;;
void*:install)
[ "$YES" = yes ] && options="$options --yes"
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}xbps-install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}xbps-install $options $system_packages"
;;
opensuse*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}zypper install $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}zypper install $system_packages"
;;
*conda*:install)
[ "$YES" = yes ] && options="$options --yes"
[ -n "$system_packages" ] && echo "${PROMPT}conda install $system_packages"
[ -n "$system_packages" ] && print_shell_command "conda install $system_packages"
;;
homebrew*:install)
[ -n "$system_packages" ] && echo "${PROMPT}brew install $system_packages"
[ -n "$system_packages" ] && print_shell_command "brew install $system_packages"
;;
slackware*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}slackpkg install $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}slackpkg install $system_packages"
;;
cygwin*:update)
echo "# first install apt-cyg from https://github.com/transcode-open/apt-cyg"
print_commment "first install apt-cyg from https://github.com/transcode-open/apt-cyg"
;;
cygwin*:install)
[ -n "$system_packages" ] && echo "${PROMPT}apt-cyg install $system_packages"
[ -n "$system_packages" ] && print_shell_command "apt-cyg install $system_packages"
;;
freebsd*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pkg install $system_packages"
[ -n "$system_packages" ] && print_shell_command "${SUDO}pkg install $system_packages"
;;
nix*:install)
[ -n "$system_packages" ] && echo "${PROMPT}nix-env --install $system_packages"
[ -n "$system_packages" ] && print_shell_command "nix-env --install $system_packages"
;;
pip:install)
[ -n "$system_packages" ] && echo "${PROMPT}sage -pip install $system_packages"
[ -n "$system_packages" ] && print_shell_command "sage -pip install $system_packages"
;;
repology:install)
if [ -n "$system_packages" ]; then
links=""
for pkg in $system_packages; do
link="https://repology.org/project/$pkg/versions"
if [ -n "$links" ]; then
links="$links, "
fi
links="$links$link"
done
print_comment "See ${links}"
fi
;;
*:update)
# Nothing needed
;;
*)
echo "# $command the following packages: $system_packages"
print_comment "$command the following packages: $system_packages"
;;
esac
Loading

0 comments on commit 4e777e7

Please sign in to comment.