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/20973/cartan_type_aoo
Browse files Browse the repository at this point in the history
* develop: (155 commits)
  Updated SageMath version to 7.3.beta8
  py3 imports in manifolds and symbolic folders
  py3 imports in homology and tensor folders
  py3 imports in doctest, dynamics, quadratic_forms folders
  p3 imports in databases, quivers, repl, sets folders
  Fix formatting for examples in this file
  Trac 19779: fix references
  trac 14490 adding doctest
  trac 21011 adding not tested to raise statement
  These tests needed to be updated further since they also tested the number of lines in the test function (that happens to be 'banner', the length of which has changed).
  Restore the logic of not displaying any banner if SAGE_BANNER is explicitly 'no'
  trac 21008 fixing doctests in posets
  Banner text should be quoted
  trac 21008 utf8 encoding of file, plus nicer doctest
  Follow upstream and use inputenc only when building with pdftex
  trac 21011 details
  a few more python3 print
  trac 21008 allow unicode labels in graphs
  Trac 19779: more coherence in references
  Trac 19779: Python 3 print compatibility
  ...
  • Loading branch information
AndrewMathas committed Jul 15, 2016
2 parents 3c53706 + b7cfa42 commit 5b02f0d
Show file tree
Hide file tree
Showing 651 changed files with 8,076 additions and 4,383 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
@@ -1 +1 @@
SageMath version 7.3.beta7, Release Date: 2016-07-08
SageMath version 7.3.beta8, Release Date: 2016-07-14
3 changes: 2 additions & 1 deletion build/pkgs/atlas/spkg-install
Expand Up @@ -143,6 +143,7 @@ if 'SAGE_ATLAS_LIB' in os.environ:

paths = [ ATLAS_LIB, os.path.join(ATLAS_LIB, 'lib64'), os.path.join(ATLAS_LIB, 'lib') ]
ATLAS_LIB = None
libraries = []
for libs in libraries_sets:
for path in paths:
if is_atlas_lib_path(path, libs):
Expand Down Expand Up @@ -209,7 +210,7 @@ if 'SAGE_ATLAS_LIB' in os.environ:
for lib in libraries + libraries_optional:
symlinkOSlibrary(prefix+lib)

if 'atlas' in libs:
if 'atlas' in libraries:
write_pc_file(['cblas', 'atlas'], 'cblas')
write_pc_file(['f77blas', 'atlas'], 'blas')
# The inclusion of cblas is not a mistake. ATLAS' lapack include
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=f61a172a42a9f55c79bb6404290ee41163ccdad0
md5=d342f35e46105c010e86cc3f733b85cd
cksum=3230256794
sha1=9bea2597a9ed11310446ffb2fef3f8df71893e75
md5=aefa1d5044a5ed8eda8236bb637bb74c
cksum=3931049725
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
@@ -1 +1 @@
172
173
55 changes: 55 additions & 0 deletions build/pkgs/frobby/SPKG.txt
@@ -0,0 +1,55 @@
= Frobby =

== Description ==
The software package Frobby provides a number of computations on
monomial ideals. The current main feature is the socle of a monomial
ideal, which is largely equivalent to computing the maximal standard
monomials, the Alexander dual or the irreducible decomposition.

Operations on monomial ideals are much faster than algorithms designed
for ideals in general, which is what makes a specialized library for
these operations on monomial ideals useful.

== License ==
* GPL version 2.0 or later

== Maintainers ==
* Bjarke Hammersholt Roune (www.broune.com)

== Upstream Contact ==
* Bjarke Hammersholt Roune (www.broune.com)

== Dependencies ==
* GMP built with support for C++

== Special Update/Build instructions ==
Download Frobby at www.broune.com/ and then type "make spkg VER=blah" which wil create an spkg
named frobby-VER.spkg in bin/. The files related to doing this is in the sage/ sub-directory of the
Frobby source distribution.

== Changelog ==

=== frobby-0.9.0.p2 (Dima Pasechnik, Jun 30, 2016) ===
* convertion to new-style package
* integration of Macaulay2 patches
* fix linking (rpath)

=== frobby-0.9.0.p1 (Dima Pasechnik, Sept 7, 2013) ===
* added <unistd.h> for getpid()

=== frobby-0.9.0 (Mike Hansen, May 24th, 2012) ===
* #13007: Update to 0.9.0.
* Add a patch to the Makefile so that the build succeeds with SAGE_CHECK="yes"

=== frobby-0.7.6 (Bjarke Hammersholt Roune, May 20th, 2008) ===
* Move to Frobby 0.7.6 with Makefile improvements by Michale Abshoff.

=== frobby-0.7.5.p1 (Michael Abshoff, May 19th, 2008) ===
* fix the main Makefile to set include and library directories correctly when some env variables are defined

=== frobby-0.7.5.p0 (Michael Abshoff, May 19th, 2008) ===
* various cleanups, i.e. repo, .hgignore, missing SPKG.txt sections
* move all sources into src

=== frobby-0.7.5 (Bjarke Hammersholt Roune) ===
* initial version
4 changes: 4 additions & 0 deletions build/pkgs/frobby/checksums.ini
@@ -0,0 +1,4 @@
tarball=frobby_v0.9.0.tar.gz
sha1=513b6e2ef8e8670c0518d168c2e554df1f8d79b4
md5=2204f340dad8fb7be156f9f7c403c4a0
cksum=2889611419
1 change: 1 addition & 0 deletions build/pkgs/frobby/dependencies
@@ -0,0 +1 @@
$(MP_LIBRARY)
1 change: 1 addition & 0 deletions build/pkgs/frobby/package-version.txt
@@ -0,0 +1 @@
0.9.0.p2
31 changes: 31 additions & 0 deletions build/pkgs/frobby/patches/HashMap.h.patch
@@ -0,0 +1,31 @@
--- /tmp/HashMap.h 2011-09-23 16:09:12.000000000 -0400
+++ src/HashMap.h 2015-06-06 12:56:15.000000000 -0400
@@ -35,10 +35,16 @@
class FrobbyHash {};

// *********************************************************
-#ifdef __GNUC__ // Only GCC defines this macro
+#if defined(__GNUC__) || defined(__clang__)
+#if 0
#include "hash_map/hash_map"
#include <string>
+#endif
+#include <unordered_map>
+template<class Key, class Value>
+ class HashMap : public std::unordered_map<Key, Value, FrobbyHash<Key>> { };

+#if 0
template<>
class FrobbyHash<string> : public __gnu_cxx::hash<string> {
};
@@ -47,9 +53,8 @@
class HashMap : public __gnu_cxx::hash_map<Key, Value,
FrobbyHash<Key> > {
};
-
+#endif
#else
-
// *********************************************************
#ifdef _MSC_VER // Only Microsoft C++ defines this macro
#include <hash_map>
30 changes: 30 additions & 0 deletions build/pkgs/frobby/patches/Makefile.patch
@@ -0,0 +1,30 @@
--- Makefile.orig 2011-09-23 21:09:12.000000000 +0100
+++ Makefile 2016-06-30 07:47:38.314034517 +0100
@@ -70,8 +70,8 @@
BIN_INSTALL_DIR = "/usr/local/bin/"
endif

-cflags = $(CFLAGS) $(CPPFLAGS) -Wall -ansi -pedantic -I $(GMP_INC_DIR) \
- -Wno-uninitialized -Wno-unused-parameter
+cflags = $(CFLAGS) $(CPPFLAGS) -Wall -I $(GMP_INC_DIR) \
+ -Wno-uninitialized -Wno-unused-parameter -std=c++11
program = frobby
library = libfrobby.a
benchArgs = $(FROBBYARGS)
@@ -93,7 +93,7 @@
ifeq ($(MODE), debug)
rawSources := $(rawSources) $(rawTests)
outdir = bin/debug/
- cflags += -g -D DEBUG -fno-inline -Werror -Wextra -Wno-uninitialized \
+ cflags += -g -D DEBUG -fno-inline -Wextra -Wno-uninitialized \
-Wno-unused-parameter
MATCH=true
endif
@@ -217,6 +217,7 @@
$(patsubst $(outdir)main.o,,$(objs))
else
ar crs bin/$(library) $(patsubst $(outdir)main.o,,$(objs))
+ $(RANLIB) bin/$(library)
endif

# Compile and output object files.
11 changes: 11 additions & 0 deletions build/pkgs/frobby/patches/StatisticsStrategy.cpp.patch
@@ -0,0 +1,11 @@
--- /tmp/StatisticsStrategy.cpp 2011-09-23 16:09:12.000000000 -0400
+++ src/StatisticsStrategy.cpp 2013-05-18 17:22:09.000000000 -0400
@@ -140,7 +140,7 @@
if (_nodeCount == 0)
return 0.0;
else {
- mpz_class q = mpq_class(_subGenSum) / _nodeCount;
+ mpq_class q = mpq_class(_subGenSum) / _nodeCount;
return q.get_d();
}
}
24 changes: 24 additions & 0 deletions build/pkgs/frobby/patches/StringStream.patch
@@ -0,0 +1,24 @@
--- /tmp/FrobbyStringStream.cpp 2011-09-23 15:09:12.000000000 -0500
+++ src/FrobbyStringStream.cpp 2013-05-10 11:42:01.840492200 -0500
@@ -41,6 +41,11 @@
return *this;
}

+FrobbyStringStream& FrobbyStringStream::operator<<(unsigned long long integer) {
+ appendIntegerToString(_str, integer);
+ return *this;
+}
+
FrobbyStringStream& FrobbyStringStream::operator<<(unsigned long integer) {
appendIntegerToString(_str, integer);
return *this;
--- /tmp/FrobbyStringStream.h 2011-09-23 15:09:12.000000000 -0500
+++ src/FrobbyStringStream.h 2013-05-10 11:42:01.843492400 -0500
@@ -25,6 +25,7 @@
used for operations that need to be efficient. */
class FrobbyStringStream {
public:
+ FrobbyStringStream& operator<<(unsigned long long integer);
FrobbyStringStream& operator<<(unsigned long integer);
FrobbyStringStream& operator<<(unsigned int integer);
FrobbyStringStream& operator<<(const mpz_class& integer);
24 changes: 24 additions & 0 deletions build/pkgs/frobby/patches/Term.h.patch
@@ -0,0 +1,24 @@
--- /tmp/Term.h 2011-09-23 15:09:12.000000000 -0500
+++ src/Term.h 2013-05-10 11:42:01.846492600 -0500
@@ -99,6 +99,10 @@
ASSERT(offset < _varCount);
return _exponents[offset];
}
+ Exponent operator[](unsigned long long offset) const {
+ ASSERT(offset < _varCount);
+ return _exponents[offset];
+ }

Exponent& operator[](int offset) {
ASSERT(0 <= offset);
@@ -113,6 +117,10 @@
ASSERT(offset < _varCount);
return _exponents[offset];
}
+ Exponent& operator[](unsigned long long offset) {
+ ASSERT(offset < _varCount);
+ return _exponents[offset];
+ }

bool operator==(const Term& term) const {
ASSERT(_varCount == term._varCount);
21 changes: 21 additions & 0 deletions build/pkgs/frobby/patches/VarNames.h.patch
@@ -0,0 +1,21 @@
--- /tmp/VarNames.h 2011-09-23 16:09:12.000000000 -0400
+++ src/VarNames.h 2015-06-06 12:36:28.000000000 -0400
@@ -21,7 +21,7 @@

#include <vector>
#include <string>
-
+#include <unordered_map>
class Scanner;

/** Defines the variables of a polynomial ring and facilities IO
@@ -102,7 +102,8 @@
private:
static bool compareNames(const string* a, const string* b);

- typedef HashMap<string, size_t> VarNameMap;
+ typedef unordered_map<string, size_t> VarNameMap;
+ //typedef HashMap<string, size_t> VarNameMap;
VarNameMap _nameToIndex;
vector<const string*> _indexToName;
};
13 changes: 13 additions & 0 deletions build/pkgs/frobby/patches/main.cpp.patch
@@ -0,0 +1,13 @@
*** /tmp/main.cpp Sat Sep 7 14:09:12 2013
--- src/main.cpp Sat Sep 7 14:09:44 2013
***************
*** 24,29 ****
--- 24,31 ----

#include <ctime>
#include <cstdlib>
+ #include <unistd.h> /* needed for getpid */
+

/** This function runs the Frobby console interface. the ::main
function calls this function after having set up DEBUG-specific
12 changes: 12 additions & 0 deletions build/pkgs/frobby/patches/randomDataGenerators.cpp.patch
@@ -0,0 +1,12 @@
*** /tmp/randomDataGenerators.cpp Sat Sep 7 14:09:19 2013
--- src/randomDataGenerators.cpp Sat Sep 7 14:10:19 2013
***************
*** 25,30 ****
--- 25,31 ----

#include <limits>
#include <ctime>
+ #include <unistd.h> /* needed for getpid */

void generateLinkedListIdeal(BigIdeal& ideal, size_t variableCount) {
VarNames names(variableCount);
10 changes: 10 additions & 0 deletions build/pkgs/frobby/patches/stdinc.h.patch
@@ -0,0 +1,10 @@
--- /tmp/stdinc.h 2011-09-23 16:09:12.000000000 -0400
+++ src/stdinc.h 2015-06-02 21:27:34.000000000 -0400
@@ -29,6 +29,7 @@
// Some versions of GMP do not define gmp_fprintf unless cstdio is
// included first, so we have to include it here.
#include <cstdio>
+#include <cstddef>

#include <gmp.h>
#include <gmpxx.h>
53 changes: 53 additions & 0 deletions build/pkgs/frobby/patches/tests.patch
@@ -0,0 +1,53 @@
--- /tmp/test/messages/runtest 2011-09-23 15:09:12.000000000 -0500
+++ test/messages/runtest 2013-05-10 11:42:01.825491400 -0500
@@ -9,7 +9,7 @@
action="$1"
shift

-tmpFile="/tmp/errorTestHelperTmp"
+tmpFile="./errorTestHelperTmp"
echo "$1" > $tmpFile
shift

--- /tmp/test/testScripts/run_euler_test 2011-09-23 15:09:13.000000000 -0500
+++ test/testScripts/run_euler_test 2013-05-10 11:42:01.829491600 -0500
@@ -3,9 +3,9 @@
frobby=../../bin/frobby
testhelper=../testScripts/testhelper
test="$1"
-tmpFile=/tmp/frobbyEulerRadicalTmp
-tmpFileInverted=/tmp/frobbyEulerRadicalInvertedTmp
-tmpFileTransposed=/tmp/frobbyEulerRadicalTransposedTmp
+tmpFile=./frobbyEulerRadicalTmp
+tmpFileInverted=./frobbyEulerRadicalInvertedTmp
+tmpFileTransposed=./frobbyEulerRadicalTransposedTmp
genPivots="rarevar popvar maxsupp minsupp any random rarest raremax"
stdPivots="popvar rarevar popgcd any random"
shift
--- /tmp/test/testScripts/testhelper 2011-09-23 15:09:13.000000000 -0500
+++ test/testScripts/testhelper 2013-05-10 11:42:01.833491800 -0500
@@ -57,10 +57,10 @@

origParams="$*" # used for debug output below
origFrobby="../../bin/frobby"
-origFrobbyOut="/tmp/frobbyTestScriptTemporary_standardOutput"
-origFrobbyErr="/tmp/frobbyTestScriptTemporary_standardError"
-frobbyChangedErr="/tmp/frobbyTestScriptTemporary_standardErrorChanged"
-frobbyChangedInput="/tmp/frobbyTestScriptTemporary_standardInput"
+origFrobbyOut="./frobbyTestScriptTemporary_standardOutput"
+origFrobbyErr="./frobbyTestScriptTemporary_standardError"
+frobbyChangedErr="./frobbyTestScriptTemporary_standardErrorChanged"
+frobbyChangedInput="./frobbyTestScriptTemporary_standardInput"

frobby="$origFrobby"
frobbyOut="$origFrobbyOut"
--- /tmp/test/internal/runtests 2011-09-23 13:09:12.000000000 -0700
+++ test/internal/runtests 2014-07-30 10:46:31.033944047 -0700
@@ -7,6 +7,6 @@
fi

$frobby test 2> /dev/null > /dev/null
-if [ $? == 0 ]; then exit 0; fi
+if [ $? = 0 ]; then exit 0; fi
echo "*** Internal test failed, rerunning tests with output ***"
$frobby test
14 changes: 14 additions & 0 deletions build/pkgs/frobby/spkg-check
@@ -0,0 +1,14 @@
#!/usr/bin/env sh

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

GMP_INC_DIR="$SAGE_LOCAL/include"; export GMP_INC_DIR
ldflags="-L$SAGE_LOCAL/lib/ -lgmpxx -lgmp"; export ldflags

cd src/
$MAKE test MODE=debug # run tests with assertions turned on
$MAKE test MODE=release # test the binaries used by Sage
44 changes: 44 additions & 0 deletions build/pkgs/frobby/spkg-install
@@ -0,0 +1,44 @@
#!/usr/bin/env sh

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

rm -rf "$SAGE_LOCAL/bin/frobby"

GMP_INC_DIR="$SAGE_LOCAL/include"; export GMP_INC_DIR
ldflags="-Wl,-rpath,$SAGE_LOCAL/lib -L$SAGE_LOCAL/lib/ -lgmpxx -lgmp"; export ldflags

cd src

# Apply fixes to upstream source
echo "Applying patches..."
for patch in ../patches/*.patch; do
[ -r "$patch" ] || continue # Skip non-existing or non-readable patches
patch -p0 <"$patch"
if [ $? -ne 0 ]; then
echo >&2 "Error applying '$patch'"
exit 1
fi
done

$MAKE MODE=release

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

if [ ! -f bin/release/frobby ]; then
echo "Frobby executable not found."
exit 1
fi

$CP bin/release/frobby "$SAGE_LOCAL/bin/"

if [ ! -f "$SAGE_LOCAL/bin/frobby" ]; then
echo "Frobby executable not copied."
exit 1
fi
1 change: 1 addition & 0 deletions build/pkgs/frobby/type
@@ -0,0 +1 @@
optional

0 comments on commit 5b02f0d

Please sign in to comment.