diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | package.patch | 11 | ||||
-rw-r--r-- | sagemath-detect-igraph.patch | 21 | ||||
-rw-r--r-- | sagemath-env.patch | 64 | ||||
-rw-r--r-- | sagemath-ignore-warnings.patch (renamed from pari-stackwarn.patch) | 8 | ||||
-rw-r--r-- | sagemath-lrs.patch | 22 | ||||
-rw-r--r-- | sagemath-networkx2.patch | 63 | ||||
-rw-r--r-- | sagemath-singular-4.1.1.patch | 12 | ||||
-rw-r--r-- | sagemath-threejs.patch | 2 | ||||
-rw-r--r-- | test-optional.patch | 6 |
11 files changed, 125 insertions, 159 deletions
@@ -1,6 +1,6 @@ pkgbase = sagemath-git pkgdesc = Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab - pkgver = 8.2.rc2.r0.g303efaa461 + pkgver = 8.3.beta0.r0.g8bdc326ba5 pkgrel = 1 url = http://www.sagemath.org arch = x86_64 @@ -88,6 +88,7 @@ pkgbase = sagemath-git optdepends = latte-integrale: integral point count in polyhedra optdepends = polymake: polymake backend for polyhedral computations optdepends = shared_meataxe: faster matrix arithmetic over finite fields + optdepends = openblas: faster linear algebra optdepends = sirocco: for computing the fundamental group of the complement of a plane curve optdepends = three.js: alternative 3D plots engine source = git://git.sagemath.org/sage.git#branch=develop @@ -100,30 +101,26 @@ pkgbase = sagemath-git source = r-no-readline.patch source = fes02.patch source = sagemath-threejs.patch - source = pari-stackwarn.patch - source = sagemath-detect-igraph.patch + source = sagemath-ignore-warnings.patch source = sagemath-networkx2.patch source = sagemath-scipy-1.0.patch - source = sagemath-lrs.patch source = sagemath-singular-4.1.1.patch source = sagemath-lcalc-c++11.patch source = pari-ratpoints.patch::https://github.com/sagemath/sage/commit/83458400.patch sha256sums = SKIP - sha256sums = 39b76a189365464998cab9355d177581bc2b15dff10858f316faa85f2efa0426 - sha256sums = c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107 + sha256sums = 6f95ef6960acb3b368bc6245783d88fcadaa63537e1bf9f41d8d91b28e95ddf9 + sha256sums = 9e3c998e0ca8dcbf7ad9f5a8d591f2bc4cb792be14708e064594046081e9b60d sha256sums = 0b680e674c11c47afa86162d8b49645620b8912722e08133d23357c29ca9310a sha256sums = 2cad308f8adbb6c54e6603fa22b2f0eb60f6f09248d5d015000c3932ac14f646 sha256sums = 962ce805c87147212b21fc2ab0ac9af9bd0033942c7a6905b9906645b48e8a4f - sha256sums = ef94908d4ab28d13af622e6e58ec191aa78817d17e4466c7bb6f64ee72a813b9 + sha256sums = 18edeafb01cc1ed7270c2dfb41a58717918680c98e8eada1858736acd65d92ba sha256sums = afd0952b9bb8f52fd428eae36cf719a58ff85a894baae88cbb2124e043768cc7 sha256sums = 7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94 - sha256sums = 514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830 - sha256sums = e4a2f1de73dc3a6deedc1a05d716facd94afc9fe98239c4300e1b67375f95fc1 - sha256sums = 28d7789b8d777922ab8871ca43b6afab751428cae875c0343d3962e6a2030b88 - sha256sums = 1024f3a6a9a1a6ae96d9962bb7d1f5842f4a4a5ff5098afad81a60188b7d5160 + sha256sums = 2d13b15ad2d1511bb3d752a261497060a8901882b1c2fa9813219781b7a71d83 + sha256sums = a4a6c87b46ff23b89608aca66d00427334502e8bfb5dfe68b94497d19be1c7ae + sha256sums = 8253730940687992dd29d90d95bea7e2685bb4854db004090c8196ce92859b64 sha256sums = 17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a - sha256sums = c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c - sha256sums = cc679321c2968d5e74b0ec060979c74019df2995857906bdd1397695b1f24c5c + sha256sums = 369f1483e0364031d73d43d9e63b7bf2b0929c8a1d470c1596f98f9f1aa80750 sha256sums = 5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0 sha256sums = e24ad879f6b2eb970778fc5e867bcbe0a6d393feca8f11f5cb8d07da1f024be9 @@ -152,6 +149,7 @@ pkgname = sagemath-git optdepends = latte-integrale: integral point count in polyhedra optdepends = polymake: polymake backend for polyhedral computations optdepends = shared_meataxe: faster matrix arithmetic over finite fields + optdepends = openblas: faster linear algebra optdepends = sirocco: for computing the fundamental group of the complement of a plane curve optdepends = three.js: alternative 3D plots engine optdepends = sagemath-jupyter: Jupyter kernel @@ -8,7 +8,7 @@ pkgbase=sagemath-git pkgname=(sagemath-git sagemath-jupyter-git) -pkgver=8.2.rc2.r0.g303efaa461 +pkgver=8.3.beta0.r0.g8bdc326ba5 pkgrel=1 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab" arch=(x86_64) @@ -29,33 +29,30 @@ optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cyt 'libhomfly: for computing the homfly polynomial of links' 'libbraiding: for computing in braid groups' 'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations' 'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations' - 'shared_meataxe: faster matrix arithmetic over finite fields' + 'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra' 'sirocco: for computing the fundamental group of the complement of a plane curve' 'three.js: alternative 3D plots engine') makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco mcqd coxeter bliss-graphs tdlib python2-pkgconfig shared_meataxe libfes git) source=(git://git.sagemath.org/sage.git#branch=develop sagemath-env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch - r-no-readline.patch fes02.patch sagemath-threejs.patch pari-stackwarn.patch - sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch - sagemath-singular-4.1.1.patch sagemath-lcalc-c++11.patch + r-no-readline.patch fes02.patch sagemath-threejs.patch sagemath-ignore-warnings.patch + sagemath-networkx2.patch sagemath-scipy-1.0.patch sagemath-singular-4.1.1.patch sagemath-lcalc-c++11.patch pari-ratpoints.patch::"https://github.com/sagemath/sage/commit/83458400.patch") sha256sums=('SKIP' - '39b76a189365464998cab9355d177581bc2b15dff10858f316faa85f2efa0426' - 'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107' + '6f95ef6960acb3b368bc6245783d88fcadaa63537e1bf9f41d8d91b28e95ddf9' + '9e3c998e0ca8dcbf7ad9f5a8d591f2bc4cb792be14708e064594046081e9b60d' '0b680e674c11c47afa86162d8b49645620b8912722e08133d23357c29ca9310a' '2cad308f8adbb6c54e6603fa22b2f0eb60f6f09248d5d015000c3932ac14f646' '962ce805c87147212b21fc2ab0ac9af9bd0033942c7a6905b9906645b48e8a4f' - 'ef94908d4ab28d13af622e6e58ec191aa78817d17e4466c7bb6f64ee72a813b9' + '18edeafb01cc1ed7270c2dfb41a58717918680c98e8eada1858736acd65d92ba' 'afd0952b9bb8f52fd428eae36cf719a58ff85a894baae88cbb2124e043768cc7' '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94' - '514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830' - 'e4a2f1de73dc3a6deedc1a05d716facd94afc9fe98239c4300e1b67375f95fc1' - '28d7789b8d777922ab8871ca43b6afab751428cae875c0343d3962e6a2030b88' - '1024f3a6a9a1a6ae96d9962bb7d1f5842f4a4a5ff5098afad81a60188b7d5160' + '2d13b15ad2d1511bb3d752a261497060a8901882b1c2fa9813219781b7a71d83' + 'a4a6c87b46ff23b89608aca66d00427334502e8bfb5dfe68b94497d19be1c7ae' + '8253730940687992dd29d90d95bea7e2685bb4854db004090c8196ce92859b64' '17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a' - 'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c' - 'cc679321c2968d5e74b0ec060979c74019df2995857906bdd1397695b1f24c5c' + '369f1483e0364031d73d43d9e63b7bf2b0929c8a1d470c1596f98f9f1aa80750' '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0' 'e24ad879f6b2eb970778fc5e867bcbe0a6d393feca8f11f5cb8d07da1f024be9') @@ -82,19 +79,12 @@ prepare(){ patch -p1 -i ../latte-count.patch # make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package patch -p1 -i ../sagemath-python3-notebook.patch -# fix Cremona database detection - sed -e "s|is_package_installed('database_cremona_ellcurve')|os.path.exists('/usr/share/cremona/cremona.db')|" \ - -i src/sage/databases/cremona.py -# fix python-igraph detection - patch -p1 -i ../sagemath-detect-igraph.patch -# fix lrs detection - patch -p1 -i ../sagemath-lrs.patch # adapt to networkx 2 changes patch -p1 -i ../sagemath-networkx2.patch # fix three.js plotting backend patch -p1 -i ../sagemath-threejs.patch -# don't show PARI stack size increase warnings during doctesting (Debian) - patch -p1 -i ../pari-stackwarn.patch +# don't show PARI stack size increase or GLPK warnings during doctesting (Debian) + patch -p1 -i ../sagemath-ignore-warnings.patch # remove deprecated scipy parameters patch -p1 -i ../sagemath-scipy-1.0.patch # fix build with Singular 4.1.1 @@ -109,20 +99,15 @@ prepare(){ patch -p1 -i ../fes02.patch # use python2 - sed -e 's|#!/usr/bin/env sage-python23|#!/usr/bin/env python2|' -e 's|\<#!/usr/bin/env sage-python\>|#!/usr/bin/env python2|' \ - -e 's|\<exec python\>|exec python2|' -i src/bin/* + sed -e 's|#!/usr/bin/env sage-python23|#!/usr/bin/env python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' \ + -e 's|exec python\b|exec python2|' -i src/bin/* sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py - sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage + sed -e 's|exec ipython\b|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython - sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env } build() { - cd sage - autoreconf -vi - ./configure --prefix=/usr || true - - cd src + cd sage/src export SAGE_ROOT="$PWD" export SAGE_SRC="$PWD" @@ -145,7 +130,7 @@ package_sagemath-git() { mkdir -p "$pkgdir"/usr/bin cp bin/sage "$pkgdir"/usr/bin - for _i in arch-env cachegrind callgrind cleaner coverage coverageall cython env env-config eval grep grepdoc inline-fortran \ + for _i in cachegrind callgrind cleaner coverage coverageall cython env eval grep grepdoc inline-fortran \ ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run \ run-cython runtests startuptime.py sws2rst valgrind version.sh do diff --git a/package.patch b/package.patch index 62e1e3df57a1..152786f0c523 100644 --- a/package.patch +++ b/package.patch @@ -1,8 +1,8 @@ --- src/sage/misc/package.py.orig 2014-11-23 15:58:13.000000000 +0100 +++ src/sage/misc/package.py 2015-01-22 20:32:25.651383902 +0100 -@@ -320,7 +320,7 @@ - sage: for pkg in list_packages('pip', local=True): - ....: assert not is_package_installed(pkg) +@@ -329,7 +329,7 @@ + Use the framework provided by :mod:`sage.features` to check + whether a library is installed and functional. """ - return any(p.split('-')[0] == package for p in installed_packages(exclude_pip)) + return True @@ -13,17 +13,18 @@ +++ src/sage_setup/optional_extension.py 2016-10-19 18:38:13.514765366 +0000 @@ -21,8 +21,6 @@ from distutils.extension import Extension - from sage.misc.package import is_package_installed, list_packages + from sage.misc.package import list_packages -all_packages = list_packages(local=True) - class CythonizeExtension(Extension): """ -@@ -76,14 +74,7 @@ +@@ -76,15 +74,7 @@ condition = kwds.pop("condition") except KeyError: pkg = kwds.pop("package") +- from sage.misc.package import is_package_installed - try: - pkginfo = all_packages[pkg] - except KeyError: diff --git a/sagemath-detect-igraph.patch b/sagemath-detect-igraph.patch deleted file mode 100644 index dc6babe49ac5..000000000000 --- a/sagemath-detect-igraph.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py -index 252984f..ce19682 100644 ---- a/src/sage/graphs/generic_graph.py -+++ b/src/sage/graphs/generic_graph.py -@@ -8188,10 +8188,12 @@ class GenericGraph(GenericGraph_pyx): - if algorithm is None: - if vertex_bound: - algorithm = "LP" -- elif is_package_installed("python_igraph"): -- algorithm = "igraph" - else: -- algorithm = "FF" -+ algorithm = "igraph" -+ try: -+ import igraph -+ except ImportError: -+ algorithm = "FF" - - if (algorithm == "FF"): - return self._ford_fulkerson(x,y, value_only=value_only, integer=integer, use_edge_labels=use_edge_labels) - diff --git a/sagemath-env.patch b/sagemath-env.patch index ff08bd0fc63a..906d3efafeca 100644 --- a/sagemath-env.patch +++ b/sagemath-env.patch @@ -41,29 +41,57 @@ -fi +NEW_SAGE_ROOT="/usr" - # Display the Sage startup banner, used in src/bin/sage - sage_banner() { -@@ -185,6 +185,7 @@ + + # Don't execute the commands more than once for the same version of +@@ -174,33 +174,9 @@ export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION export SAGE_ROOT="$NEW_SAGE_ROOT" +export SAGE_LOCAL='/usr' ++export SAGE_SCRIPTS_DIR='/usr/bin' +- +-# sage-env must know where the Sage's script files are. +-# Note that SAGE_SCRIPTS_DIR is only used here, so it does not need to +-# be exported. +-if [ -z "$SAGE_SCRIPTS_DIR" ]; then +- if [ -n "$SAGE_LOCAL" ] && [ -f "$SAGE_LOCAL/bin/sage-env-config" ]; then +- SAGE_SCRIPTS_DIR="$SAGE_LOCAL/bin" +- elif [ -f "$SAGE_ROOT/src/bin/sage-env-config" ]; then +- SAGE_SCRIPTS_DIR="$SAGE_ROOT/src/bin" +- else +- echo >&2 "Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this" +- return 1 +- fi +-elif [ ! -f "$SAGE_SCRIPTS_DIR/sage-env-config" ]; then +- echo >&2 "Error: SAGE_SCRIPTS_DIR is set to a bad value:" +- echo >&2 "SAGE_SCRIPTS_DIR=$SAGE_SCRIPTS_DIR" +- echo >&2 "You must correct it or erase it and rerun this script" +- return 1 +-fi +- +-# Set environment variables (like SAGE_LOCAL) depending on ./configure +-. "$SAGE_SCRIPTS_DIR/sage-env-config" +-if [ $? -ne 0 ]; then +- echo >&2 "Error: failed to source $SAGE_SCRIPTS_DIR/sage-env-config" +- return 1 +-fi - # sage-env must know where the Sage's script files are. -@@ -307,8 +307,9 @@ + # The compilers are set in order of priority by + # 1) environment variables +@@ -296,8 +296,9 @@ export SAGE_EXTCODE="$SAGE_SHARE/sage/ext" export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed" export SAGE_LOGS="$SAGE_ROOT/logs/pkgs" -export SAGE_SRC="$SAGE_ROOT/src" -export SAGE_DOC_SRC="$SAGE_SRC/doc" +export GAP_ROOT_DIR="/usr/lib/gap" -+export SAGE_SRC="$SAGE_SHARE/sage/source" ++export SAGE_SRC="$SAGE_LOCAL/lib/python2.7/site-packages" +export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage" export SAGE_DOC="$SAGE_SHARE/doc/sage" if [ -z "${SAGE_ORIG_PATH_SET}" ]; then -@@ -414,6 +414,9 @@ +@@ -403,6 +403,9 @@ export SAGE_STARTUP_FILE fi @@ -73,7 +101,7 @@ if [ "$PYTHON_EGG_CACHE" = "" ]; then PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs" export PYTHON_EGG_CACHE -@@ -499,7 +499,6 @@ +@@ -488,7 +488,6 @@ fi fi fi @@ -81,7 +109,7 @@ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB -@@ -619,9 +619,6 @@ +@@ -608,9 +608,6 @@ LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH fi @@ -93,7 +121,7 @@ # First, figure out the right values for SAGE_NUM_THREADS (default --- src/sage/env.py.orig 2017-12-07 19:51:25.554281539 +0000 +++ src/sage/env.py 2017-12-07 19:51:42.787654650 +0000 -@@ -117,8 +117,8 @@ +@@ -117,13 +117,13 @@ _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid()) # bunch of sage directories and files @@ -104,4 +132,18 @@ _add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc')) _add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include')) _add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share')) - + +-_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_ROOT', 'src')) ++_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_LOCAL', 'lib', 'python2.7', 'site-packages')) + + try: + sitepackages_dirs = site.getsitepackages() +@@ -163,7 +163,7 @@ + _add_variable_or_fallback('GRAPHS_DATA_DIR', opj('$SAGE_SHARE','graphs')) + _add_variable_or_fallback('ELLCURVE_DATA_DIR',opj('$SAGE_SHARE','ellcurves')) + _add_variable_or_fallback('POLYTOPE_DATA_DIR',opj('$SAGE_SHARE','reflexive_polytopes')) +-_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','gap','latest')) ++_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','lib','gap')) + _add_variable_or_fallback('THEBE_DIR', opj('$SAGE_SHARE','thebe')) + + # locate singular shared object diff --git a/pari-stackwarn.patch b/sagemath-ignore-warnings.patch index b01e1c90f30f..c1094d844bc5 100644 --- a/pari-stackwarn.patch +++ b/sagemath-ignore-warnings.patch @@ -5,19 +5,21 @@ Description: Ignore warnings of PARI increasing the stack size when parsing doct Author: Tobias Hansen <thansen@debian.org> --- sage/src/sage/doctest/parsing.py +++ sage/src/sage/doctest/parsing.py -@@ -40,6 +40,7 @@ +@@ -40,6 +40,8 @@ float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)') optional_regex = re.compile(r'(py2|py3|long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))') +pari_stack_warning_regex = re.compile(r'\s*\*\*\*.*(Warning: increasing stack size to )\d+\.') ++glpk_simplex_warning_regex = re.compile(r'(Long-step dual simplex will be used)') find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M) find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M) random_marker = re.compile('.*random', re.I) -@@ -881,6 +882,7 @@ - u'you' +@@ -935,6 +936,8 @@ + <type 'float'> """ got = self.human_readable_escape_sequences(got) + got = pari_stack_warning_regex.sub('', got) ++ got = glpk_simplex_warning_regex.sub('', got) if isinstance(want, MarkedOutput): if want.random: return True diff --git a/sagemath-lrs.patch b/sagemath-lrs.patch deleted file mode 100644 index f0e5ea4eac8d..000000000000 --- a/sagemath-lrs.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py -index 2115de6800..da94aa5d45 100644 ---- a/src/sage/game_theory/normal_form_game.py -+++ b/src/sage/game_theory/normal_form_game.py -@@ -621,6 +621,7 @@ from sage.matrix.constructor import vector - from sage.misc.package import is_package_installed, PackageNotFoundError - from sage.misc.temporary_file import tmp_filename - from sage.numerical.mip import MixedIntegerLinearProgram -+import os - - try: - from gambit import Game -@@ -1636,7 +1637,7 @@ class NormalFormGame(SageObject, MutableMapping): - if not algorithm: - if self.is_constant_sum(): - algorithm = "lp" -- elif is_package_installed('lrslib'): -+ elif os.path.exists('/usr/bin/lrsnash'): - algorithm = "lrs" - else: - algorithm = "enumeration" - diff --git a/sagemath-networkx2.patch b/sagemath-networkx2.patch index 0b4ca5cf54c5..8090add150ce 100644 --- a/sagemath-networkx2.patch +++ b/sagemath-networkx2.patch @@ -28,7 +28,7 @@ index ff1d02900a..bad4a18539 100644 """ import networkx -@@ -1158,7 +1156,7 @@ class NetworkXGraphBackend(GenericGraphBackend): +@@ -1154,7 +1152,7 @@ class NetworkXGraphBackend(GenericGraphBackend): import networkx try: if self._nxg.is_multigraph(): @@ -37,7 +37,7 @@ index ff1d02900a..bad4a18539 100644 if d.get('weight',None) == l: self._nxg.remove_edge(u,v,k) break -@@ -1227,7 +1225,7 @@ class NetworkXGraphBackend(GenericGraphBackend): +@@ -1223,7 +1221,7 @@ class NetworkXGraphBackend(GenericGraphBackend): """ cdef dict E try: @@ -46,7 +46,7 @@ index ff1d02900a..bad4a18539 100644 except KeyError: from networkx import NetworkXError raise NetworkXError("Edge (%s,%s) requested via get_edge_label does not exist."%(u,v)) -@@ -1416,7 +1414,7 @@ class NetworkXGraphBackend(GenericGraphBackend): +@@ -1412,7 +1410,7 @@ class NetworkXGraphBackend(GenericGraphBackend): sage: G.iterator_nbrs(0) <dictionary-keyiterator object at ...> """ @@ -68,7 +68,7 @@ index 003a8d6bcb..986137a9b0 100644 elif format == 'igraph': if not data.is_directed(): raise ValueError("A *directed* igraph graph was expected. To "+ -@@ -2844,7 +2844,7 @@ class DiGraph(GenericGraph): +@@ -2846,7 +2846,7 @@ class DiGraph(GenericGraph): Using the NetworkX implementation :: sage: D.topological_sort(implementation = "NetworkX") @@ -77,7 +77,7 @@ index 003a8d6bcb..986137a9b0 100644 Using the NetworkX recursive implementation :: -@@ -2870,9 +2870,7 @@ class DiGraph(GenericGraph): +@@ -2872,9 +2872,7 @@ class DiGraph(GenericGraph): sage: D = DiGraph({ 0:[1,2,3], 4:[2,5], 1:[8], 2:[7], 3:[7], ....: 5:[6,7], 7:[8], 6:[9], 8:[10], 9:[10] }) sage: N = D.networkx_graph() @@ -88,7 +88,7 @@ index 003a8d6bcb..986137a9b0 100644 [4, 5, 6, 9, 0, 3, 2, 7, 1, 8, 10] TESTS: -@@ -2895,10 +2893,7 @@ class DiGraph(GenericGraph): +@@ -2897,10 +2895,7 @@ class DiGraph(GenericGraph): elif implementation == "NetworkX" or implementation == "recursive": import networkx @@ -100,28 +100,6 @@ index 003a8d6bcb..986137a9b0 100644 if S is None: raise TypeError('Digraph is not acyclic; there is no topological sort.') else: -diff --git a/src/sage/graphs/generators/basic.py b/src/sage/graphs/generators/basic.py -index 8777b95c4b..28ef7e48f2 100644 ---- a/src/sage/graphs/generators/basic.py -+++ b/src/sage/graphs/generators/basic.py -@@ -437,7 +437,7 @@ def CompleteBipartiteGraph(n1, n2): - - Compare the plotting:: - -- sage: n = networkx.complete_bipartite_graph(11,17) -+ sage: n = networkx.complete_bipartite_graph(11r,17r) - sage: spring_med = Graph(n) - sage: posdict_med = graphs.CompleteBipartiteGraph(11,17) - -@@ -469,7 +469,7 @@ def CompleteBipartiteGraph(n1, n2): - sage: g = [] - sage: j = [] - sage: for i in range(9): -- ....: spr = networkx.complete_bipartite_graph(i+1,4) -+ ....: spr = networkx.complete_bipartite_graph(int(i+1),4r) - ....: k = Graph(spr) - ....: g.append(k) - sage: for i in range(3): diff --git a/src/sage/graphs/generators/families.py b/src/sage/graphs/generators/families.py index 8f81333685..1540ec0dcc 100644 --- a/src/sage/graphs/generators/families.py @@ -149,15 +127,6 @@ diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index 3550f990ef..490813e619 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py -@@ -108,7 +108,7 @@ examples are covered here. - :: - - sage: import networkx -- sage: K = networkx.complete_bipartite_graph(12,7) -+ sage: K = networkx.complete_bipartite_graph(12r,7r) - sage: G = Graph(K) - sage: G.degree() - [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 12, 12, 12, 12, 12, 12, 12] @@ -1199,7 +1199,7 @@ class Graph(GenericGraph): self.allow_loops(loops, check=False) self.allow_multiple_edges(multiedges, check=False) @@ -167,7 +136,7 @@ index 3550f990ef..490813e619 100644 elif format == 'igraph': if data.is_directed(): raise ValueError("An *undirected* igraph graph was expected. "+ -@@ -4600,7 +4600,7 @@ class Graph(GenericGraph): +@@ -4621,7 +4621,7 @@ class Graph(GenericGraph): sage: g = Graph([(0,1,0), (1,2,999), (2,3,-5)]) sage: g.matching(use_edge_labels=True) @@ -176,16 +145,25 @@ index 3550f990ef..490813e619 100644 sage: g.matching(algorithm="LP", use_edge_labels=True) [(1, 2, 999)] -@@ -6288,7 +6288,7 @@ class Graph(GenericGraph): +@@ -4671,7 +4671,7 @@ class Graph(GenericGraph): + else: + for u, v in L: + g.add_edge(u, v) +- d = networkx.max_weight_matching(g) ++ d = dict(networkx.max_weight_matching(g).union(t[::-1] for t in networkx.max_weight_matching(g))) + if value_only: + if use_edge_labels: + return sum(W[u, v] for u, v in six.iteritems(d) if u < v) +@@ -6305,7 +6305,7 @@ class Graph(GenericGraph): return networkx.number_of_cliques(self.networkx_graph(copy=False), vertices, cliques) @doc_index("Clique-related methods") - def cliques_get_max_clique_graph(self, name=''): + def cliques_get_max_clique_graph(self): """ - Returns a graph constructed with maximal cliques as vertices, and - edges between maximal cliques with common members in the original -@@ -6317,7 +6317,7 @@ class Graph(GenericGraph): + Return the clique graph. + +@@ -6336,7 +6336,7 @@ class Graph(GenericGraph): sage: (G.cliques_get_max_clique_graph()).show(figsize=[2,2]) """ import networkx @@ -194,3 +172,4 @@ index 3550f990ef..490813e619 100644 @doc_index("Clique-related methods") def cliques_get_clique_bipartite(self, **kwds): + diff --git a/sagemath-singular-4.1.1.patch b/sagemath-singular-4.1.1.patch index 3c925458521b..5e5d3ba38d2a 100644 --- a/sagemath-singular-4.1.1.patch +++ b/sagemath-singular-4.1.1.patch @@ -2,7 +2,7 @@ diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd index 676544ab1e..5c8639d362 100644 --- a/src/sage/libs/singular/decl.pxd +++ b/src/sage/libs/singular/decl.pxd -@@ -188,7 +188,7 @@ cdef extern from "singular/Singular/libsingular.h": +@@ -170,7 +170,7 @@ cdef extern from "singular/Singular/libsingular.h": int n_NumberOfParameters(const n_Procs_s* r) @@ -11,7 +11,7 @@ index 676544ab1e..5c8639d362 100644 poly *next number *coef unsigned long exp[1] -@@ -650,7 +650,7 @@ cdef extern from "singular/Singular/libsingular.h": +@@ -632,7 +632,7 @@ cdef extern from "singular/Singular/libsingular.h": # divide monomial p by monomial q, p,q const @@ -24,7 +24,7 @@ diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sa index 089524d6b4..ce6d58fc6f 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx -@@ -188,8 +188,8 @@ from sage.libs.singular.decl cimport ( +@@ -190,8 +190,8 @@ from sage.libs.singular.decl cimport ( n_IsUnit, n_Invers, p_ISet, rChangeCurrRing, p_Copy, p_Init, p_SetCoeff, p_Setm, p_SetExp, p_Add_q, p_NSet, p_GetCoeff, p_Delete, p_GetExp, pNext, rRingVar, omAlloc0, omStrDup, @@ -35,7 +35,7 @@ index 089524d6b4..ce6d58fc6f 100644 p_IsUnit, p_Series, p_Head, idInit, fast_map_common_subexp, id_Delete, p_IsHomogeneous, p_Homogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize, idLift, IDELEMS, On, Off, SW_USE_CHINREM_GCD, SW_USE_EZGCD, -@@ -1690,8 +1695,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic): +@@ -1692,8 +1697,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic): if not g._poly: raise ZeroDivisionError @@ -46,7 +46,7 @@ index 089524d6b4..ce6d58fc6f 100644 if coeff: if r.cf.type == n_unknown or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf): n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf) -@@ -1850,8 +1855,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic): +@@ -1852,8 +1857,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic): and (<MPolynomial_libsingular>g) \ and g.parent() is self \ and p_LmDivisibleBy((<MPolynomial_libsingular>g)._poly, m, r): @@ -57,7 +57,7 @@ index 089524d6b4..ce6d58fc6f 100644 #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<MPolynomial_libsingular>g)._poly, r), r), r) p_SetCoeff(flt, n_Init(1, r), r) return new_MP(self,flt), g -@@ -4046,10 +4051,10 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4049,10 +4054,10 @@ cdef class MPolynomial_libsingular(MPolynomial): if _right.is_monomial(): p = _self._poly quo = p_ISet(0,r) diff --git a/sagemath-threejs.patch b/sagemath-threejs.patch index ec9453c03e67..a837db7ea2cc 100644 --- a/sagemath-threejs.patch +++ b/sagemath-threejs.patch @@ -5,7 +5,7 @@ if online: from sage.misc.package import installed_packages - version = installed_packages()['threejs'] -+ version = 'r80' ++ version = 'r90' return """ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script> <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script> diff --git a/test-optional.patch b/test-optional.patch index 1fae8b4962cc..891f8181dc02 100644 --- a/test-optional.patch +++ b/test-optional.patch @@ -1,6 +1,6 @@ --- src/sage/doctest/control.py.orig 2016-10-20 19:39:53.714618246 +0200 +++ src/sage/doctest/control.py 2016-10-20 19:40:15.158049920 +0200 -@@ -320,22 +320,6 @@ +@@ -326,24 +326,6 @@ if "all" in options.optional: # Special case to run all optional tests options.optional = True @@ -20,6 +20,8 @@ - for o in options.optional: - if not optionaltag_regex.search(o): - raise ValueError('invalid optional tag {!r}'.format(o)) - +- +- options.optional |= auto_optional_tags + self.options = options self.files = args |