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 t/16086/ignore_write_output
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpalmieri committed Apr 24, 2017
2 parents d020f64 + 2f5a28f commit 0234816
Show file tree
Hide file tree
Showing 210 changed files with 10,450 additions and 1,313 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
@@ -1 +1 @@
SageMath version 8.0.beta2, Release Date: 2017-04-12
SageMath version 8.0.beta3, Release Date: 2017-04-23
15 changes: 9 additions & 6 deletions build/bin/sage-logger
Expand Up @@ -60,14 +60,17 @@ else
SED=cat
fi

# Store the current value of V, but do all logging of child processes
# with V=1 to ensure that no information is lost.
currentV=$V
export V=1

mkdir -p "$logdir"

if [[ "$currentV" = 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"
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/brial/spkg-install
Expand Up @@ -7,7 +7,7 @@ if [ "$SAGE_LOCAL" = "" ]; then
fi

echo "Cleaning out old PolyBoRi and BRiAl installations"
rm -rf "$SAGE_LOCAL"/lib/python/site-packages/{polybori,brial}
rm -rf "$SAGE_LOCAL"/lib/python*/site-packages/{polybori,brial}
rm -f "$SAGE_LOCAL"/lib/lib{polybori,brial}*
rm -rf "$SAGE_LOCAL"/include/polybori*
rm -rf "$SAGE_LOCAL"/share/polybori
Expand Down
3 changes: 3 additions & 0 deletions build/pkgs/cmake/SPKG.txt
Expand Up @@ -25,5 +25,8 @@ CMake is distributed under the OSI-approved BSD 3-clause License.

== Dependencies ==

* curl
* zlib
* bzip2
* xz

6 changes: 3 additions & 3 deletions build/pkgs/cmake/checksums.ini
@@ -1,4 +1,4 @@
tarball=cmake-VERSION.tar.gz
sha1=fa176cc5b1ccf2e98196b50908432d0268323501
md5=d51c92bf66b1e9d4fe2b7aaedd51377c
cksum=3408528151
sha1=660ec06a46b46dc5d675371a2256ec739f8bb8b7
md5=f28cba717ba38ad82a488daed8f45b5b
cksum=233346693
5 changes: 5 additions & 0 deletions build/pkgs/cmake/dependencies
@@ -0,0 +1,5 @@
curl zlib bzip2 xz

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
2 changes: 1 addition & 1 deletion build/pkgs/cmake/package-version.txt
@@ -1 +1 @@
3.2.3
3.8.0
44 changes: 0 additions & 44 deletions build/pkgs/cmake/patches/osx10.10.patch

This file was deleted.

4 changes: 3 additions & 1 deletion build/pkgs/cmake/spkg-check
@@ -1,4 +1,6 @@
#!/usr/bin/env bash

cd src
ctest -E CTestTestStopTime
unset MACOSX_DEPLOYMENT_TARGET
ctest --extra-verbose --output-on-failure -E "(CTestTestStopTime|TestUpload|ctest_submit)"

10 changes: 2 additions & 8 deletions build/pkgs/cmake/spkg-install
Expand Up @@ -2,17 +2,11 @@

cd src

system_curl=""

if [ "$UNAME" = "Darwin" ]; then
system_curl="--system-curl"
unset MACOSX_DEPLOYMENT_TARGET
fi

./bootstrap --prefix=$SAGE_LOCAL \
--system-bzip2 \
--system-zlib \
$system_curl \
--system-liblzma \
--system-curl \
-- \
-DCMAKE_PREFIX_PATH=$SAGE_LOCAL \
-DCMAKE_TESTS_CDASH_SERVER=NOTFOUND
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=8bdfb4b87a803b90d6b9a937d961835955723a09
md5=1f1aa69a7ac98e4443e82611a3bbea23
cksum=4121821509
sha1=1191f0229692e23f4544b68cf56c3443391c9c88
md5=a37eab0bd6a75b55be567ea8fff5b09e
cksum=1527621800
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
@@ -1 +1 @@
216
217
6 changes: 3 additions & 3 deletions build/pkgs/conway_polynomials/checksums.ini
@@ -1,4 +1,4 @@
tarball=conway_polynomials-VERSION.tar.bz2
sha1=25b7abe5c935d20c3ebcde943308652c412d14dc
md5=17f061204b3a6133abb21e17b3abea19
cksum=3204784255
sha1=d4d89bda60ac54e73121f84635e774766e19a8b6
md5=a2725ba21f44554196781424d957f68a
cksum=1387933493
2 changes: 1 addition & 1 deletion build/pkgs/conway_polynomials/package-version.txt
@@ -1 +1 @@
0.4.p0
0.5
9 changes: 5 additions & 4 deletions build/pkgs/conway_polynomials/spkg-install
@@ -1,21 +1,22 @@
#!/usr/bin/env python

import os
from sage.structure.sage_object import save
from six.moves import cPickle as pickle
from sage.env import SAGE_SHARE

install_root = os.path.join(SAGE_SHARE, 'conway_polynomials')


def create_db():
db = {}
from src import conway_polynomials
for p,n,v in conway_polynomials:
for p, n, v in conway_polynomials:
if not p in db:
db[p] = {}
db[p][n] = v
if not os.path.exists(install_root):
os.makedirs(install_root)
save(db, os.path.join(install_root, 'conway_polynomials.sobj'))
with open(os.path.join(install_root, 'conway_polynomials.p'), 'wb') as f:
pickle.dump(db, f)

if __name__ == '__main__':
create_db()
2 changes: 1 addition & 1 deletion build/pkgs/curl/spkg-check
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

cd src
$MAKE check V=1
$MAKE check
4 changes: 2 additions & 2 deletions build/pkgs/curl/spkg-install
Expand Up @@ -29,13 +29,13 @@ if [ $? -ne 0 ]; then
exit 1
fi

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

$MAKE install V=1
$MAKE install
if [ $? -ne 0 ]; then
echo >&2 "Error installing curl."
exit 1
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/cysignals/checksums.ini
@@ -1,4 +1,4 @@
tarball=cysignals-VERSION.tar.bz2
sha1=4394b36d8b30a7afd81df45c6266048d49567af0
md5=abc98cb7b07c3a40979ee24dead06a38
cksum=1213194811
sha1=34508e9ff71da18b66b1eec3464c1ff6a63608e9
md5=f00b9a39a3e785ee822ca00de27da362
cksum=722688943
2 changes: 1 addition & 1 deletion build/pkgs/cysignals/package-version.txt
@@ -1 +1 @@
1.3.2
1.6.3
2 changes: 1 addition & 1 deletion build/pkgs/cysignals/spkg-check
Expand Up @@ -6,4 +6,4 @@ if [ -z "$SAGE_LOCAL" ]; then
exit 1
fi

cd src && $MAKE check
cd src && $MAKE check-install
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
@@ -1 +1 @@
0.25.2.p0
0.25.2.p1
123 changes: 123 additions & 0 deletions build/pkgs/cython/patches/include_dirs_from_externs.patch
@@ -0,0 +1,123 @@
https://github.com/cython/cython/pull/1654

commit 8f71406d1713f97979a602dbf4af92f0da8926ca
Author: Jeroen Demeyer <jdemeyer@cage.ugent.be>
Date: Fri Mar 31 16:08:40 2017 +0200

Automatically add include_dirs for externs

diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
index 9817c30..658d850 100644
--- a/Cython/Build/Dependencies.py
+++ b/Cython/Build/Dependencies.py
@@ -375,14 +375,30 @@ def normalize_existing(base_path, rel_paths):

@cached_function
def normalize_existing0(base_dir, rel_paths):
+ """
+ Given some base directory ``base_dir`` and a list of path names
+ ``rel_paths``, normalize each relative path name ``rel`` by
+ replacing it by ``os.path.join(base, rel)`` if that file exists.
+
+ Return a couple ``(normalized, needed_base)`` where ``normalized``
+ if the list of normalized file names and ``needed_base`` is
+ ``base_dir`` if we actually needed ``base_dir``. If no paths were
+ changed (for example, if all paths were already absolute), then
+ ``needed_base`` is ``None``.
+ """
normalized = []
+ needed_base = None
for rel in rel_paths:
+ if os.path.isabs(rel):
+ normalized.append(rel)
+ continue
path = join_path(base_dir, rel)
if path_exists(path):
normalized.append(os.path.normpath(path))
+ needed_base = base_dir
else:
normalized.append(rel)
- return normalized
+ return (normalized, needed_base)


def resolve_depends(depends, include_dirs):
@@ -483,20 +499,25 @@ class DependencyTree(object):
return all

@cached_method
- def cimports_and_externs(self, filename):
+ def cimports_externs_incdirs(self, filename):
# This is really ugly. Nested cimports are resolved with respect to the
# includer, but includes are resolved with respect to the includee.
cimports, includes, externs = self.parse_dependencies(filename)[:3]
cimports = set(cimports)
externs = set(externs)
+ incdirs = set()
for include in self.included_files(filename):
- included_cimports, included_externs = self.cimports_and_externs(include)
+ included_cimports, included_externs, included_incdirs = self.cimports_externs_incdirs(include)
cimports.update(included_cimports)
externs.update(included_externs)
- return tuple(cimports), normalize_existing(filename, externs)
+ incdirs.update(included_incdirs)
+ externs, incdir = normalize_existing(filename, externs)
+ if incdir:
+ incdirs.add(incdir)
+ return tuple(cimports), externs, incdirs

def cimports(self, filename):
- return self.cimports_and_externs(filename)[0]
+ return self.cimports_externs_incdirs(filename)[0]

def package(self, filename):
return package(filename)
@@ -579,12 +600,22 @@ class DependencyTree(object):

def distutils_info0(self, filename):
info = self.parse_dependencies(filename)[3]
- externs = self.cimports_and_externs(filename)[1]
+ kwds = info.values
+ cimports, externs, incdirs = self.cimports_externs_incdirs(filename)
+ # Add dependencies on "cdef extern from ..." files
if externs:
- if 'depends' in info.values:
- info.values['depends'] = list(set(info.values['depends']).union(externs))
+ if 'depends' in kwds:
+ kwds['depends'] = list(set(kwds['depends']).union(externs))
else:
- info.values['depends'] = list(externs)
+ kwds['depends'] = list(externs)
+ # Add include_dirs to ensure that the C compiler will find the
+ # "cdef extern from ..." files
+ if incdirs:
+ include_dirs = kwds.get('include_dirs', [])
+ for inc in incdirs:
+ if inc not in include_dirs:
+ include_dirs = include_dirs + [inc]
+ kwds['include_dirs'] = include_dirs
return info

def distutils_info(self, filename, aliases=None, base=None):
diff --git a/tests/run/cimport_from_sys_path.srctree b/tests/run/cimport_from_sys_path.srctree
index 1fc031e..e6f619d 100644
--- a/tests/run/cimport_from_sys_path.srctree
+++ b/tests/run/cimport_from_sys_path.srctree
@@ -19,8 +19,15 @@ setup(

######## site-packages/b/other.pxd ########

-cdef inline foo(int a):
- return a**2
+cdef extern from "foo.c":
+ int foo(int)
+
+######## site-packages/b/foo.c ########
+
+static int foo(int a)
+{
+ return a * a;
+}

######## a.pyx ########

2 changes: 1 addition & 1 deletion build/pkgs/ecl/package-version.txt
@@ -1 +1 @@
16.1.2.p2
16.1.2.p3
16 changes: 16 additions & 0 deletions build/pkgs/ecl/patches/flisten-bug.patch
@@ -0,0 +1,16 @@
Prevent busy loop during ECL interpreter shutdown on Cygwin.

See https://trac.sagemath.org/ticket/22337
diff --git a/src/c/file.d b/src/c/file.d
index 2285a60..aeed899 100755
--- a/src/c/file.d
+++ b/src/c/file.d
@@ -5317,7 +5317,7 @@ static int
flisten(cl_object stream, FILE *fp)
{
int aux;
- if (feof(fp))
+ if (feof(fp) || ferror(fp))
return ECL_LISTEN_EOF;
#ifdef FILE_CNT
if (FILE_CNT(fp) > 0)
2 changes: 1 addition & 1 deletion build/pkgs/fpylll/package-version.txt
@@ -1 +1 @@
0.2.4dev
0.2.4dev.p0

0 comments on commit 0234816

Please sign in to comment.