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

Commit

Permalink
Trac #17220: merge latest version of #17220
Browse files Browse the repository at this point in the history
  • Loading branch information
cheuberg committed May 24, 2015
2 parents 1a8e8dc + b666ea2 commit 556651a
Show file tree
Hide file tree
Showing 560 changed files with 21,549 additions and 8,129 deletions.
15 changes: 1 addition & 14 deletions COPYING.txt
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 Down Expand Up @@ -129,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 @@ -949,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 VERSION.txt
@@ -1 +1 @@
Sage version 6.7.beta1, released 2015-04-15
Sage version 6.7.beta4, released 2015-05-05
9 changes: 2 additions & 7 deletions build/deps
Expand Up @@ -47,7 +47,6 @@ all-sage: \
$(INST)/$(FREETYPE) \
$(INST)/$(GAP) \
$(INST)/$(GD) \
$(INST)/$(GDMODULE) \
$(INST)/$(GFAN) \
$(INST)/$(GF2X) \
$(INST)/$(GIVARO) \
Expand Down Expand Up @@ -329,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 @@ -406,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
1 change: 0 additions & 1 deletion build/install
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 Down
37 changes: 37 additions & 0 deletions build/pkgs/4ti2/SPKG.txt
@@ -0,0 +1,37 @@
= 4ti2 =

== Description ==

A software package for algebraic, geometric and combinatorial problems on linear spaces. Available at www.4ti2.de.

== License ==
4ti2 is released under a GPL v2 license.

== SPKG Maintainers ==

Marshall Hampton
Dima Pasechnik

== Upstream Contact ==

Raymond Hemmecke, TU Munich, Germany
Matthias Köppe, UC Davis, CA, USA

== Dependencies ==

GLPK, GMP.

=== 4ti2-1.6.3 (Dima Pasechnik, May 1, 2015) ===
* update to 4ti2 version 1.6.3 and to new spkg style

=== 4ti2-1.6.2 (Dima Pasechnik, Jul 4, 2014) ===
* update to 4ti2 version 1.6.2

=== 4ti2-1.6 (Dima Pasechnik, Sept 7, 2013) ===
* update to 4ti2 version 1.6
* hg: added stuff to track
* updated upstream contacts

=== 4ti2.p0 (Marshall Hampton, July 31th, 2009) ===
* Created a first attempt.

4 changes: 4 additions & 0 deletions build/pkgs/4ti2/checksums.ini
@@ -0,0 +1,4 @@
tarball=4ti2-VERSION.tar.gz
sha1=aa0da036c061d39092a6c8b84ccc279544fd510f
md5=32e2a4320b068ce3e08a7521087f4869
cksum=1513346505
1 change: 1 addition & 0 deletions build/pkgs/4ti2/package-version.txt
@@ -0,0 +1 @@
1.6.3
22 changes: 22 additions & 0 deletions build/pkgs/4ti2/spkg-install
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

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
$MAKE install

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

2 changes: 1 addition & 1 deletion build/pkgs/bliss/package-version.txt
@@ -1 +1 @@
0.72
0.72.p1
19 changes: 9 additions & 10 deletions build/pkgs/bliss/patches/digraph_heuristic.patch
@@ -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
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
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=ca70b58ba6c8bd0bbcab9ed5408f9f43dde8fffa
md5=02a841e6f9e8915d674ac2180447562b
cksum=923598272
sha1=17ccf81f7596c2bc80a90e679af69e1e51cf8ae0
md5=7e005e5e569fa0a2c10f664a9ca19cc9
cksum=4206119317
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
@@ -1 +1 @@
87
90
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
@@ -1 +1 @@
0.22.p1
0.22.p2
124 changes: 124 additions & 0 deletions build/pkgs/cython/patches/c_tuple_type_memleak.patch
@@ -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):

0 comments on commit 556651a

Please sign in to comment.