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

Commit

Permalink
Merge branch 'develop' into 8829
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCremona committed Aug 6, 2017
2 parents 9d66f35 + 74b0302 commit a2f5023
Show file tree
Hide file tree
Showing 2,488 changed files with 150,957 additions and 73,325 deletions.
3 changes: 3 additions & 0 deletions COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ free open source license as defined at http://www.opensource.org/.
The whole Sage software distribution is licensed under the General
Public License, version 3 (no other versions!).

All Sage documentation is licensed under Creative Commons 3.0 BY-SA
License.

Some of the code available in *optional* Sage packages (not included
in sage-*.tar) are licensed under more restrictive conditions.

Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ distclean: build-clean
$(MAKE) misc-clean
@echo "Deleting all remaining output from build system ..."
rm -rf local
rm -f src/bin/sage-env-config

# Delete all auto-generated files which are distributed as part of the
# source tarball
Expand Down Expand Up @@ -129,14 +130,14 @@ ptestoptionallong: all
configure: configure.ac src/bin/sage-version.sh m4/*.m4
./bootstrap -d

install:
install: all
@echo "******************************************************************"
@echo "The '$@' target is no longer supported:"
@echo "either build SageMath in-place or use the binary packaging scripts"
@echo "The '$@' target is a no-op; 'make' already does 'make install'"
@echo "You can change the install prefix from its default"
@echo "(the subdirectory 'local') by using ./configure --prefix=PREFIX"
@echo "You can also consider using the binary packaging scripts"
@echo "from https://github.com/sagemath/binary-pkg"
@echo "******************************************************************"
@exit 1


.PHONY: default build install micro_release \
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> "Creating a Viable Open Source Alternative to
> Magma, Maple, Mathematica, and MATLAB"
> Copyright (C) 2005-2016 The Sage Development Team
> Copyright (C) 2005-2017 The Sage Development Team
http://www.sagemath.org

Expand All @@ -21,7 +21,8 @@ Getting Started
---------------

This README.txt contains build instructions for Sage. If you downloaded
a binary, you do not need to do anything; just execute:
a binary, you do not need to do anything (as long as your system
provides a SSL library ; OpenSSL is recommended) ; just execute:

./sage

Expand Down Expand Up @@ -69,9 +70,19 @@ Installation Guide:

http://doc.sagemath.org/html/en/installation

__1. Make sure you have the dependencies and 5 GB of free disk space.__
__1. Make sure your system has an SSL library and its development
files installed.__

>* __All Linux versions:__ gcc, make, m4, perl, ranlib, and tar.
>* Like Python, on which it is based, Sage uses the OpenSSL library
for added performance if made available by the operating system. It
has been shown that Sage can be successfully built against other
SSL libraries, with some of its features disabled.

__2. Make sure you have the dependencies and 5 GB of free disk space.__

>* __All Linux versions:__ gcc, make, m4, perl, ranlib, and tar (a
matching set of gcc, gfortran and g++ will avoid the compilation
of Sage-specific compilers).__

>* __Fedora or RedHat systems:__ the perl-ExtUtils-MakeMaker package.
(install these using your package manager)
Expand All @@ -97,11 +108,11 @@ __1. Make sure you have the dependencies and 5 GB of free disk space.__

>* Other platforms: See detailed instructions below.
__2. Extract the tarball:__
__3. Extract the tarball:__

tar xvf sage-*.tar

__3. cd into the Sage directory and type make:__
__4. cd into the Sage directory and type make:__

cd sage-*/
make
Expand Down Expand Up @@ -316,7 +327,7 @@ SAGE_ROOT Root directory (sage-x.y.z in Sage tarball)
| ...
| └── zn_poly-0.9.p11.log
├── Makefile Running "make" uses this file
├── README.txt This file
├── README.md This file
├── sage Script to start Sage
├── src All of Sage source (not third-party packages)
| ├── bin Scripts that Sage uses internally
Expand Down Expand Up @@ -366,20 +377,10 @@ do.

sage --sdist

2. To make a binary distribution with your currently installed packages,
type:

sage --bdist

3. To make a binary that will run on the widest range of target
machines, set the SAGE_FAT_BINARY environment variable to "yes"
before building Sage:

export SAGE_FAT_BINARY="yes"
make distclean && make
./sage --bdist
The result is placed in the directory "$SAGE_ROOT/dist/".

In all cases, the result is placed in the directory "$SAGE_ROOT/dist/".
2. To make a binary distribution with your currently installed packages,
visit https://github.com/sagemath/binary-pkg


Changes to Included Software
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 7.5.beta6, Release Date: 2016-12-09
SageMath version 8.0, Release Date: 2017-07-21
12 changes: 8 additions & 4 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ PKG=build/pkgs/configure
MAKE="${MAKE:-make}"
CONFVERSION=`cat $PKG/package-version.txt`


bootstrap () {
# Get autotools from our own package into PATH (Trac #21214)
source src/bin/sage-env
aclocal -I m4 && \
automake --add-missing --copy build/make/Makefile-auto && \
autoconf
Expand Down Expand Up @@ -57,8 +56,7 @@ bootstrap () {

# Bootstrap by downloading the auto-generated files
bootstrap-download () {
source src/bin/sage-env
sage-download-file configure-$CONFVERSION.tar.gz
build/bin/sage-download-file configure-$CONFVERSION.tar.gz
if [ $? -ne 0 ]; then
echo >&2 "Error: downloading configure-$CONFVERSION.tar.gz failed"
exit 1
Expand Down Expand Up @@ -127,6 +125,12 @@ fi
$MAKE bootstrap-clean 2>/dev/null
mkdir config 2>/dev/null

# Get autotools from our own package into PATH (Trac #21214).
# If Sage has not been built yet, this will fail due to a missing
# sage-env-config. We just ignore that error.
source src/bin/sage-env 2>/dev/null


if [ $ALWAYSDOWNLOAD = yes ]; then
bootstrap-download || exit $?
else
Expand Down
12 changes: 9 additions & 3 deletions build/bin/sage-logger
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,18 @@ fi

mkdir -p "$logdir"

if [[ "$V" = 0 && $use_prefix = true ]]; then
# Do all logging of child processes with V=1 to ensure that no
# information is lost.
export MAKEFLAGS="$MAKEFLAGS V=1"

if [ "$V" = 0 ]; then
export SAGE_SILENT_BUILD=yes
fi

if [ -n "$SAGE_SILENT_BUILD" -a ${use_prefix} = true ]; then
# Silent build.
# Similar to https://www.gnu.org/software/automake/manual/html_node/Automake-Silent-Rules.html#Automake-Silent-Rules
echo "[$logname] installing. Log file: $logfile"
# Use verbose mode for output to logfiles.
export V=1
( exec>> $logfile 2>&1 ; eval "$cmd" )
status=$?
if [[ $status != 0 ]]; then
Expand Down
37 changes: 28 additions & 9 deletions build/bin/sage-pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# --no-deps : Don't install runtime dependencies from PyPI.
# --no-index : Don't look at the package index.
# This also disables pip's version self-check.
pip_install_flags="--ignore-installed --verbose --no-deps --no-index"
# --isolated : Don't read configuration files such as
# ~/.pydistutils.cfg
pip_install_flags="--ignore-installed --verbose --no-deps --no-index --isolated"

# Consume any additional pip install arguments except the last one
while [ $# -gt 1 ]; do
Expand All @@ -29,8 +31,18 @@ if [ "$1" != "." ]; then
exit 1
fi


if [ "$SAGE_PYTHON3" = yes ]; then
PYTHON=python3
PIP=pip3
else
PYTHON=python2
PIP=pip2
fi


# Find out the name of the package that we are installing
name="$(python setup.py --name)"
name="$($PYTHON setup.py --name)"

if [ $? -ne 0 ]; then
echo >&2 "Error: could not determine package name"
Expand All @@ -44,29 +56,36 @@ if [ $(echo "$name" | wc -l) -gt 1 ]; then
echo >&2 "line as the package name: $name"
fi

# We should avoid running pip while uninstalling a package because that

# We should avoid running pip2/3 while uninstalling a package because that
# is prone to race conditions. Therefore, we use a lockfile while
# running pip. This is implemented in the Python script pip-lock.
# running pip. This is implemented in the Python script pip2/3-lock.

# Keep uninstalling as long as it succeeds
while true; do
out=$(pip-lock uninstall --disable-pip-version-check -y "$name" 2>&1)
out=$($PIP-lock uninstall --disable-pip-version-check -y "$name" 2>&1)
if [ $? -ne 0 ]; then
break
fi
echo "$out"
done

# Not ideal, but this is the easiest way to check if the package
# was not installed to begin with (which pip treats as an error).
# was not installed to begin with (which pip2/3 treats as an error).
# If it wasn't, then we proceed quietly; if it was installed show the
# uninstallation output and error out.
if [[ "$out" != *"not installed" ]]; then
echo >&2 "$out"
exit 1
fi

# Finally actually do the installation (the "SHARED" tells pip-lock
# Finally actually do the installation (the "SHARED" tells pip2/3-lock
# to apply a shared lock)
echo "Installing package $name using pip"
exec pip-lock SHARED install $pip_install_flags .
echo "Installing package $name using $PIP"

$PIP-lock SHARED install $pip_install_flags .
if [ $? -ne 0 ]; then
echo >&2 "Error: installing with $PIP failed"
exit 3
fi

21 changes: 21 additions & 0 deletions build/bin/sage-python23
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash


# Run the Python interpreter that we are currently building Sage with
#
# An existing Python is a build-time dependency for Sage, but
# sometimes packages need to specifically run the one in Sage and not
# just any Python interpreter.
#
# This is similar to the sage-pip-install script, which you should be
# using for installing Python packages if at all possible.


if [ "$SAGE_PYTHON3" = yes ]; then
PYTHON="$SAGE_LOCAL/bin/python3"
else
PYTHON="$SAGE_LOCAL/bin/python2"
fi


exec $PYTHON "$@"
Loading

0 comments on commit a2f5023

Please sign in to comment.