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/31228/the___march_native__flag_vs__the_compiler_used_…
Browse files Browse the repository at this point in the history
…when_python_extensions_are_built' into t/31227/accept__usr_bin_python3_from_xcode_12_3_on_macos_10_15__catalina_
  • Loading branch information
Matthias Koeppe committed Jan 23, 2021
2 parents ec4049d + 09b03d2 commit 67d66b7
Show file tree
Hide file tree
Showing 452 changed files with 4,719 additions and 3,437 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install pycodestyle
run: pip install tox pycodestyle
- name: Lint using pycodestyle
run: tox -e pycodestyle
run: tox -e pycodestyle-minimal
lint-relint:
name: Code style check with relint
runs-on: ubuntu-latest
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install pycodestyle
- name: Install relint
run: pip install tox relint
- name: Lint using relint
run: tox -e relint src/
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.beta5",
"version": "9.3.beta5",
"title": "sagemath/sage: 9.3.beta6",
"version": "9.3.beta6",
"upload_type": "software",
"publication_date": "2020-12-27",
"publication_date": "2021-01-17",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,7 +15,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/9.3.beta5",
"identifier": "https://github.com/sagemath/sage/tree/9.3.beta6",
"relation": "isSupplementTo"
},
{
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ install: all
@echo "from https://github.com/sagemath/binary-pkg"
@echo "******************************************************************"

# Setting SAGE_PKGCONFIG is only so that make does not exit with
# "This Makefile needs to be invoked by build/make/install".
list:
@$(MAKE) --silent build/make/Makefile >&2
@$(MAKE) --silent -f build/make/Makefile SAGE_SPKG_INST=local $@
@$(MAKE) --silent -f build/make/Makefile SAGE_PKGCONFIG=dummy $@

.PHONY: default build dist install micro_release \
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ version that you are installing.
Please do not hesitate to ask for help in the [SageMath forum
](https://ask.sagemath.org/questions/) or the [sage-support mailing
list](https://groups.google.com/forum/#!forum/sage-support). The
[Troubleshooting section in the Sage Installation Guide]() provides
instructions on what information to provide so that we can provide
[Troubleshooting section in the Sage Installation Guide
](https://doc.sagemath.org/html/en/installation/troubles.html)
provides instructions on what information to provide so that we can provide
help more effectively.

Contributing to Sage
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.beta5, Release Date: 2020-12-27
SageMath version 9.3.beta6, Release Date: 2021-01-17
8 changes: 4 additions & 4 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ _EOF_


sdh_guard() {
sdh_check_vars SAGE_ROOT SAGE_LOCAL SAGE_SHARE
sdh_check_vars SAGE_ROOT SAGE_LOCAL SAGE_INST_LOCAL SAGE_SHARE
}


Expand All @@ -160,9 +160,9 @@ sdh_configure() {
if [ -z "$CONFIG_SHELL" ]; then
export CONFIG_SHELL=`command -v bash`
fi
./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" --disable-maintainer-mode --disable-dependency-tracking "$@"
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" --disable-maintainer-mode --disable-dependency-tracking "$@"
if [ $? -ne 0 ]; then # perhaps it is a non-autoconf'd project
./configure --prefix="$SAGE_LOCAL" --libdir="$SAGE_LOCAL/lib" "$@"
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" "$@"
if [ $? -ne 0 ]; then
if [ -f "$(pwd)/config.log" ]; then
sdh_die <<_EOF_
Expand Down Expand Up @@ -261,7 +261,7 @@ sdh_store_and_pip_install_wheel() {

sdh_cmake() {
echo "Configuring $PKG_NAME with cmake"
cmake . -DCMAKE_INSTALL_PREFIX="${SAGE_LOCAL}" \
cmake . -DCMAKE_INSTALL_PREFIX="${SAGE_INST_LOCAL}" \
-DCMAKE_INSTALL_LIBDIR=lib \
"$@"
if [ $? -ne 0 ]; then
Expand Down
3 changes: 3 additions & 0 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ case $system:$command in
freebsd*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pkg install $system_packages"
;;
nix*:install)
[ -n "$system_packages" ] && echo "${PROMPT}nix-env --install $system_packages"
;;
pip:install)
[ -n "$system_packages" ] && echo "${PROMPT}sage -pip install $system_packages"
;;
Expand Down
3 changes: 2 additions & 1 deletion build/bin/sage-sdist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

########################################################
# Build Sage source distribution
# This script should be called by the spkg/bin/sage script
# This script should not be invoked directly.
# Use "sage --sdist" or "make dist".
########################################################

set -e
Expand Down
68 changes: 47 additions & 21 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# This script is typically invoked by giving the command
# sage {-i|-p} <options> <package name>...
#
# sage-spkg itself only accepts one <package name>.
#
# sage-spkg <options> <package name> [<installation tree>]
#
# Options can be:
# -s: do not delete temporary build directory
# -k: do not uninstall existing installation of this package before
Expand All @@ -24,8 +28,11 @@
# A package may assume that the following environment
# variables are defined:
#
# SAGE_ROOT -- root directory of sage install
# SAGE_LOCAL -- $SAGE_ROOT/local
# SAGE_ROOT -- root directory of sage distribution
# SAGE_LOCAL -- prefix where packages are installed (usually $SAGE_ROOT/local)
# SAGE_INST_LOCAL-- prefix where to install this package;
# this is set by the optional argument <installation tree>
# and defaults to $SAGE_LOCAL.
# SAGE_DISTFILES -- directory that stores upstream tarballs
# SAGE_DESTDIR -- temporary root the package will be installed to
# PKG_BASE -- the base name of the package itself (e.g. 'patch')
Expand Down Expand Up @@ -112,8 +119,10 @@ cat >&2 <<MESSAGE
$1
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the log file
explaining the problem and including the log files
$SAGE_LOGS/$PKG_NAME.log
and
$SAGE_ROOT/config.log
Describe your computer, operating system, etc.
MESSAGE

Expand All @@ -137,7 +146,8 @@ lookup_param()
{
local param=$1
local file=$2
sed -n "s/^${param} *= *//p" $file
# Ignore errors if the file does not exist
sed -n "s/^${param} *= *//p" $file 2>/dev/null
}

write_to_tty()
Expand Down Expand Up @@ -184,14 +194,6 @@ if [ $? -ne 0 ]; then
exit 1
fi

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):
if [ -n "$PYTHONPATH" ]; then
Expand Down Expand Up @@ -271,6 +273,28 @@ fi
PKG_NAME="$PKG_SRC"
PKG_BASE=`echo "$PKG_NAME" | sed 's/-.*//'` # strip version number

case $# in
1)
SAGE_INST_LOCAL="$SAGE_LOCAL"
;;
2)
SAGE_INST_LOCAL="$2"
;;
*)
usage
exit 1
;;
esac
export SAGE_INST_LOCAL

if [ -z "$SAGE_BUILD_DIR" ]; then
export SAGE_BUILD_DIR="$SAGE_INST_LOCAL/var/tmp/sage/build"
fi

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

# USE_LOCAL_SCRIPTS is a flag that if non-empty will cause
# this script to try to install the package using local metadata
# i.e. use upstream tarballs (vs spkgs) and scripts located in build/pkgs/$PKG_BASE
Expand All @@ -294,7 +318,6 @@ fi
USE_LOCAL_SCRIPTS=yes
PKG_BASE_VER=`echo $PKG_VER | sed 's/\.p[0-9][0-9]*$//'`
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini" | sed "s/VERSION/$PKG_BASE_VER/"`
echo "Found local metadata for $PKG_NAME"

# Warning for experimental packages
if [ x`cat "$PKG_SCRIPTS/type"` = x"experimental" -a $INFO = 0 ]; then
Expand Down Expand Up @@ -403,12 +426,12 @@ if [ ! -w "$SAGE_BUILD_DIR" ]; then
error_msg "Error: no write access to build directory $SAGE_BUILD_DIR"
exit 1
fi
if [ ! -d "$SAGE_LOCAL" ]; then
if [ ! -d "$SAGE_INST_LOCAL" ]; then
# If you just unpack Sage and run "sage -p <pkg>" then local does not yet exist
mkdir "$SAGE_LOCAL"
mkdir "$SAGE_INST_LOCAL"
fi
if [ ! -w "$SAGE_LOCAL" ]; then
error_msg "Error: no write access to installation directory $SAGE_LOCAL"
if [ ! -w "$SAGE_INST_LOCAL" ]; then
error_msg "Error: no write access to installation directory $SAGE_INST_LOCAL"
exit 1
fi

Expand Down Expand Up @@ -502,7 +525,7 @@ export PKG_NAME="$PKG_NAME"
export PKG_BASE="$PKG_BASE"
export PKG_VER="$PKG_VER"
for lib in "\$SAGE_ROOT/build/bin/sage-dist-helpers" "\$SAGE_SRC/bin/sage-env-config" "\$SAGE_SRC/bin/sage-env" "\$SAGE_ROOT/build/bin/sage-build-env-config"; do
for lib in "\$SAGE_ROOT/build/bin/sage-dist-helpers" "\$SAGE_SRC/bin/sage-env-config" "\$SAGE_SRC/bin/sage-env" "\$SAGE_ROOT/build/bin/sage-build-env-config" "\$SAGE_ROOT/build/bin/sage-build-env"; do
source "\$lib"
if [ \$? -ne 0 ]; then
echo >&2 "Error: failed to source \$lib"
Expand All @@ -511,6 +534,8 @@ for lib in "\$SAGE_ROOT/build/bin/sage-dist-helpers" "\$SAGE_SRC/bin/sage-env-co
fi
done
export SAGE_INST_LOCAL="$SAGE_INST_LOCAL"
sdh_guard
if [ \$? -ne 0 ]; then
echo >&2 "Error: sdh_guard not found; Sage environment was not set up properly"
Expand Down Expand Up @@ -568,7 +593,7 @@ done
if [ ! -f spkg-install ]; then
echo '#!/usr/bin/env bash' > spkg-install
if [ -x configure ]; then
echo './configure --prefix="$SAGE_LOCAL" && make && $SAGE_SUDO make install' >> spkg-install
echo './configure --prefix="$SAGE_INST_LOCAL" && make && $SAGE_SUDO make install' >> spkg-install
elif [ -f setup.py ]; then
echo 'python setup.py install' >> spkg-install
else
Expand Down Expand Up @@ -609,6 +634,7 @@ export rsync_proxy=$http_proxy
##################################################################

if [ "$UNAME" = "CYGWIN" ]; then
# This is a global lock - so we use SAGE_LOCAL, not SAGE_INST_LOCAL.
if [ ! -d "$SAGE_LOCAL/var/lock" ]; then
mkdir -p "$SAGE_LOCAL/var/lock"
fi
Expand All @@ -627,9 +653,9 @@ export SAGE_DESTDIR="${SAGE_BUILD_DIR}/${PKG_NAME}/inst"

# The actual prefix where the installation will be staged. This is the
# directory that you need to work in if you want to change the staged
# installation tree (before final installation to $SAGE_LOCAL) at the
# installation tree (before final installation to $SAGE_INST_LOCAL) at the
# end of spkg-install.
export SAGE_DESTDIR_LOCAL="${SAGE_DESTDIR}${SAGE_LOCAL}"
export SAGE_DESTDIR_LOCAL="${SAGE_DESTDIR}${SAGE_INST_LOCAL}"

# First uninstall the previous version of this package, if any
if [ "$KEEP_EXISTING" != "yes" ]; then
Expand Down
39 changes: 33 additions & 6 deletions build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,27 @@ for ext in rst txt; do
done
if [ -r "$PKG_SCRIPTS/type" ] ; then
echo
echo "== Type =="
echo "Type"
echo "----"
echo
cat "$PKG_SCRIPTS/type"
echo
fi
echo "== Equivalent System Packages =="
echo
echo "Version Information"
echo "-------------------"
echo
for a in package-version.txt requirements.txt install-requires.txt; do
if [ -f "$PKG_SCRIPTS"/"$a" ]; then
echo "$a::"
echo
sed 's/^/ /' "$PKG_SCRIPTS/$a"
echo
fi
done
echo
echo "Equivalent System Packages"
echo "--------------------------"
echo
PKG_DISTROS="$PKG_SCRIPTS"/distros
for system_package_file in "$PKG_DISTROS"/*.txt; do
Expand All @@ -40,8 +55,15 @@ for system_package_file in "$PKG_DISTROS"/*.txt; do
echo "$system:"
;;
esac
printf " "
sage-print-system-package-command $system --prompt --sudo install $system_packages
if [ -n "$OUTPUT_RST" ]; then
echo
echo ".. CODE-BLOCK:: bash"
echo
fi
sage-print-system-package-command $system --prompt=' $ ' --sudo install $system_packages
if [ -n "$OUTPUT_RST" ]; then
echo
fi
fi
done
if [ -z "$system" ]; then
Expand All @@ -52,8 +74,13 @@ else
echo "If the system package is installed, ./configure will check whether it can be used."
else
echo "However, these system packages will not be used for building Sage"
echo "because spkg-configure.m4 has not been written for this package;"
echo "see https://trac.sagemath.org/ticket/27330"
if [ -f "$PKG_SCRIPTS"/install-requires.txt ]; then
echo "because using Python site-packages is not supported by the Sage distribution;"
echo "see https://trac.sagemath.org/ticket/29023"
else
echo "because spkg-configure.m4 has not been written for this package;"
echo "see https://trac.sagemath.org/ticket/27330"
fi
fi
fi
echo
14 changes: 9 additions & 5 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@
# Always use bash for make rules
SHELL = @SHELL@

ifndef SAGE_SPKG_INST
ifndef DEBUG_RULES
# Check a variable that is only set in build/make/install, but not in sage-env, for example
ifndef SAGE_PKGCONFIG
# Set by build/bin/sage-sdist, which invokes the Makefile directly in
# order to download upstream packages for distribution.
ifndef SAGE_SPKG_COPY_UPSTREAM
$(error This Makefile needs to be invoked by build/make/install)
else
# A dummy value for this variable for debugging purposes
SAGE_SPKG_INST=installed
endif
endif

# Directory to keep track of which packages are installed
SAGE_SPKG_INST = $(SAGE_LOCAL)/var/lib/sage/installed

INST = $(SAGE_SPKG_INST)

# Aliases for mutually exclusive standard packages selected at configure time
Expand Down Expand Up @@ -588,6 +590,8 @@ $(1)-no-deps:
. '$$(SAGE_ROOT)/src/bin/sage-env' && \
. '$$(SAGE_ROOT)/build/bin/sage-build-env-config' && \
. '$$(SAGE_ROOT)/build/bin/sage-build-env' && \
SAGE_SPKG_WHEELS=$$(SAGE_LOCAL)/var/lib/sage/wheels \
SAGE_INST_LOCAL=$$(SAGE_LOCAL) \
sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1)-$(2).log'
touch "$$(INST)/$(1)-$(2)"

Expand Down
6 changes: 0 additions & 6 deletions build/make/install
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ fi
export SAGE_SHARE="$SAGE_LOCAL/share"
export SAGE_PKGCONFIG="$SAGE_LOCAL/lib/pkgconfig"
export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
# Following line is duplicated here from build/bin/sage-spkg.
# because the setting is also needed by some script packages.
# The line here will be removed in #29386 (install script packages
# via sage-spkg).
export SAGE_SPKG_WHEELS="$SAGE_LOCAL/var/lib/sage/wheels"

if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
SAGE_ORIG_PATH=$PATH && export SAGE_ORIG_PATH
Expand Down
Loading

0 comments on commit 67d66b7

Please sign in to comment.