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.beta2' into t/29053/installation_manual__generate__apt…
Browse files Browse the repository at this point in the history
…_get_install__and__yum_install__lines_from_build_pkgs_at___bootstrap_time

SageMath version 9.1.beta2, Release Date: 2020-01-26
  • Loading branch information
mkoeppe committed Jan 27, 2020
2 parents 7e59a6f + 2cbd93e commit 2ad9a97
Show file tree
Hide file tree
Showing 118 changed files with 10,370 additions and 1,036 deletions.
5 changes: 5 additions & 0 deletions .lgtm.yml
Expand Up @@ -6,6 +6,11 @@ path_classifiers:
imports_only:
- "**/all.py"
- "**/*catalog*.py"
- "**/species/library.py"
- "**/matroids/advanced.py"
- "**/categories/basic.py"
- "**/interacts/geometry.py"
- "**/combinat/ribbon.py"
extraction:
python:
python_setup:
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
@@ -1 +1 @@
SageMath version 9.1.beta1, Release Date: 2020-01-21
SageMath version 9.1.beta2, Release Date: 2020-01-26
2 changes: 1 addition & 1 deletion bootstrap
Expand Up @@ -75,7 +75,7 @@ install_config_rpath() {
bootstrap () {
rm -f m4/sage_spkg_configures.m4
spkg_configures=""
for filename in $(find build/pkgs -type f -name spkg-configure.m4); do
for filename in $(find build/pkgs -type f -name spkg-configure.m4 | sort); do
pkgname="$(echo $filename | cut -d/ -f3)"
echo "m4_sinclude([$filename])" >> m4/sage_spkg_configures.m4
spkg_configures="$spkg_configures
Expand Down
1 change: 1 addition & 0 deletions build/make/deps
Expand Up @@ -170,6 +170,7 @@ sagelib: \
$(inst_ratpoints) \
$(inst_readline) \
$(inst_rw) \
$(inst_sage_conf) \
$(inst_singular) \
$(inst_six) \
$(inst_symmetrica) \
Expand Down
35 changes: 24 additions & 11 deletions build/make/install
Expand Up @@ -72,38 +72,51 @@ The following package(s) may have failed to build (not necessarily
during this run of 'make $@'):
EOF

for f in "$SAGE_LOGS"/*.log; do
# Sort in chronological order by log file.
for f in `ls -tr "$SAGE_LOGS"/*.log 2>/dev/null`; do
# Look for recent error message in log file.
# Note that "tail -n 20 ..." doesn't work on Solaris.
if tail -20 "$f" 2>/dev/null | grep "^Error" &>/dev/null; then
base_f=`basename $f .log`
# stat(1) is not portable between Linux and macOS, so we extract it from ls -lf
timestamp=`ls -l $f | awk -F' ' '{print $6, $7, $8}'` 2> /dev/null
cat >&2 <<EOF
* package: $base_f
log file: $f
build directory: ${SAGE_BUILD_DIR:-$SAGE_LOCAL/var/tmp/sage/build}/$base_f
* package: $base_f
last build time: $timestamp
log file: $f
EOF
build_dir="${SAGE_BUILD_DIR:-$SAGE_LOCAL/var/tmp/sage/build}/$base_f"
if [ -d "$build_dir" ]; then
cat >&2 <<EOF
build directory: $build_dir
EOF
fi
fi
done

for f in "$SAGE_LOGS"/../doc*.log; do
for f in `ls -tr "$SAGE_LOGS"/../doc*.log 2>/dev/null`; do
# Look for recent error message in log file.
# Note that "tail -n 20 ..." doesn't work on Solaris.
if tail -100 "$f" 2>/dev/null | grep "^Error" &>/dev/null; then
base_f=`basename $f .log`
# stat(1) is not portable between Linux and macOS, so we extract it from ls -lf
timestamp=`ls -l $f | awk -F' ' '{print $6, $7, $8}'` 2> /dev/null
cat >&2 <<EOF
* documentation: $base_f
log file: $f
* documentation: $base_f
last build time: $timestamp
log file: $f
EOF
fi
done
cat >&2 <<EOF
The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.
EOF
exit 1
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=029fe778cefcb82231353c0dab72a75769ffdcf9
md5=b4231b3e4ce67fc656ba9532b123485a
cksum=3808756319
sha1=bbd3a48fc6eb8028e3a868f51d0412a564e4ec78
md5=d90a07adfc2c87e48c9b8c54bc3d3b33
cksum=1392125278
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
@@ -1 +1 @@
4fd5d56ecea2c81d58e9e43bd5f07b05e863bc7c
fb9218e13b0d6e9ddfd7453d41e8111780b40214
6 changes: 3 additions & 3 deletions build/pkgs/m4ri/checksums.ini
@@ -1,4 +1,4 @@
tarball=m4ri-VERSION.tar.gz
sha1=87d9ad087938f32ada502b12991f02f4e20224ff
md5=91d964b6c6754499da81277433605199
cksum=4106591812
sha1=7d0d680f1e983c1d5b24e49f25194e2f327690b4
md5=3fb6a27437bf535128d605fe47c8fae8
cksum=1002661464
2 changes: 1 addition & 1 deletion build/pkgs/m4ri/package-version.txt
@@ -1 +1 @@
20140914.p0
20200115
76 changes: 76 additions & 0 deletions build/pkgs/m4ri/patches/mzd_fix.patch
@@ -0,0 +1,76 @@
diff --git a/m4ri/mzd.c b/m4ri/mzd.c
index 861905c..922dc3c 100644
--- a/m4ri/mzd.c
+++ b/m4ri/mzd.c
@@ -1894,7 +1894,7 @@ mzd_t *mzd_submatrix(mzd_t *S, mzd_t const *M, rci_t const startrow, rci_t const
} else {
wi_t j;
for(rci_t i=0; i<nrows; i++) {
- for(j=0; j+m4ri_radix<=ncols; j+=m4ri_radix)
+ for(j=0; j+m4ri_radix<ncols; j+=m4ri_radix)
S->rows[i][j/m4ri_radix] = mzd_read_bits(M, startrow+i, startcol+j, m4ri_radix);
S->rows[i][j/m4ri_radix] &= ~S->high_bitmask;
S->rows[i][j/m4ri_radix] |= mzd_read_bits(M, startrow+i, startcol+j, ncols - j) & S->high_bitmask;
diff --git a/tests/test_misc.c b/tests/test_misc.c
index a9a9547..b1a2e32 100644
--- a/tests/test_misc.c
+++ b/tests/test_misc.c
@@ -76,6 +76,31 @@ int test_png(rci_t m, rci_t n) {
return ret;
}

+int test_submatrix(const rci_t m, const rci_t n, const rci_t lowr, const rci_t lowc, const rci_t highr, const rci_t highc) {
+ printf("submatrix: m: %4d, n: %4d, (%4d, %4d, %4d, %4d)", m, n, lowr, lowc, highr, highc);
+ assert(highr-lowr > 0);
+ assert(highc-lowc > 0);
+ mzd_t *M = mzd_init(m, n);
+ mzd_randomize(M);
+ mzd_t *S = mzd_init(highr-lowr, highc-lowc);
+ mzd_submatrix(S, M, lowr, lowc, highr, highc);
+ int ret = 0;
+ for(rci_t i=0; i<highr-lowr; i++) {
+ for(rci_t j=0; j<highc-lowc; j++) {
+ ret += (mzd_read_bit(M, lowr+i, lowc+j) ^ mzd_read_bit(S, i, j));
+ }
+ }
+
+ mzd_free(M);
+ mzd_free(S);
+
+ if(ret==0) {
+ printf(" ... passed\n");
+ } else {
+ printf(" ... FAILED\n");
+ }
+ return ret;
+}

int main(int argc, char *argv[]) {
int status = 0;
@@ -99,6 +124,23 @@ int main(int argc, char *argv[]) {
status += test_png(126,12);
status += test_png(128,200);

+ status += test_submatrix(2, 127, 1, 1, 2, 127);
+ status += test_submatrix(2, 128, 1, 1, 2, 128);
+ status += test_submatrix(2, 129, 1, 1, 2, 129);
+ status += test_submatrix(2, 130, 1, 1, 2, 130);
+ status += test_submatrix(2, 131, 1, 1, 2, 131);
+
+ status += test_submatrix(2, 63, 1, 1, 1, 63);
+ status += test_submatrix(2, 64, 1, 1, 1, 64);
+ status += test_submatrix(2, 65, 1, 1, 1, 65);
+ status += test_submatrix(2, 66, 1, 1, 1, 66);
+ status += test_submatrix(2, 67, 1, 1, 1, 67);
+
+ status += test_submatrix(2, 127, 1, 63, 2, 127);
+ status += test_submatrix(2, 128, 1, 64, 2, 128);
+ status += test_submatrix(2, 129, 1, 65, 2, 129);
+ status += test_submatrix(2, 130, 1, 66, 2, 130);
+
if (!status) {
printf("All tests passed.\n");
} else {
--
2.10.5

18 changes: 0 additions & 18 deletions build/pkgs/m4ri/patches/sizeof_mzd_t.patch

This file was deleted.

6 changes: 3 additions & 3 deletions build/pkgs/m4rie/checksums.ini
@@ -1,4 +1,4 @@
tarball=m4rie-VERSION.tar.gz
sha1=d0c5407046131184fc34056d478c8b4e9e22bb1a
md5=c2c04cbfcc5d56ffdeb5133109272b8c
cksum=1547829740
sha1=728524509dd30da2dc960814b61d0bae67f83043
md5=e7685c63e7bab4c5a0922a161499ba83
cksum=127676695
2 changes: 1 addition & 1 deletion build/pkgs/m4rie/package-version.txt
@@ -1 +1 @@
20150908.p0
20200115
20 changes: 20 additions & 0 deletions build/pkgs/planarity/spkg-configure.m4
@@ -0,0 +1,20 @@
SAGE_SPKG_CONFIGURE([planarity], [
AC_LANG_PUSH([C])
AC_CHECK_HEADER([planarity/planarity.h], [
AC_CHECK_LIB([planarity], [gp_InitGraph], [
AC_MSG_CHECKING([for planarity version 3.0 or later])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <planarity/graphStructures.h>]],
[[vertexRec v;]
[v.link[0]=1;]])
], [
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
sage_spkg_install_planarity=yes
])
], [sage_spkg_install_planarity=yes])
], [sage_spkg_install_planarity=yes])
AC_LANG_POP()
])
2 changes: 2 additions & 0 deletions build/pkgs/sage_conf/README.rst
@@ -0,0 +1,2 @@
This is a module that provides configuration information to sagelib
at the time of its installation and at its runtime.
1 change: 1 addition & 0 deletions build/pkgs/sage_conf/dependencies
@@ -0,0 +1 @@
$(PYTHON) ../pkgs/sage_conf/src/sage_conf.py ../pkgs/sage_conf/src/setup.cfg | pip setuptools
12 changes: 12 additions & 0 deletions build/pkgs/sage_conf/spkg-install
@@ -0,0 +1,12 @@
#! /usr/bin/env bash
# From sage-spkg.
# For type=script packages, the build rule in build/make/Makefile sources
# sage-env but not sage-dist-helpers.
lib="$SAGE_ROOT/build/bin/sage-dist-helpers"
source "$lib"
if [ $? -ne 0 ]; then
echo >&2 "Error: failed to source $lib"
echo >&2 "Is $SAGE_ROOT the correct SAGE_ROOT?"
exit 1
fi
cd $SAGE_ROOT/build/pkgs/sage_conf/src && sdh_pip_install .
2 changes: 2 additions & 0 deletions build/pkgs/sage_conf/src/.gitignore
@@ -0,0 +1,2 @@
/sage_conf.py
/setup.cfg
31 changes: 31 additions & 0 deletions build/pkgs/sage_conf/src/sage_conf.py.in
@@ -0,0 +1,31 @@
# @configure_input@

VERSION = "@PACKAGE_VERSION@"

MAXIMA = "@prefix@/bin/maxima"

# The following must not be used during build to determine source or installation
# location of sagelib. See comments in SAGE_ROOT/src/Makefile.in
SAGE_LOCAL = "@prefix@"
SAGE_ROOT = "@abs_top_srcdir@"

# Entry point 'sage-config'. It does not depend on any packages.

def _main():
from argparse import ArgumentParser
from sys import exit, stdout
parser = ArgumentParser()
parser.add_argument('--version', help="show version", action="version",
version='%(prog)s ' + VERSION)
parser.add_argument("VARIABLE", nargs='?', help="output the value of VARIABLE")
args = parser.parse_args()
d = globals()
if args.VARIABLE:
stdout.write('{}\n'.format(d[args.VARIABLE]))
else:
for k, v in d.items():
if not k.startswith('_'):
stdout.write('{}={}\n'.format(k, v))

if __name__ == "__main__":
_main()
19 changes: 19 additions & 0 deletions build/pkgs/sage_conf/src/setup.cfg.in
@@ -0,0 +1,19 @@
# @configure_input@

[metadata]
name = sage_conf
version = @PACKAGE_VERSION@
description = Sage: Open Source Mathematics Software: Configuration for sagelib
long_description = file: README.rst
license = GNU General Public License (GPL) v3 or later
author = The Sage Developers
author_email = https://groups.google.com/group/sage-support
url = https://www.sagemath.org

[options]
py_modules =
sage_conf

[options.entry_points]
console_scripts =
sage-config = sage_conf:_main
2 changes: 2 additions & 0 deletions build/pkgs/sage_conf/src/setup.py
@@ -0,0 +1,2 @@
from setuptools import setup
setup()
1 change: 1 addition & 0 deletions build/pkgs/sage_conf/type
@@ -0,0 +1 @@
script
34 changes: 34 additions & 0 deletions build/pkgs/sqlite/spkg-configure.m4
@@ -0,0 +1,34 @@
SAGE_SPKG_CONFIGURE([sqlite], [
m4_pushdef([SAGE_SQLITE3_MIN_VERSION_MAJOR], [3])
m4_pushdef([SAGE_SQLITE3_MIN_VERSION_MINOR], [8])
m4_pushdef([SAGE_SQLITE3_MIN_VERSION_MICRO], [7])
m4_pushdef([SAGE_SQLITE3_MIN_VERSION], [SAGE_SQLITE3_MIN_VERSION_MAJOR.SAGE_SQLITE3_MIN_VERSION_MINOR.SAGE_SQLITE3_MIN_VERSION_MICRO])
AC_MSG_CHECKING([libsqlite3 >= sqlite3_min_version])
dnl https://www.sqlite.org/c3ref/libversion.html
dnl https://www.sqlite.org/c3ref/c_source_id.html
SQLITE_SAVED_LIBS="$LIBS"
LIBS="$LIBS -lsqlite3"
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <sqlite3.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
]],
[[
assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
if (SQLITE_VERSION_NUMBER < ]]SAGE_SQLITE3_MIN_VERSION_MAJOR[[*1000000 + ]]SAGE_SQLITE3_MIN_VERSION_MINOR[[*1000 + ]]SAGE_SQLITE3_MIN_VERSION_MICRO[[)
exit(1);
else
exit(0);
]])
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
LIBS="$SQLITE_SAVED_LIBS"
sage_spkg_install_sqlite=yes])
m4_popdef([SAGE_SQLITE3_MIN_VERSION_MAJOR])
m4_popdef([SAGE_SQLITE3_MIN_VERSION_MINOR])
m4_popdef([SAGE_SQLITE3_MIN_VERSION_MICRO])
m4_popdef([SAGE_SQLITE3_MIN_VERSION])
])
2 changes: 1 addition & 1 deletion build/pkgs/tides/spkg-check
@@ -1,2 +1,2 @@
cd src
$MAKE check
sdh_make check AM_CFLAGS="" AM_FFLAGS=""
8 changes: 3 additions & 5 deletions build/sage_bootstrap/download/app.py
Expand Up @@ -4,18 +4,16 @@
"""


#*****************************************************************************
# ****************************************************************************
# Copyright (C) 2016 Volker Braun <vbraun.name@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/
#*****************************************************************************
# https://www.gnu.org/licenses/
# ****************************************************************************

import os
import sys
import logging
log = logging.getLogger()

Expand Down

0 comments on commit 2ad9a97

Please sign in to comment.