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

Commit

Permalink
Merge branch sage6.7.beta3 into ticket18128
Browse files Browse the repository at this point in the history
Conflicts:
	src/sage/geometry/polyhedron/base.py
	src/sage/geometry/polyhedron/library.py
  • Loading branch information
jplab committed Apr 29, 2015
2 parents d26a570 + e55e315 commit b66b4ed
Show file tree
Hide file tree
Showing 734 changed files with 28,403 additions and 11,954 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/local
/logs
/upstream
/src/mac-app/build

#############################
# Autotools generated files #
Expand Down
16 changes: 2 additions & 14 deletions COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ freetype FreeType License (similar to BSD; see below)
gap GPLv2+
gcc GPLv3+
gd Custom (BSD-ish)
gdmodule Custom (BSD-ish)
genus2reduction GPLv2+
gfan GPLv2 or GPLv3
gf2x GPLv2+
Expand All @@ -80,6 +79,7 @@ markupsafe Simplified BSD
mathjax Apache License 2.0
matplotlib Matplotlib License (BSD compatible, see below)
maxima See below
mistune Modified BSD
mpc LGPLv3+
mpfi COPYING is GPLv2, source files state LGPLv2.1+
mpfr LGPLv3+
Expand Down Expand Up @@ -128,6 +128,7 @@ sympow Modified BSD
sympy Modified BSD
tachyon Modified BSD
termcap GPLv2+
threejs MIT License
tornado Apache License
zlib Custom (Modified BSD)
zn_poly GPLv2 or GPLv3 (no later versions, see below)
Expand Down Expand Up @@ -948,19 +949,6 @@ documentation.

================================================================================

gdmodule:
(http://newcenturycomputers.net/projects/gdmodule.html)

Permission granted for unlimited use, provided that the Quest Center
at Cold Spring Harbor Labs is given credit for the library in the
user-visible documentation of your software. If you modify gd, we ask
that you share the modifications with us so they can be added to the
distribution. See gd.html for details. (The rest of the notice is in
the package gdmodule spkg, which is a bzip2'd tarball included in the
Sage source distribution.)

================================================================================

genus2reduction:
(http://www.math.u-bordeaux.fr/~liu/G2R/)
Copyright Qing LIU. See PARI for the license terms.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ build: logs configure
"../$(PIPE)" \
"env SAGE_PARALLEL_SPKG_BUILD='$(SAGE_PARALLEL_SPKG_BUILD)' ./install all 2>&1" \
"tee -a ../logs/install.log"
./sage -b
+./sage -b

# Preemptively download all standard upstream source tarballs.
download:
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Sage version 6.6.rc3, released 2015-04-12
Sage version 6.7.beta3, released 2015-04-28
21 changes: 10 additions & 11 deletions build/deps
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ all-sage: \
$(INST)/$(FREETYPE) \
$(INST)/$(GAP) \
$(INST)/$(GD) \
$(INST)/$(GDMODULE) \
$(INST)/$(GFAN) \
$(INST)/$(GF2X) \
$(INST)/$(GIVARO) \
Expand All @@ -72,6 +71,7 @@ all-sage: \
$(INST)/$(MATHJAX) \
$(INST)/$(MATPLOTLIB) \
$(INST)/$(MAXIMA) \
$(INST)/$(MISTUNE) \
$(INST)/$(MPC) \
$(INST)/$(MPFI) \
$(INST)/$(MPFR) \
Expand Down Expand Up @@ -316,6 +316,9 @@ $(INST)/$(LIBGAP): $(INST)/$(GAP)
$(INST)/$(JSONSCHEMA): $(INST)/$(PYTHON) $(INST)/$(SETUPTOOLS)
+$(PIPE) "$(SAGE_SPKG) $(JSONSCHEMA) 2>&1" "tee -a $(SAGE_LOGS)/$(JSONSCHEMA).log"

$(INST)/$(MISTUNE): $(INST)/$(SETUPTOOLS) $(INST)/$(CYTHON)
+$(PIPE) "$(SAGE_SPKG) $(MISTUNE) 2>&1" "tee -a $(SAGE_LOGS)/$(MISTUNE).log"

$(INST)/$(IPYTHON): $(INST)/$(PYTHON) $(INST)/$(JINJA2) $(INST)/$(TORNADO) $(INST)/$(PYZMQ)
+$(PIPE) "$(SAGE_SPKG) $(IPYTHON) 2>&1" "tee -a $(SAGE_LOGS)/$(IPYTHON).log"

Expand All @@ -325,9 +328,6 @@ $(INST)/$(PEXPECT): $(INST)/$(PYTHON)
$(INST)/$(GD): $(INST)/$(LIBPNG) $(INST)/$(FREETYPE) $(INST)/$(ICONV)
+$(PIPE) "$(SAGE_SPKG) $(GD) 2>&1" "tee -a $(SAGE_LOGS)/$(GD).log"

$(INST)/$(GDMODULE): $(INST)/$(PYTHON) $(INST)/$(GD) $(INST)/$(ICONV)
+$(PIPE) "$(SAGE_SPKG) $(GDMODULE) 2>&1" "tee -a $(SAGE_LOGS)/$(GDMODULE).log"

$(INST)/$(SCONS): $(INST)/$(PYTHON)
+$(PIPE) "$(SAGE_SPKG) $(SCONS) 2>&1" "tee -a $(SAGE_LOGS)/$(SCONS).log"

Expand Down Expand Up @@ -375,7 +375,7 @@ $(INST)/$(FREETYPE): $(INST)/$(LIBPNG)
$(INST)/$(LIBPNG): $(INST)/$(ZLIB)
+$(PIPE) "$(SAGE_SPKG) $(LIBPNG) 2>&1" "tee -a $(SAGE_LOGS)/$(LIBPNG).log"

$(INST)/$(SIX): $(INST)/$(PYTHON)
$(INST)/$(SIX): $(INST)/$(PYTHON) $(INST)/$(SETUPTOOLS)
+$(PIPE) "$(SAGE_SPKG) $(SIX) 2>&1" "tee -a $(SAGE_LOGS)/$(SIX).log"

$(INST)/$(DATEUTIL): $(INST)/$(PYTHON) $(INST)/$(SIX) $(INST)/$(SETUPTOOLS)
Expand All @@ -402,9 +402,8 @@ $(INST)/$(MATHJAX):

$(INST)/$(MATPLOTLIB): $(INST)/$(PYTHON) $(INST)/$(NUMPY) \
$(INST)/$(FREETYPE) $(INST)/$(LIBPNG) \
$(INST)/$(GDMODULE) $(INST)/$(DATEUTIL) \
$(INST)/$(PYPARSING) $(INST)/$(SETUPTOOLS) \
$(INST)/$(TORNADO) $(INST)/$(SIX)
$(INST)/$(DATEUTIL) $(INST)/$(PYPARSING) \
$(INST)/$(SETUPTOOLS) $(INST)/$(TORNADO) $(INST)/$(SIX)
+$(PIPE) "$(SAGE_SPKG) $(MATPLOTLIB) 2>&1" "tee -a $(SAGE_LOGS)/$(MATPLOTLIB).log"

$(INST)/$(CDDLIB): $(INST)/$(SAGE_MP_LIBRARY)
Expand Down Expand Up @@ -523,7 +522,7 @@ $(INST)/sage: \
$(INST)/csage
if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && \
$(PIPE) 'time python setup.py install 2>&1' 'tee -a $(SAGE_LOGS)/sage-$(SAGE_VERSION).log' && \
$(PIPE) 'time $(MAKE) sage 2>&1' 'tee -a $(SAGE_LOGS)/sage-$(SAGE_VERSION).log' && \
touch $@; \
fi

Expand All @@ -534,8 +533,8 @@ $(INST)/csage: $(INST)/$(SCONS) \
$(INST)/$(PYTHON) \
$(CSAGE_SOURCES)
if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && cd c_lib && \
$(PIPE) 'time scons -Q install 2>&1' 'tee -a $(SAGE_LOGS)/csage-$(SAGE_VERSION).log' && \
cd $(SAGE_SRC) && source bin/sage-env && \
$(PIPE) 'time $(MAKE) csage 2>&1' 'tee -a $(SAGE_LOGS)/csage-$(SAGE_VERSION).log' && \
touch $@; \
fi

Expand Down
2 changes: 1 addition & 1 deletion build/install
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ FREETYPE=`newest_version freetype`
GAP=`newest_version gap`
GCC=`newest_version gcc`
GD=`newest_version libgd`
GDMODULE=`newest_version gdmodule`
GFAN=`newest_version gfan`
GF2X=`newest_version gf2x`
GIT=`newest_version git`
Expand All @@ -347,6 +346,7 @@ MARKUPSAFE=`newest_version markupsafe`
MATHJAX=`newest_version mathjax`
MATPLOTLIB=`newest_version matplotlib`
MAXIMA=`newest_version maxima`
MISTUNE=`newest_version mistune`
MPC=`newest_version mpc`
MPFI=`newest_version mpfi`
MPFR=`newest_version mpfr`
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/bliss/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.72
0.72.p1
19 changes: 9 additions & 10 deletions build/pkgs/bliss/patches/digraph_heuristic.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
--- bliss-0.72/graph.hh 2011-05-12 15:29:46.000000000 +0200
+++ /home/azi/bliss-0.72/graph.hh 2014-12-30 11:14:20.917059666 +0100
@@ -843,7 +843,7 @@
bool is_equitable() const;
--- src/graph.cc 2015-02-11 13:20:39.922021355 +0100
+++ src-patched/graph_new.cc 2015-02-11 13:20:15.546020960 +0100
@@ -1920,6 +1920,7 @@
Digraph::Digraph(const unsigned int nof_vertices)
{
vertices.resize(nof_vertices);
+ sh = shs_f;
}


/* Splitting heuristics, documented in more detail in the cc-file. */
- SplittingHeuristic sh;
+ SplittingHeuristic sh = shs_f;
Partition::Cell* find_next_cell_to_be_splitted(Partition::Cell *cell);
Partition::Cell* sh_first();
Partition::Cell* sh_first_smallest();
5 changes: 3 additions & 2 deletions build/pkgs/bliss/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ if [ "$SAGE_LOCAL" = "" ]; then
exit 1
fi

cd "src"

for patch in patches/*.patch; do
cd "src"
for patch in ../patches/*.patch; do
[ -r "$patch" ] || continue # Skip non-existing or non-readable patches
patch -p1 <"$patch"
if [ $? -ne 0 ]; then
Expand All @@ -17,6 +17,7 @@ for patch in patches/*.patch; do
fi
done


$MAKE && mv libbliss.a "$SAGE_LOCAL/lib" && mv *.hh "$SAGE_LOCAL/include"

if [ $? -ne 0 ]; then
Expand Down
28 changes: 28 additions & 0 deletions build/pkgs/cbc/SPKG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
= COIN-OR / CBC =

== Description ==

The Computational Infrastructure for Operations Research (COIN-OR**,
or simply COIN) project is an initiative to spur the development of
open-source software for the operations research community.

The COIN Branch and Cut solver (CBC) is an open-source
mixed-integer program (MIP) solver written in C++. CBC is intended to
be used primarily as a callable library to create customized
branch-and-cut solvers. A basic, stand-alone executable version is
also available. CBC is an active open-source project led by John
Forrest at www.coin-or.org.

== License ==

Eclipse Public License, Version 1.0 (EPL-1.0)
(http://opensource.org/licenses/eclipse-1.0)

== Upstream Contact ==

* John Forrest <jjforre@us.ibm.com>
* Robin Lougee-Heimer

== Project Home Page ==

* https://projects.coin-or.org/Cbc
4 changes: 4 additions & 0 deletions build/pkgs/cbc/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tarball=cbc-VERSION.tar.gz
sha1=d937d6af1ee8838d44659ebd4cf7bbb1b20372ce
md5=2134576233cc95cdfedc63991a4944ec
cksum=1215468781
1 change: 1 addition & 0 deletions build/pkgs/cbc/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.9.4
22 changes: 22 additions & 0 deletions build/pkgs/cbc/spkg-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
if [ "$SAGE_LOCAL" = "" ]; then
echo >&2 "SAGE_LOCAL undefined ... exiting";
echo >&2 "Maybe run 'sage -sh'?"
exit 1
fi

export LDFLAGS="$LDFLAGS -lz -lbz2"
#export CPPFLAGS="-DHAVE_CLOCK_GETTIME=0"

# See discussion on #12220
#
#-> Mac and Linux behave differently according to the presence of librt, and a
# good way around if to make the computer believe that it does not exist
# locally, or more precisely that it does not contain the clock_gettime
# function. Cbc uses an alternative method to do the job, and it looks like
# all this is required when Cbc solves LP with several threads.
#
cd src &&
sed -i -e "s/clock\_gettime ()/Grrrrrrrrrrrr\ ()/g" Cbc/configure &&
./configure --prefix="$SAGE_LOCAL" "${args[@]}" --enable-cbc-parallel --enable-parallel --enable-gnu-packages --enable-static &&
make &&
make install
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=beac54655b8d0fbff44d578bcb2b4f676d40b3c9
md5=ac8c8051aebfe3d45bf36bdf498c9b59
cksum=3023873269
sha1=d0a00ec9d7e49ef6e758aee29f60cd399b2a8ff9
md5=cbf68f077445ecb657e52276762d7e44
cksum=3915828491
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
81
89
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.22
0.22.p2
124 changes: 124 additions & 0 deletions build/pkgs/cython/patches/c_tuple_type_memleak.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
commit bb4d9c2de71b7c7e1e02d9dfeae53f4547fa9d7d
Author: Stefan Behnel <stefan_ml@behnel.de>
Date: Fri Apr 24 17:57:23 2015 +0200

replace the incorrect and leaky global c-tuple type cache by a per-module one

diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
index 0fed86a..cce5c50 100644
--- a/Cython/Compiler/ExprNodes.py
+++ b/Cython/Compiler/ExprNodes.py
@@ -6539,9 +6539,7 @@ class TupleNode(SequenceNode):
if any(type.is_pyobject or type.is_unspecified or type.is_fused for type in arg_types):
return tuple_type
else:
- type = PyrexTypes.c_tuple_type(arg_types)
- env.declare_tuple_type(self.pos, type)
- return type
+ return env.declare_tuple_type(self.pos, arg_types).type

def analyse_types(self, env, skip_children=False):
if len(self.args) == 0:
@@ -6552,8 +6550,7 @@ class TupleNode(SequenceNode):
if not skip_children:
self.args = [arg.analyse_types(env) for arg in self.args]
if not self.mult_factor and not any(arg.type.is_pyobject or arg.type.is_fused for arg in self.args):
- self.type = PyrexTypes.c_tuple_type(arg.type for arg in self.args)
- env.declare_tuple_type(self.pos, self.type)
+ self.type = env.declare_tuple_type(self.pos, (arg.type for arg in self.args)).type
self.is_temp = 1
return self
else:
diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py
index d6700d0..3ee9e9a 100644
--- a/Cython/Compiler/Nodes.py
+++ b/Cython/Compiler/Nodes.py
@@ -1180,10 +1180,9 @@ class CTupleBaseTypeNode(CBaseTypeNode):
error(c.pos, "Tuple types can't (yet) contain Python objects.")
return error_type
component_types.append(type)
- type = PyrexTypes.c_tuple_type(component_types)
- entry = env.declare_tuple_type(self.pos, type)
+ entry = env.declare_tuple_type(self.pos, component_types)
entry.used = True
- return type
+ return entry.type


class FusedTypeNode(CBaseTypeNode):
diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py
index a4fc38d..bc61b6f 100644
--- a/Cython/Compiler/PyrexTypes.py
+++ b/Cython/Compiler/PyrexTypes.py
@@ -3684,13 +3684,11 @@ class CTupleType(CType):
env.use_utility_code(self._convert_from_py_code)
return True

-c_tuple_types = {}
+
def c_tuple_type(components):
components = tuple(components)
- tuple_type = c_tuple_types.get(components)
- if tuple_type is None:
- cname = Naming.ctuple_type_prefix + type_list_identifier(components)
- tuple_type = c_tuple_types[components] = CTupleType(cname, components)
+ cname = Naming.ctuple_type_prefix + type_list_identifier(components)
+ tuple_type = CTupleType(cname, components)
return tuple_type


diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py
index 7409420..c2f3ac8 100644
--- a/Cython/Compiler/Symtab.py
+++ b/Cython/Compiler/Symtab.py
@@ -610,8 +610,8 @@ class Scope(object):
self.sue_entries.append(entry)
return entry

- def declare_tuple_type(self, pos, type):
- return self.outer_scope.declare_tuple_type(pos, type)
+ def declare_tuple_type(self, pos, components):
+ return self.outer_scope.declare_tuple_type(pos, components)

def declare_var(self, name, type, pos,
cname = None, visibility = 'private',
@@ -1056,6 +1056,7 @@ class ModuleScope(Scope):
self.cached_builtins = []
self.undeclared_cached_builtins = []
self.namespace_cname = self.module_cname
+ self._cached_tuple_types = {}
for var_name in ['__builtins__', '__name__', '__file__', '__doc__', '__path__']:
self.declare_var(EncodedString(var_name), py_object_type, None)

@@ -1075,18 +1076,24 @@ class ModuleScope(Scope):

return self.outer_scope.lookup(name, language_level=language_level)

- def declare_tuple_type(self, pos, type):
- cname = type.cname
+ def declare_tuple_type(self, pos, components):
+ components = tuple(components)
+ try:
+ ttype = self._cached_tuple_types[components]
+ except KeyError:
+ ttype = self._cached_tuple_types[components] = PyrexTypes.c_tuple_type(components)
+ cname = ttype.cname
entry = self.lookup_here(cname)
if not entry:
scope = StructOrUnionScope(cname)
- for ix, component in enumerate(type.components):
+ for ix, component in enumerate(components):
scope.declare_var(name="f%s" % ix, type=component, pos=pos)
- struct_entry = self.declare_struct_or_union(cname + '_struct', 'struct', scope, typedef_flag=True, pos=pos, cname=cname)
+ struct_entry = self.declare_struct_or_union(
+ cname + '_struct', 'struct', scope, typedef_flag=True, pos=pos, cname=cname)
self.type_entries.remove(struct_entry)
- type.struct_entry = struct_entry
- entry = self.declare_type(cname, type, pos, cname)
- type.entry = entry
+ ttype.struct_entry = struct_entry
+ entry = self.declare_type(cname, ttype, pos, cname)
+ ttype.entry = entry
return entry

def declare_builtin(self, name, pos):
Loading

0 comments on commit b66b4ed

Please sign in to comment.