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.1.beta6' into t/29041/at___bootstrap_time__generate_src_…
Browse files Browse the repository at this point in the history
…requirements_txt__src_constraints_txt__src_setup_cfg__install_requires__from_build_pkgs

SageMath version 9.1.beta6, Release Date: 2020-03-01
  • Loading branch information
Matthias Koeppe committed Mar 2, 2020
2 parents f147962 + cdb4c0b commit 13088e3
Show file tree
Hide file tree
Showing 220 changed files with 8,030 additions and 1,165 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,5 @@ Untitled*.ipynb
# GitLab CI generated files #
#############################
gitlab-build-docker.log

/build/bin/sage-build-env-config
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.1.beta5, Release Date: 2020-02-21
SageMath version 9.1.beta6, Release Date: 2020-03-01
87 changes: 87 additions & 0 deletions build/bin/sage-build-env-config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# -*- shell-script -*-

###########################################################################
#
# Set some environment variables for building Sage (the distribution).
#
# NOTES:
# - You must *source* this script instead of executing.
# - Use "return" instead of "exit" to signal a failure. Since this
# file is sourced, an "exit" here will actually exit src/bin/sage,
# which is probably not intended.
# - All environment variables set here should be *exported*, otherwise
# they won't be available in child programs.
#
# If you want to set all environment variables for your shell like
# they are during the build of Sage packages, type
#
# sage --buildsh
#
##########################################################################

# This is usually blank if the system GMP is used, or $SAGE_LOCAL otherwise
export SAGE_GMP_PREFIX="@SAGE_GMP_PREFIX@"
export SAGE_GMP_INCLUDE="@SAGE_GMP_INCLUDE@"
if [ -n "$SAGE_GMP_PREFIX" ]; then
# Many packages that depend on GMP accept a --with-gmp=<prefix> flag to
# their ./configure scripts. When using the system's GMP this is not
# generally necessary, but when using the GMP package installed in
# SAGE_LOCAL it is useful to pass it. We define this variable to
# pass to these packages' ./configure scripts. When using the system
# GMP its value is just blank (for many of these packages passing
# --with-gmp without an argument is actually a bug)
export SAGE_CONFIGURE_GMP="--with-gmp=$SAGE_GMP_PREFIX"
fi

# The MPFR case is very close to the GMP case above
# This is usually blank if the system MPFR is used, or $SAGE_LOCAL otherwise
export SAGE_MPFR_PREFIX="@SAGE_MPFR_PREFIX@"
if [ -n "$SAGE_MPFR_PREFIX" ]; then
# Some packages that depend on MPFR accept a --with-mpfr=<prefix> flag to
# their ./configure scripts. Thus we deal with this just as with GMP above.
export SAGE_CONFIGURE_MPFR="--with-mpfr=$SAGE_MPFR_PREFIX"
fi

# The MPC case is very close to the MPFR case above
# This is usually blank if the system MPC is used, or $SAGE_LOCAL otherwise
export SAGE_MPC_PREFIX="@SAGE_MPC_PREFIX@"
if [ -n "$SAGE_MPC_PREFIX" ]; then
# Some packages that depend on MPC accept a --with-mpc=<prefix> flag to
# their ./configure scripts. Thus we deal with this just as with GMP above.
export SAGE_CONFIGURE_MPC="--with-mpc=$SAGE_MPC_PREFIX"
fi

# Location of system crti.o, in case we build our own gcc
export SAGE_CRTI_DIR="@SAGE_CRTI_DIR@"

# This is usually blank if the system NTL is used, or $SAGE_LOCAL otherwise
export SAGE_NTL_PREFIX="@SAGE_NTL_PREFIX@"
if [ -n "$SAGE_NTL_PREFIX" ]; then
# Many packages that depend on NTL accept a --with-ntl=<prefix> flag to
# their ./configure scripts. When using the system's NTL this is not
# generally necessary, but when using the NTL package installed in
# SAGE_LOCAL it is useful to pass it.
export SAGE_CONFIGURE_NTL="--with-ntl=$SAGE_NTL_PREFIX"
fi

# The FLINT case is very close to the MPFR case above
# This is usually blank if the system FLINT is used, or $SAGE_LOCAL otherwise
export SAGE_FLINT_PREFIX="@SAGE_FLINT_PREFIX@"
if [ -n "$SAGE_FLINT_PREFIX" ]; then
# Some packages that depend on FLINT accept a --with-flint=<prefix> flag to
# their ./configure scripts. Thus we deal with this just as with GMP above.
export SAGE_CONFIGURE_FLINT="--with-flint=$SAGE_FLINT_PREFIX"
fi

# This is usually blank if the system PARI is used, or $SAGE_LOCAL otherwise
export SAGE_PARI_PREFIX="@SAGE_PARI_PREFIX@"
if [ -n "$SAGE_PARI_PREFIX" ]; then
# Some packages that depend on PARI accept a --with-pari=<prefix> flag to
# their ./configure scripts. Thus we deal with this just as with GMP above.
export SAGE_CONFIGURE_PARI="--with-pari=$SAGE_PARI_PREFIX"
fi
export SAGE_PARI_CFG="@SAGE_PARI_CFG@"

export SAGE_GLPK_PREFIX="@SAGE_GLPK_PREFIX@"
export SAGE_FREETYPE_PREFIX="@SAGE_FREETYPE_PREFIX@"
export SAGE_ARB_LIBRARY="@SAGE_ARB_LIBRARY@"
4 changes: 3 additions & 1 deletion build/bin/sage-logger
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ if [ -n "$SAGE_SILENT_BUILD" -a ${use_prefix} = true ]; then
( exec>> $logfile 2>&1 ; eval "$cmd" )
status=$?
if [[ $status != 0 ]]; then
echo " [$logname] error installing, exit status $status. Log file: $logfile"
echo " [$logname] error installing, exit status $status. End of log file:"
tail -n 40 "$logfile" | sed "/Please email sage-devel/,$ d;s;^; [$logname] ;" >&2
echo " [$logname] Full log file: $logfile"
else
echo " [$logname] successfully installed."
fi
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,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" ; do
for lib in "\$SAGE_ROOT/build/bin/sage-dist-helpers" "\$SAGE_SRC/bin/sage-env" "\$SAGE_ROOT/build/bin/sage-build-env-config"; do
source "\$lib"
if [ \$? -ne 0 ]; then
echo >&2 "Error: failed to source \$lib"
Expand Down
6 changes: 2 additions & 4 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ SDIST_PACKAGES = @SAGE_SDIST_PACKAGES@

SCRIPTS = @SAGE_SCRIPTS@

EXTCODE = @SAGE_EXTCODE@

# Packages that use the 'normal' build rules
NORMAL_PACKAGES = @SAGE_NORMAL_PACKAGES@

Expand Down Expand Up @@ -267,12 +265,12 @@ endif
define SCRIPT_PACKAGE_templ
$(1): $(2)
$(AM_V_at)cd '$$(SAGE_ROOT)' && \
source '$$(SAGE_ROOT)/src/bin/sage-env' && \
source '$$(SAGE_ROOT)/src/bin/sage-env' && source '$$(SAGE_ROOT)/build/bin/sage-build-env-config' && \
sage-logger -p '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' '$$(SAGE_LOGS)/$(1).log'

$(1)-clean:
-$(AM_V_at)cd '$$(SAGE_ROOT)' && \
source '$$(SAGE_ROOT)/src/bin/sage-env' && \
source '$$(SAGE_ROOT)/src/bin/sage-env' && source '$$(SAGE_ROOT)/build/bin/sage-build-env-config' && \
'$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-uninstall'

endef
Expand Down
16 changes: 3 additions & 13 deletions build/make/deps
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ all-sage: \
$(STANDARD_PACKAGE_INSTS) \
$(OPTIONAL_INSTALLED_PACKAGE_INSTS) \
$(OPTIONAL_CLEANED_PACKAGES_CLEANS) \
$(EXTCODE) \
$(SCRIPTS)

# Download all packages which should be inside an sdist tarball (the -B
Expand Down Expand Up @@ -124,6 +123,7 @@ base: $(inst_patch) $(inst_pkgconf)
# Sage library (e.g. CYTHON, JINJA2), and on the other hand all
# dependencies for Cython files (e.g. PARI, NTL, MP_LIBRARY).
sagelib: \
$(SCRIPTS) \
$(inst_arb) \
$(inst_boost_cropped) \
$(inst_$(BLAS)) \
Expand Down Expand Up @@ -176,36 +176,26 @@ sagelib: \
$(inst_six) \
$(inst_symmetrica) \
$(inst_zn_poly) \
$(EXTCODE) \
$(PCFILES)
$(AM_V_at)if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && \
cd $(SAGE_SRC) && source bin/sage-env && source $(SAGE_ROOT)/build/bin/sage-build-env-config && \
sage-logger -p 'time $(MAKE) sage' '$(SAGE_LOGS)/sagelib-$(SAGE_VERSION).log'; \
fi


###############################################################################
# Building scripts and extcode
# Building scripts
###############################################################################

# Don't just use "install" since we don't want to change permissions
$(SAGE_LOCAL)/bin/%: $(SAGE_SRC)/bin/%
$(AM_V_at)cp $< $@

# Don't just use "install -D" since we don't want to change permissions.
# cp won't correctly setup the SAGE_EXTCODE directory structure
# (unlike install), so we need a mkdir here such that cp can copy into
# an existing folder.
$(SAGE_EXTCODE)/%: $(SAGE_SRC)/ext/%
@mkdir -p "$(@D)"
$(AM_V_at)cp $< $@

# Install sage-specific generated .pc files
$(SAGE_PKGCONFIG)/%.pc: $(SAGE_SRC)/lib/pkgconfig/%.pc
@mkdir -p "$(@D)"
$(AM_V_at)cp -P $< $@


###############################################################################
# Building the documentation
###############################################################################
Expand Down
1 change: 0 additions & 1 deletion build/make/install
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ if [ $? -ne 0 ]; then
fi

export SAGE_SHARE="$SAGE_LOCAL/share"
export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
export SAGE_PKGCONFIG="$SAGE_LOCAL/lib/pkgconfig"
export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
Expand Down
37 changes: 37 additions & 0 deletions build/pkgs/arb/patches/silence-stderr-exponent-too-large.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Do not write stuff to stderr when signalling errors

See https://trac.sagemath.org/ticket/28817


diff --git a/arf/get_mpfr.c b/arf/get_mpfr.c
index 34012af..9ccb87b 100644
--- a/arf/get_mpfr.c
+++ b/arf/get_mpfr.c
@@ -30,7 +30,6 @@ arf_get_mpfr(mpfr_t x, const arf_t y, mpfr_rnd_t rnd)
}
else if (COEFF_IS_MPZ(*ARF_EXPREF(y)))
{
- flint_printf("exception: exponent too large to convert to mpfr");
flint_abort();
r = 0; /* dummy return because flint_abort() is not declared noreturn */
}
diff --git a/fmpr/get_mpfr.c b/fmpr/get_mpfr.c
index 63b6682..e2dda3b 100644
--- a/fmpr/get_mpfr.c
+++ b/fmpr/get_mpfr.c
@@ -25,7 +25,6 @@ fmpr_get_mpfr(mpfr_t x, const fmpr_t y, mpfr_rnd_t rnd)
}
else if (COEFF_IS_MPZ(*fmpr_expref(y)))
{
- flint_printf("exception: exponent too large to convert to mpfr");
flint_abort();
r = 0; /* dummy return because flint_abort() is not declared noreturn */
}
@@ -42,7 +41,6 @@ fmpr_get_mpfr(mpfr_t x, const fmpr_t y, mpfr_rnd_t rnd)

if (!mpfr_regular_p(x))
{
- flint_printf("exception: exponent too large to convert to mpfr");
flint_abort();
}
}
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=c5ac16fd484b7d261fdd5f9ddc0ad144d212c074
md5=6e01232385ed6a22fae6873990ca2b9a
cksum=45471057
sha1=63dd5a30099d2285ba7d8914dc6a94213e704258
md5=767a51cc156fec7e49d08cbaefc38d24
cksum=1354891695
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f363300209b159a65d9ceaf6b79bb684a9c71db1
30cb9d11bc3889744a2a27db00041d9cb40df522
2 changes: 1 addition & 1 deletion build/pkgs/python3/spkg-build
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fi

echo "Testing importing of various modules..."
import_errors=false
test_modules="ctypes math hashlib crypt readline socket"
test_modules="ctypes math hashlib crypt readline socket zlib sqlite3"
if [ "$UNAME" = "Darwin" ]; then
test_modules="$test_modules _scproxy"
fi
Expand Down
10 changes: 1 addition & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -433,21 +433,13 @@ done

AC_SUBST([SAGE_SCRIPTS])

SAGE_EXTCODE='\
'
for file in `find "$SAGE_SRC"/ext -type f`; do
SAGE_EXTCODE+=" \$(SAGE_EXTCODE)${file#$SAGE_SRC/ext} \\"$'\n'
done

AC_SUBST([SAGE_EXTCODE])

SAGE_MAKE_DEPS="$SAGE_ROOT/build/make/deps"
AC_SUBST_FILE([SAGE_MAKE_DEPS])


dnl AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([build/make/Makefile-auto build/make/Makefile src/Makefile])
AC_CONFIG_FILES([src/bin/sage-env-config])
AC_CONFIG_FILES([src/bin/sage-env-config build/bin/sage-build-env-config])

AC_CONFIG_FILES([build/pkgs/sage_conf/src/sage_conf.py build/pkgs/sage_conf/src/setup.cfg])

Expand Down
34 changes: 25 additions & 9 deletions src/bin/sage
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ usage_advanced() {
echo " -R [...] -- run Sage's R with given arguments"
echo " -scons [...] -- run Sage's scons"
echo " -sh [...] -- run \$SHELL ($SHELL) with Sage environment variables"
echo " as they are set in the runtime of Sage"
echo " -buildsh [...] -- run \$SHELL ($SHELL) with Sage environment variables"
echo " as they are set while building Sage and its packages"
echo " -singular [...] -- run Sage's singular with given arguments"
echo " -sqlite3 [...] -- run Sage's sqlite3 with given arguments"
echo " -twistd [...] -- run Twisted server"
Expand Down Expand Up @@ -660,13 +663,26 @@ if [ "$1" = '-git-branch' -o "$1" = '--git-branch' ]; then
exec git --git-dir="$SAGE_ROOT"/.git rev-parse --abbrev-ref HEAD
fi

if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
if [ "$1" = '-sh' -o "$1" = '--sh' -o "$1" = '-buildsh' -o "$1" = '--buildsh' ]; then
# AUTHORS:
# - Carl Witty and William Stein: initial version
# - Craig Citro: add options for not loading profile
# - Martin Albrecht: fix zshell prompt (#11866)
# - John Palmieri: shorten the prompts, and don't print messages if
# there are more arguments to 'sage -sh' (#11790)
if [ -z "$SAGE_SHPROMPT_PREFIX" ]; then
SAGE_SHPROMPT_PREFIX=sage-sh
fi
if [ "$1" = '-buildsh' -o "$1" = '--buildsh' ]; then
if [ ! -r "$SAGE_ROOT"/build/bin/sage-build-env-config ]; then
echo "error: '$SAGE_ROOT' does not contain build/bin/sage-build-env-config. Run configure first."
exit 1
fi
. "$SAGE_ROOT"/build/bin/sage-build-env-config || (echo "error: Error sourcing $SAGE_ROOT/build/bin/sage-build-env-config"; exit 1)
export SAGE_SHPROMPT_PREFIX=sage-buildsh
# We export it so that recursive invocation of 'sage-sh' from a sage-buildsh shows the sage-buildsh prompt;
# this makes sense because all environment variables set in build/bin/sage-build-env-config are exported.
fi
shift
# If $SHELL is unset, default to bash
if [ -z "$SHELL" ]; then
Expand All @@ -693,9 +709,9 @@ if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
bash)
SHELL_OPTS="--norc"
if [ "$color_prompt" = yes ]; then
PS1="\[$(tput rev)\](sage-sh)\[$(tput sgr0)\] \u@\h:\W\$ "
PS1="\[$(tput rev)\]($SAGE_SHPROMPT_PREFIX)\[$(tput sgr0)\] \u@\h:\W\$ "
else
PS1="(sage-sh) \u@\h:\w\$ "
PS1="($SAGE_SHPROMPT_PREFIX) \u@\h:\w\$ "
fi
export PS1
;;
Expand All @@ -708,9 +724,9 @@ if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
ksh)
SHELL_OPTS="-p"
if [ "$color_prompt" = yes ] ; then
PS1="$(tput rev)(sage-sh)$(tput sgr0) $USER@`hostname -s`:\${PWD##*/}$ "
PS1="$(tput rev)($SAGE_SHPROMPT_PREFIX)$(tput sgr0) $USER@`hostname -s`:\${PWD##*/}$ "
else
PS1="(sage-sh) $USER@`hostname -s`:\${PWD##*/}$ "
PS1="($SAGE_SHPROMPT_PREFIX) $USER@`hostname -s`:\${PWD##*/}$ "
fi
export PS1
;;
Expand All @@ -719,9 +735,9 @@ if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
# bash, but this is not guaranteed), so we don't set
# SHELL_OPTS.
if [ "$color_prompt" = yes ] ; then
PS1="$(tput rev)(sage-sh)$(tput sgr0) $USER@`hostname -s`:\${PWD##*/}$ "
PS1="$(tput rev)($SAGE_SHPROMPT_PREFIX)$(tput sgr0) $USER@`hostname -s`:\${PWD##*/}$ "
else
PS1="(sage-sh) $USER@`hostname -s`:\${PWD}$ "
PS1="($SAGE_SHPROMPT_PREFIX) $USER@`hostname -s`:\${PWD}$ "
fi
export PS1
;;
Expand All @@ -732,7 +748,7 @@ if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
SHELL_OPTS="-f"
;;
zsh)
PS1="%S(sage-sh)%s %n@%m:%~$ "
PS1="%S($SAGE_SHPROMPT_PREFIX)%s %n@%m:%~$ "
# In zsh, the system /etc/zshenv is *always* run,
# and this may change the path (like on OSX), so we'll
# create a temporary .zshenv to reset the path
Expand All @@ -744,7 +760,7 @@ EOF
export PS1
;;
*)
export PS1='(sage-sh) $ '
export PS1='($SAGE_SHPROMPT_PREFIX) $ '
;;
esac
if [ -n "$oldPS1" ]; then
Expand Down
1 change: 0 additions & 1 deletion src/bin/sage-env
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ fi
# depending on SAGE_ROOT and SAGE_LOCAL which are already defined.
export SAGE_ETC="$SAGE_LOCAL/etc"
export SAGE_SHARE="$SAGE_LOCAL/share"
export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
export SAGE_PKGCONFIG="$SAGE_LOCAL/lib/pkgconfig"
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
Expand Down
Loading

0 comments on commit 13088e3

Please sign in to comment.