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/27445/gb-no-var' into t/27328/cache-groebner
Browse files Browse the repository at this point in the history
* t/27445/gb-no-var: (945 commits)
  Trac #27445: polynomial rings over non-fields + major restructure of relevant code
  Updated SageMath version to 8.7
  Updated SageMath version to 8.7.rc0
  Trac #27490: Moved the alternate build_many implementation into a sage_setup.docbuild.utils module.
  Trac #27490: Further fixes in use of os.wait()
  Trac #27214: Patch GAP to allocate its memory pool using MAP_NORESERVE on Cygwin
  Trac #27490: Address some review comments and other cleanup:
  A little bit of import cleanup
  Trac #27490: Simplistic multiprocessing.Pool replacement for parallel docbuild on older Cygwin
  Fix alarm() test when cysignals was compiled with debugging
  Trac #27485: Use sdh_cmake in the spkg-install for primecount.
  Trac #27484: Add shd_cmake helper for running cmake with the correct flags for building Sage SPKGs.
  cysignals should be a normal dependency
  Upgrade to Cysignals 1.10.2
  Upgrade to notebook-5.7.6
  Trac #27461: Add abs tol on this test to account for minor numerical difference on Cygwin due to libm differences.
  Replacing None < infinity comparison with equivalent code.
  Some last little tidbits for uniformity.
  Removing some code duplication for __pth_root (changed to _pth_root_func).
  One more xderinv added.
  ...
  • Loading branch information
dkrenn committed Mar 28, 2019
2 parents 8acaaf1 + df26e69 commit eaaa150
Show file tree
Hide file tree
Showing 1,121 changed files with 36,609 additions and 19,481 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ build/make/Makefile: configure build/make/deps build/make/Makefile.in build/pkgs
fi; )

# This is used to monitor progress towards Python 3 and prevent
# regressions. The target "build" should be upgraded to reflect the
# level of Python 3 support that is known to work.
# regressions.
buildbot-python3: configure
./configure --with-python=3
$(MAKE) build
$(MAKE)

# Preemptively download all standard upstream source tarballs.
download:
Expand Down Expand Up @@ -144,6 +143,7 @@ fast-rebuild-clean: misc-clean bdist-clean

TESTALL = ./sage -t --all
PTESTALL = ./sage -t -p --all
PTEST_PYTHON3 = cat src/ext/doctest/python3-known-passing.txt | xargs ./sage -t --long -p

# Flags for ./sage -t --all.
# By default, include all tests marked 'dochtml' -- see
Expand Down Expand Up @@ -189,6 +189,9 @@ ptestoptional: all
ptestoptionallong: all
$(PTESTALL) --long --logfile=logs/ptestoptionallong.log

ptest-python3: buildbot-python3
$(PTEST_PYTHON3) --logfile=logs/ptest_python3.log

configure: configure.ac src/bin/sage-version.sh m4/*.m4 build/pkgs/*/spkg-configure.m4
./bootstrap -d

Expand All @@ -209,4 +212,4 @@ list:
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
test check testoptional testall testlong testoptionallong testallong \
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
buildbot-python3 list
buildbot-python3 ptest-python3 list
73 changes: 51 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ and functions list the authors.
Getting Started
---------------

If you downloaded a [binary](http://www.sagemath.org/download.html),
you just need open a terminal in the directory where you extracted the binary
archive and type:
If you downloaded a [binary](http://www.sagemath.org/download.html)
(i.e. a version of SageMath prepared for a specific operating system),
Sage is ready to start -- just open a terminal in the directory where
you extracted the binary archive and type:

./sage

Expand Down Expand Up @@ -148,45 +149,73 @@ More Detailed Instructions to Build from Source
gas/as, gld/ld, gnm/nm. On most platforms, these are automatically
installed when you install the programs listed above.

1. Extract the Sage source tarball and cd into a directory with no
spaces in it. If you have a machine with 4 processors, say, type
`export MAKE="make -j4"` the following to configure the build script to
perform a parallel compilation of Sage using 4 jobs.
(With 4 processors, you might also consider `-j5` or `-j6` --
building with more jobs than CPU cores can speed things up.)
1. Extract the Sage source tarball into a directory, making sure
there are no spaces in the path to the resulting directory.

Note that moving the directory after Sage has been built will
require to build Sage again.

1. Change to the Sage directory using `cd`.

1. Optional: set some environment variables to customize the build.

For example, the `MAKE` environment variable controls whether to run
several jobs in parallel, while the `SAGE_CHECK` environment variable
controls whether to perform more tests during the installation. For
an in-depth discussion of environment variables for building Sage, see
[the installation guide](http://doc.sagemath.org/html/en/installation/source.html#environment-variables).

On a machine with 4 processors, say, typing `export MAKE="make -j4"`
will configure the build script to perform a parallel compilation of
Sage using 4 jobs. You might even consider `-j5` or `-j6`, as
building with more jobs than CPU cores can speed things up further.
You might in addition pass a `-l` [load flag](https://www.gnu.org/software/make/manual/make.html#Options-Summary)
to "make": this sets a load limit, so for example if you execute
to `make`: this sets a load limit, so for example if you execute
`export MAKE="make -j4 -l5.5"` then "make" won't start more than one
job at a time if the system load average is above 5.5, see
the [make documentation](https://www.gnu.org/software/make/manual/make.html#Parallel).

If you want to run the test suite for each individual spkg as it is
installed, type `export SAGE_CHECK="yes"` before starting the Sage
build. This will run each test suite and will raise an error if any
failures occur. Python's test suite has been disabled by default,
because it causes failures on most systems. To enable the Python
testsuite, set the environment variable `SAGE_CHECK_PACKAGES` to `python`.
If you want to run the test suite for each individual Sage package
as it gets installed, type `export SAGE_CHECK="yes"`. This will run
each test suite, raising an error if any failure occurs. Python's
test suite has been disabled by default, because it causes failures
on most systems. To enable the Python test suite, set the environment
variable `SAGE_CHECK_PACKAGES` to `python`.

To start the build, type `make`.
1. To start the build, type `make`.

Note: to build a Python3-based Sage, instead of typing `make`, type

make configure
./configure --with-python=3
make

This will build Sage based on Python 3 rather than based on Python 2,
which is still the default at this point. The resulting Sage mostly
works well, though some features (less of them at each release!) are
not yet ready for Python 3. The progress on this is tracked at
[Sage Trac ticket 15530: Metaticket: Add support for python 3.6+](https://trac.sagemath.org/ticket/15530).

1. Wait about 20 minutes to 14 days, depending on your computer (it took
about 2 weeks to build Sage on the T-Mobile G1 Android cell phone).

1. Type `./sage` to try it out.

1. Optional: Type `make ptest` to test all examples in the documentation
1. Optional: Type `make ptestlong` to test all examples in the documentation
(over 200,000 lines of input!) -- this takes from 10 minutes to
several hours. Don't get too disturbed if there are 2 to 3 failures,
but always feel free to email the section of `logs/ptest.log` that
but always feel free to email the section of `logs/ptestlong.log` that
contains errors to the [sage-support mailing list](https://groups.google.com/group/sage-support).
If there are numerous failures, there was a serious problem with your build.

Note: if you built for Python 3, you can instead run `make ptest-python3`.

1. The HTML version of the [documentation](http://doc.sagemath.org/html/en/index.html)
is built during the compilation process of Sage and resides in the directory
`local/share/doc/sage/html/`.

* Optional: If you want to build the PDF version (requires LaTeX)
of the documentation, run `make doc-pdf`.
1. Optional: If you want to build the PDF version of the documentation,
run `make doc-pdf` (this requires LaTeX to be installed).

1. Optional: You might install optional packages of interest to you: type
`./sage --optional` to get a list.
Expand Down Expand Up @@ -335,7 +364,7 @@ source tree goes something like this:

1. `make python2`
1. run `./bootstrap` if `configure` does not exist
1. run `./configure` if `build/make/Makefile` doe not exist
1. run `./configure` if `build/make/Makefile` does not exist
1. `cd` into `build/make` and run the `install` script--this is little more
than a front-end to running `make -f build/make/Makefile python2`, which
sets some necessary environment variables and logs some information
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 8.6, Release Date: 2019-01-15
SageMath version 8.7, Release Date: 2019-03-23
4 changes: 3 additions & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
case $st in
0) true;; # Success

63|127) # Autotools not installed or version too old
16|63|127) # no m4 for pkg-config, or autotools not installed, or version too old
if [ $DOWNLOAD = yes ]; then
echo >&2 "Bootstrap failed, downloading required files instead."
bootstrap-download || exit $?
else
if [ $st -eq 127 ]; then
verb="install"
elif [ $st -eq 16 ]; then
verb="install pkg-config m4 macros for"
else
verb="upgrade"
fi
Expand Down
21 changes: 19 additions & 2 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ __EOF__
}


WRAPPED_SCRIPTS="build install check postinst legacy-uninstall prerm postrm"
WRAPPED_SCRIPTS="build install check preinst postinst legacy-uninstall prerm postrm"
INSTALLED_SCRIPTS="prerm postrm"


Expand Down Expand Up @@ -850,6 +850,15 @@ if [ "$KEEP_EXISTING" != "yes" ]; then
sage-spkg-uninstall "$PKG_BASE"
fi

# Run the pre-install script, if any
if [ -f spkg-preinst ]; then
echo "Running pre-install script for $PKG_NAME."
time $SAGE_SUDO ./spkg-preinst
if [ $? -ne 0 ]; then
error_msg "Error running the preinst script for $PKG_NAME."
exit 1
fi
fi

if [ -f spkg-build ]; then
# Package has both spkg-build and spkg-install; execute the latter with SAGE_SUDO
Expand Down Expand Up @@ -976,7 +985,15 @@ if [ "$SAGE_CHECK" = "yes" ]; then
fi
fi

FILE_LIST="$(echo "$FILE_LIST" | sed 's/^\(.\+\)$/"\1"/; 2,$s/^/ /; $!s/$/,/')"
# For each line in $FILE_LIST, enclose in double quotes:
NEW_LIST=""
for f in $FILE_LIST; do
NEW_LIST+="\"$f\"
"
done
# Now remove the last line (it's blank), indent each line (skipping
# the first) and append a comma (skipping the last).
FILE_LIST="$(echo "$NEW_LIST" | sed '$d' | sed '2,$s/^/ /; $!s/$/,/')"

# Mark that the new package has been installed (and tested, if
# applicable).
Expand Down
14 changes: 6 additions & 8 deletions build/make/deps
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@ all-build: toolchain-deps


# The 2 preliminary build phases: base and toolchain.
# During the toolchain build, we export SAGE_BUILD_TOOLCHAIN=yes
# such that packages can do different things when they are built
# as prerequisite of GCC.
base-toolchain: _clean-broken-gcc base
env SAGE_BUILD_TOOLCHAIN=yes $(MAKE) toolchain
$(MAKE) toolchain

# All targets except for the base packages
all-sage: \
Expand Down Expand Up @@ -127,7 +124,7 @@ base: $(inst_patch) $(inst_pkgconf)
# dependencies for Cython files (e.g. PARI, NTL, MP_LIBRARY).
sagelib: \
$(inst_arb) \
$(BLAS) \
$(inst_$(BLAS)) \
$(inst_brial) \
$(inst_cliquer) \
$(inst_cypari) \
Expand All @@ -141,6 +138,7 @@ sagelib: \
$(inst_gap) \
$(inst_givaro) \
$(inst_glpk) \
$(inst_gmpy2) \
$(inst_gsl) \
$(inst_iml) \
$(inst_jinja2) \
Expand All @@ -156,18 +154,18 @@ sagelib: \
$(inst_mpc) \
$(inst_mpfi) \
$(inst_mpfr) \
$(MP_LIBRARY) \
$(inst_$(MP_LIBRARY)) \
$(inst_ntl) \
$(inst_numpy) \
$(inst_pari) \
$(inst_pip) \
$(inst_pkgconfig) \
$(inst_planarity) \
$(inst_ppl) \
$(inst_pplpy) \
$(inst_pycygwin) \
$(inst_pynac) \
$(inst_python2) \
$(inst_python3) \
$(inst_$(PYTHON)) \
$(inst_ratpoints) \
$(inst_readline) \
$(inst_rw) \
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/4ti2/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.7
1.6.7.p0
21 changes: 4 additions & 17 deletions build/pkgs/4ti2/spkg-install
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
cd src/

if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";
echo "Maybe run 'sage -sh'?"
exit 1
fi

CFLAGS="-I $SAGE_LOCAL/include -L$SAGE_LOCAL/lib $CFLAGS"
export CFLAGS
./configure --prefix=$SAGE_LOCAL --with-gmp=$SAGE_LOCAL --with-glpk=$SAGE_LOCAL --enable-shared=yes --enable-static=no

$MAKE
$SAGE_SUDO $MAKE install

if [ $? -ne 0 ]; then
echo "Error building 4ti2"
exit 1
fi

sdh_configure --with-gmp=$SAGE_LOCAL --with-glpk=$SAGE_LOCAL \
--enable-shared=yes --enable-static=no
sdh_make
sdh_make_install
6 changes: 3 additions & 3 deletions build/pkgs/alabaster/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=alabaster-VERSION.tar.gz
sha1=dba599faf1ca5541ef35ab251eb2b365ae2f25c7
md5=7934dccf38801faa105f6e7b4784f493
cksum=3227702678
sha1=36c11bd5d8e99e2009b643b7f6e91bf2a0fd573b
md5=3591827fde96d1dd23970fb05410ed04
cksum=3567264444
2 changes: 1 addition & 1 deletion build/pkgs/alabaster/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.10
0.7.12
6 changes: 3 additions & 3 deletions build/pkgs/arb/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=arb-VERSION.tar.gz
sha1=42c4720675d7fc40d2f6af9de06407c00775b8f2
md5=35855176fc2c2e69e4b4c3cde004c070
cksum=745812142
sha1=cdbb3d63034a39f22f850def9bd365f7073f620a
md5=17816f8aa027a5e7fb8b5e62b2b40ce4
cksum=577630044
2 changes: 1 addition & 1 deletion build/pkgs/arb/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.15.1
2.16.0.p0
20 changes: 4 additions & 16 deletions build/pkgs/arb/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,8 @@ cd src
export EXTRA_SHARED_FLAGS=$LDFLAGS

./configure --disable-static --prefix="$SAGE_LOCAL" --with-flint="$SAGE_LOCAL" \
--with-gmp="$SAGE_LOCAL" --with-mpfr="$SAGE_LOCAL"
if [ $? -ne 0 ]; then
echo >&2 "Error configuring arb."
exit 1
fi
--with-gmp="$SAGE_LOCAL" --with-mpfr="$SAGE_LOCAL" || \
sdh_die "Error configuring arb."

$MAKE verbose
if [ $? -ne 0 ]; then
echo >&2 "Error building arb."
exit 1
fi

$MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing arb."
exit 1
fi
sdh_make verbose
sdh_make_install
7 changes: 6 additions & 1 deletion build/pkgs/atlas/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@

from __future__ import print_function

import platform, os, sys, time, shutil, glob, subprocess
import platform
import os
import sys
import shutil
import glob
import subprocess


# this dictionary will hold all configuration information
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/atlas/spkg-install.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ def is_atlas_lib_path(path, libs):
sys.exit(2)

for fname in os.listdir(ATLAS_LIB):
if fname.startswith(prefix+'f77blas'):
if fname.startswith(prefix + 'f77blas'):
f77blas = os.path.join(ATLAS_LIB, fname)
break
else:
f77blas = None
if f77blas is not None:
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/babel/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=Babel-VERSION.tar.gz
sha1=9adbd49864392713c6a3080aeb0a9e6432577277
md5=60228b3ce93a203357158b909afe8ae1
cksum=2035941902
sha1=6aed99e4fb8a2a75de7815599f610cdcbb81e3c2
md5=c384ac03026e8fe6f9b90f55201f1bff
cksum=3805303136
2 changes: 1 addition & 1 deletion build/pkgs/babel/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.1
2.6.0
6 changes: 3 additions & 3 deletions build/pkgs/backports_functools_lru_cache/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=backports.functools_lru_cache-VERSION.tar.gz
sha1=8a546e7887e961c2873c9b053f4e2cd2a96bd71d
md5=b954e7d5e2ca0f0f66ad2ed12ba800e5
cksum=2013684405
sha1=35a5895d22875cd024694d3c7393a793e9fd653d
md5=20f53f54cd3f04b3346ce75a54959754
cksum=4241725171
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4
1.5
6 changes: 3 additions & 3 deletions build/pkgs/bleach/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=bleach-VERSION.tar.gz
sha1=ed09e5428b8a47d57e232457ad944119ce9cba06
md5=47fb1e6a6fd82ca84c0e9fd1023321e6
cksum=1206011431
sha1=e7ee75050ccace055d5040010e3fdfb8e2535a3a
md5=f042c4e8a953824dc8511f535daa20a4
cksum=3095652578
2 changes: 1 addition & 1 deletion build/pkgs/bleach/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.3
3.0.2
Loading

0 comments on commit eaaa150

Please sign in to comment.