[arch-commits] Commit in sagemath/repos/community-x86_64 (34 files)

Antonio Rojas arojas at archlinux.org
Fri Dec 15 21:40:17 UTC 2017


    Date: Friday, December 15, 2017 @ 21:40:15
  Author: arojas
Revision: 274538

archrelease: copy trunk to community-x86_64

Added:
  sagemath/repos/community-x86_64/PKGBUILD
    (from rev 274537, sagemath/trunk/PKGBUILD)
  sagemath/repos/community-x86_64/fes02.patch
    (from rev 274537, sagemath/trunk/fes02.patch)
  sagemath/repos/community-x86_64/jupyter-path.patch
    (from rev 274537, sagemath/trunk/jupyter-path.patch)
  sagemath/repos/community-x86_64/latte-count.patch
    (from rev 274537, sagemath/trunk/latte-count.patch)
  sagemath/repos/community-x86_64/package.patch
    (from rev 274537, sagemath/trunk/package.patch)
  sagemath/repos/community-x86_64/pari-stackwarn.patch
    (from rev 274537, sagemath/trunk/pari-stackwarn.patch)
  sagemath/repos/community-x86_64/r-no-readline.patch
    (from rev 274537, sagemath/trunk/r-no-readline.patch)
  sagemath/repos/community-x86_64/sagemath-detect-igraph.patch
    (from rev 274537, sagemath/trunk/sagemath-detect-igraph.patch)
  sagemath/repos/community-x86_64/sagemath-ecl-no-sigfpe.patch
    (from rev 274537, sagemath/trunk/sagemath-ecl-no-sigfpe.patch)
  sagemath/repos/community-x86_64/sagemath-env.patch
    (from rev 274537, sagemath/trunk/sagemath-env.patch)
  sagemath/repos/community-x86_64/sagemath-linbox-1.5.patch
    (from rev 274537, sagemath/trunk/sagemath-linbox-1.5.patch)
  sagemath/repos/community-x86_64/sagemath-lrs.patch
    (from rev 274537, sagemath/trunk/sagemath-lrs.patch)
  sagemath/repos/community-x86_64/sagemath-matplotlib2.patch
    (from rev 274537, sagemath/trunk/sagemath-matplotlib2.patch)
  sagemath/repos/community-x86_64/sagemath-networkx2.patch
    (from rev 274537, sagemath/trunk/sagemath-networkx2.patch)
  sagemath/repos/community-x86_64/sagemath-pynac-0.7.14.patch
    (from rev 274537, sagemath/trunk/sagemath-pynac-0.7.14.patch)
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
    (from rev 274537, sagemath/trunk/sagemath-python3-notebook.patch)
  sagemath/repos/community-x86_64/sagemath-scipy-1.0.patch
    (from rev 274537, sagemath/trunk/sagemath-scipy-1.0.patch)
  sagemath/repos/community-x86_64/sagemath-threejs.patch
    (from rev 274537, sagemath/trunk/sagemath-threejs.patch)
  sagemath/repos/community-x86_64/test-optional.patch
    (from rev 274537, sagemath/trunk/test-optional.patch)
Deleted:
  sagemath/repos/community-x86_64/PKGBUILD
  sagemath/repos/community-x86_64/fes02.patch
  sagemath/repos/community-x86_64/jupyter-path.patch
  sagemath/repos/community-x86_64/latte-count.patch
  sagemath/repos/community-x86_64/package.patch
  sagemath/repos/community-x86_64/r-no-readline.patch
  sagemath/repos/community-x86_64/sagemath-detect-igraph.patch
  sagemath/repos/community-x86_64/sagemath-ecl-no-sigfpe.patch
  sagemath/repos/community-x86_64/sagemath-env.patch
  sagemath/repos/community-x86_64/sagemath-linbox-1.5.patch
  sagemath/repos/community-x86_64/sagemath-networkx2.patch
  sagemath/repos/community-x86_64/sagemath-pynac-0.7.14.patch
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
  sagemath/repos/community-x86_64/sagemath-threejs.patch
  sagemath/repos/community-x86_64/test-optional.patch

---------------------------------+
 PKGBUILD                        |  338 ++++++++++++-----------
 fes02.patch                     |  114 +++----
 jupyter-path.patch              |   44 +--
 latte-count.patch               |  142 ++++-----
 package.patch                   |   76 ++---
 pari-stackwarn.patch            |   23 +
 r-no-readline.patch             |   22 -
 sagemath-detect-igraph.patch    |   42 +-
 sagemath-ecl-no-sigfpe.patch    |   24 -
 sagemath-env.patch              |  210 +++++++-------
 sagemath-linbox-1.5.patch       |  544 +++++++++++++++++++-------------------
 sagemath-lrs.patch              |   22 +
 sagemath-matplotlib2.patch      |  253 +++++++++++++++++
 sagemath-networkx2.patch        |  222 +++++++++++++--
 sagemath-pynac-0.7.14.patch     |  334 +++++++++++------------
 sagemath-python3-notebook.patch |   54 +--
 sagemath-scipy-1.0.patch        |   16 +
 sagemath-threejs.patch          |   22 -
 test-optional.patch             |   50 +--
 19 files changed, 1523 insertions(+), 1029 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-15 21:39:13 UTC (rev 274537)
+++ PKGBUILD	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,164 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
-# Contributor: Osman Ugus <ugus11 at yahoo dot com>
-# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
-# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD
-
-pkgbase=sagemath
-pkgname=(sagemath sagemath-jupyter)
-pkgver=8.1
-pkgrel=1
-pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
-arch=(x86_64)
-url="http://www.sagemath.org"
-license=(GPL)
-depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
-  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
-  eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth
-  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
-optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
-  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
-  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
-  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
-  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
-  'ffmpeg: to export animations to video' 'imagemagick: to show animations'
-  'coxeter3: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-data: for computing Galois groups'
-  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
-  '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'
-  'meataxe: faster matrix arithmetic over finite fields'
-  'sirocco: for computing the fundamental group of the complement of a plane curve'
-  'three.js: alternative 3D plots engine' 'tachyon: alternative 3D plots engine')
-makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco
-  mcqd coxeter3 bliss-graphs tdlib python2-pkgconfig meataxe libfes)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
-        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-ecl-no-sigfpe.patch sagemath-threejs.patch
-        sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch)
-sha256sums=('a42b55c2c8ac244535dc9b87171b7d4dd7e1d498099518ab253354fbe2eaaa7b'
-            '6dc9b101310f80381c61c0312a3e5c648771bfe0de2e94ac46fafe7282a3e0ee'
-            'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107'
-            '0b680e674c11c47afa86162d8b49645620b8912722e08133d23357c29ca9310a'
-            '2cad308f8adbb6c54e6603fa22b2f0eb60f6f09248d5d015000c3932ac14f646'
-            '962ce805c87147212b21fc2ab0ac9af9bd0033942c7a6905b9906645b48e8a4f'
-            'ef94908d4ab28d13af622e6e58ec191aa78817d17e4466c7bb6f64ee72a813b9'
-            'afd0952b9bb8f52fd428eae36cf719a58ff85a894baae88cbb2124e043768cc7'
-            '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
-            'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
-            '514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830'
-            '28d7789b8d777922ab8871ca43b6afab751428cae875c0343d3962e6a2030b88'
-            '37c5c1e694a2aca06c0f1c7d99622ff81fd2bc6a51e8745762294889fa4673f6'
-            'a52d03e04c9d64bb957a1f8dcdae3280ebb9450a7fd76aaf5ae5de5c6f74774f'
-            '538f7b279d72f4b67edb445d386d267f3f7022c1079031ca7ea06f6ce392c906')
-
-prepare(){
-  cd sage-$pkgver
-
-# Arch-specific patches
-# assume all optional packages are installed
-  patch -p0 -i ../package.patch
-# set env variables
-  patch -p0 -i ../sagemath-env.patch
-# don't list optional packages when running tests
-  patch -p0 -i ../test-optional.patch
-# set jupyter path
-  patch -p0 -i ../jupyter-path.patch
-# fix freezes in R interface with readline 7 (Debian)
-  patch -p1 -i ../r-no-readline.patch
-# use correct latte-count binary name
-  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
-# adapt to networkx 2 changes
-  patch -p1 -i ../sagemath-networkx2.patch
-# fix three.js plotting backend
-  patch -p1 -i ../sagemath-threejs.patch
-
-# Upstream patches  
-# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
-  patch -p1 -i ../fes02.patch
-# disable SIGFPE for ecl https://trac.sagemath.org/ticket/22191
-# patch -p1 -i ../sagemath-ecl-no-sigfpe.patch
-# fix build with linbox 1.5 https://trac.sagemath.org/ticket/24214
-  patch -p1 -i ../sagemath-linbox-1.5.patch
-# fix build with pynac 0.7.14 https://trac.sagemath.org/ticket/24329
-  patch -p1 -i ../sagemath-pynac-0.7.14.patch
-
-# use python2
-  sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|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|'cython'|'cython2'|" -i src/bin/sage-cython
-  sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env
-}
-
-
-build() {
-  cd sage-$pkgver
-  autoreconf -vi
-  ./configure --prefix=/usr || true
-
-  cd src
-  export SAGE_LOCAL="/usr"
-  export SAGE_ROOT="$PWD"
-  export SAGE_SRC="$PWD"
-
-  python2 setup.py build
-}
-
-package_sagemath() {
-  optdepends+=('sagemath-jupyter: Jupyter kernel')
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD"
-  export SAGE_LOCAL="/usr"
-  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
-
-  python2 setup.py install --root="$pkgdir" --optimize=1
-
-  mkdir -p "$pkgdir"/usr/bin
-  cp bin/sage "$pkgdir"/usr/bin
-  for _i in arch-env banner cachegrind callgrind cleaner coverage coverageall cython env env-config 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
-    cp bin/sage-$_i "$pkgdir"/usr/bin
-  done
-  cp bin/math-readline "$pkgdir"/usr/bin
-  
-  mkdir -p "$pkgdir"/usr/share/sage
-  cp -r ext "$pkgdir"/usr/share/sage
-  
-# Create SAGE_SRC, needed for the notebook and help
-  mkdir "$pkgdir"/usr/share/sage/source
-  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc
-
-# Remove sage_setup
-  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
-
-# Split jupyter kernel
-  rm -r "$pkgdir"/usr/share/jupyter
-}
-
-package_sagemath-jupyter() {
-  pkgdesc='Jupyter kernel for SageMath'
-  depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax)
-  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD"
-  export SAGE_LOCAL="/usr"
-  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
-
-  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update()"
-}

Copied: sagemath/repos/community-x86_64/PKGBUILD (from rev 274537, sagemath/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,174 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
+# Contributor: Osman Ugus <ugus11 at yahoo dot com>
+# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
+# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD
+
+pkgbase=sagemath
+pkgname=(sagemath sagemath-jupyter)
+pkgver=8.1
+pkgrel=2
+pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
+arch=(x86_64)
+url="http://www.sagemath.org"
+license=(GPL)
+depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
+  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
+  eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth tachyon
+  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
+optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
+  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
+  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
+  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
+  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
+  'ffmpeg: to export animations to video' 'imagemagick: to show animations'
+  'coxeter3: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-data: for computing Galois groups'
+  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
+  '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'
+  'meataxe: faster matrix arithmetic over finite fields'
+  '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 coxeter3 bliss-graphs tdlib python2-pkgconfig meataxe libfes)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
+        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-ecl-no-sigfpe.patch sagemath-threejs.patch pari-stackwarn.patch
+        sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch
+        sagemath-matplotlib2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch)
+sha256sums=('a42b55c2c8ac244535dc9b87171b7d4dd7e1d498099518ab253354fbe2eaaa7b'
+            '6dc9b101310f80381c61c0312a3e5c648771bfe0de2e94ac46fafe7282a3e0ee'
+            'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107'
+            '0b680e674c11c47afa86162d8b49645620b8912722e08133d23357c29ca9310a'
+            '2cad308f8adbb6c54e6603fa22b2f0eb60f6f09248d5d015000c3932ac14f646'
+            '962ce805c87147212b21fc2ab0ac9af9bd0033942c7a6905b9906645b48e8a4f'
+            'ef94908d4ab28d13af622e6e58ec191aa78817d17e4466c7bb6f64ee72a813b9'
+            'afd0952b9bb8f52fd428eae36cf719a58ff85a894baae88cbb2124e043768cc7'
+            '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
+            'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
+            '514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830'
+            'bfd2a20a33ab19a8a8b216a77d07f62e809fe1e1879c4f171ce5dca62fd482e9'
+            '28d7789b8d777922ab8871ca43b6afab751428cae875c0343d3962e6a2030b88'
+            '1024f3a6a9a1a6ae96d9962bb7d1f5842f4a4a5ff5098afad81a60188b7d5160'
+            'a52d03e04c9d64bb957a1f8dcdae3280ebb9450a7fd76aaf5ae5de5c6f74774f'
+            '538f7b279d72f4b67edb445d386d267f3f7022c1079031ca7ea06f6ce392c906'
+            'b9ab2bb5f381ea425e8763b81b8b3a108a3951c594fb1f37f7df921e7c77e26d'
+            '17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a'
+            'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c')
+
+prepare(){
+  cd sage-$pkgver
+
+# Arch-specific patches
+# assume all optional packages are installed
+  patch -p0 -i ../package.patch
+# set env variables
+  patch -p0 -i ../sagemath-env.patch
+# don't list optional packages when running tests
+  patch -p0 -i ../test-optional.patch
+# set jupyter path
+  patch -p0 -i ../jupyter-path.patch
+# fix freezes in R interface with readline 7 (Debian)
+  patch -p1 -i ../r-no-readline.patch
+# use correct latte-count binary name
+  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
+# remove deprecated scipy parameters
+  patch -p1 -i ../sagemath-scipy-1.0.patch
+
+# Upstream patches  
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+  patch -p1 -i ../fes02.patch
+# fix build with linbox 1.5 https://trac.sagemath.org/ticket/24214
+  patch -p1 -i ../sagemath-linbox-1.5.patch
+# fix build with pynac 0.7.14 https://trac.sagemath.org/ticket/24329
+  patch -p1 -i ../sagemath-pynac-0.7.14.patch
+# port away from deprecated and removed functions in matplotlib 2 https://trac.sagemath.org/ticket/23696
+  patch -p1 -i ../sagemath-matplotlib2.patch
+
+# use python2
+  sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|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|'cython'|'cython2'|" -i src/bin/sage-cython
+  sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env
+}
+
+
+build() {
+  cd sage-$pkgver
+  autoreconf -vi
+  ./configure --prefix=/usr || true
+
+  cd src
+  export SAGE_ROOT="$PWD"
+  export SAGE_SRC="$PWD"
+
+  python2 setup.py build
+}
+
+package_sagemath() {
+  optdepends+=('sagemath-jupyter: Jupyter kernel')
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD"
+  export SAGE_LOCAL="/usr"
+  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
+
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  mkdir -p "$pkgdir"/usr/bin
+  cp bin/sage "$pkgdir"/usr/bin
+  for _i in arch-env banner cachegrind callgrind cleaner coverage coverageall cython env env-config 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
+    cp bin/sage-$_i "$pkgdir"/usr/bin
+  done
+  cp bin/math-readline "$pkgdir"/usr/bin
+  
+  mkdir -p "$pkgdir"/usr/share/sage
+  cp -r ext "$pkgdir"/usr/share/sage
+  
+# Create SAGE_SRC, needed for the notebook and help
+  mkdir "$pkgdir"/usr/share/sage/source
+  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc
+
+# Remove sage_setup
+  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
+
+# Split jupyter kernel
+  rm -r "$pkgdir"/usr/share/jupyter
+}
+
+package_sagemath-jupyter() {
+  pkgdesc='Jupyter kernel for SageMath'
+  depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax)
+  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD"
+  export SAGE_LOCAL="/usr"
+  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
+
+  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update()"
+}

Deleted: fes02.patch
===================================================================
--- fes02.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ fes02.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,57 +0,0 @@
-From b1f5e3ecc789db674fe17552812f2d0e2ab84be0 Mon Sep 17 00:00:00 2001
-From: Charles Bouillaguet <charles.bouillaguet at lifl.fr>
-Date: Thu, 19 Sep 2013 10:31:11 +0200
-Subject: updating the libFES binding to match a change in the interface
-
----
- src/sage/libs/fes.pyx | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx
-index 40b9c23..d188cf0 100644
---- a/src/sage/libs/fes.pyx
-+++ b/src/sage/libs/fes.pyx
-@@ -1,17 +1,19 @@
- """
--Binding for the FES library.
-+Binding for the libFES library.
- 
- Finding solutions of systems of boolean equations by exhaustive
- search, via the fes library. This is usually (much) faster than
- computing a Groebner basis, except in special cases where the latter
- is particularly easy.
- 
--The FES library is presently only able to deal with polynomials in 64
-+More information is available at [http://www.lifl.fr/~bouillag/fes].
-+
-+The libFES library is presently only able to deal with polynomials in 64
- variables. Performing a full exhaustive search over 64 variables will
- take a **long** time. The number of variables can be artificially
- reduced to 64 by specializing some of them.
- 
--Note that the FES library **requires** at least of the equations to be
-+Note that the libFES library **requires** at least of the equations to be
- non-linear.
- 
- AUTHORS:
-@@ -71,7 +73,7 @@ from libc.stdint cimport uint64_t
- cdef extern from "fes_interface.h":
-     ctypedef int (*solution_callback_t)(void *, uint64_t)
- 
--    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose)
-+    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose, int T)
- 
- 
- from sage.rings.integer import Integer
-@@ -217,7 +217,7 @@ def exhaustive_search(eqs,  max_sols=Infinity, verbose=False):
- 
-     # ------- runs the library
-     sig_on()
--    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose)
-+    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose, 0)
-     sig_off()
- 
-     # ------- frees memory occupied by the dense representation of the equations
--- 
-cgit v1.0-1-gd88e
-

Copied: sagemath/repos/community-x86_64/fes02.patch (from rev 274537, sagemath/trunk/fes02.patch)
===================================================================
--- fes02.patch	                        (rev 0)
+++ fes02.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,57 @@
+From b1f5e3ecc789db674fe17552812f2d0e2ab84be0 Mon Sep 17 00:00:00 2001
+From: Charles Bouillaguet <charles.bouillaguet at lifl.fr>
+Date: Thu, 19 Sep 2013 10:31:11 +0200
+Subject: updating the libFES binding to match a change in the interface
+
+---
+ src/sage/libs/fes.pyx | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx
+index 40b9c23..d188cf0 100644
+--- a/src/sage/libs/fes.pyx
++++ b/src/sage/libs/fes.pyx
+@@ -1,17 +1,19 @@
+ """
+-Binding for the FES library.
++Binding for the libFES library.
+ 
+ Finding solutions of systems of boolean equations by exhaustive
+ search, via the fes library. This is usually (much) faster than
+ computing a Groebner basis, except in special cases where the latter
+ is particularly easy.
+ 
+-The FES library is presently only able to deal with polynomials in 64
++More information is available at [http://www.lifl.fr/~bouillag/fes].
++
++The libFES library is presently only able to deal with polynomials in 64
+ variables. Performing a full exhaustive search over 64 variables will
+ take a **long** time. The number of variables can be artificially
+ reduced to 64 by specializing some of them.
+ 
+-Note that the FES library **requires** at least of the equations to be
++Note that the libFES library **requires** at least of the equations to be
+ non-linear.
+ 
+ AUTHORS:
+@@ -71,7 +73,7 @@ from libc.stdint cimport uint64_t
+ cdef extern from "fes_interface.h":
+     ctypedef int (*solution_callback_t)(void *, uint64_t)
+ 
+-    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose)
++    void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose, int T)
+ 
+ 
+ from sage.rings.integer import Integer
+@@ -217,7 +217,7 @@ def exhaustive_search(eqs,  max_sols=Infinity, verbose=False):
+ 
+     # ------- runs the library
+     sig_on()
+-    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose)
++    exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose, 0)
+     sig_off()
+ 
+     # ------- frees memory occupied by the dense representation of the equations
+-- 
+cgit v1.0-1-gd88e
+

Deleted: jupyter-path.patch
===================================================================
--- jupyter-path.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ jupyter-path.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,22 +0,0 @@
---- src/sage/repl/ipython_kernel/install.py.orig	2015-10-23 19:23:39.728456590 +0000
-+++ src/sage/repl/ipython_kernel/install.py	2015-10-23 19:24:00.965018978 +0000
-@@ -13,8 +13,7 @@
-     SAGE_DOC, SAGE_LOCAL, SAGE_EXTCODE,
-     SAGE_VERSION
- )
--from jupyter_core.paths import ENV_JUPYTER_PATH
--JUPYTER_PATH = ENV_JUPYTER_PATH[0]
-+JUPYTER_PATH = os.environ.get('JUPYTER_PATH') 
- 
- 
- class SageKernelSpec(object):
-@@ -225,7 +225,7 @@
-             sage: spec._symlink_resources()    # not tested
-         """
-         path = os.path.join(SAGE_EXTCODE, 'notebook-ipython')
--        for filename in os.listdir(path):
-+        for filename in os.listdir('ext/notebook-ipython'):
-             self.symlink(
-                 os.path.join(path, filename),
-                 os.path.join(self.kernel_dir, filename)
-

Copied: sagemath/repos/community-x86_64/jupyter-path.patch (from rev 274537, sagemath/trunk/jupyter-path.patch)
===================================================================
--- jupyter-path.patch	                        (rev 0)
+++ jupyter-path.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,22 @@
+--- src/sage/repl/ipython_kernel/install.py.orig	2015-10-23 19:23:39.728456590 +0000
++++ src/sage/repl/ipython_kernel/install.py	2015-10-23 19:24:00.965018978 +0000
+@@ -13,8 +13,7 @@
+     SAGE_DOC, SAGE_LOCAL, SAGE_EXTCODE,
+     SAGE_VERSION
+ )
+-from jupyter_core.paths import ENV_JUPYTER_PATH
+-JUPYTER_PATH = ENV_JUPYTER_PATH[0]
++JUPYTER_PATH = os.environ.get('JUPYTER_PATH') 
+ 
+ 
+ class SageKernelSpec(object):
+@@ -225,7 +225,7 @@
+             sage: spec._symlink_resources()    # not tested
+         """
+         path = os.path.join(SAGE_EXTCODE, 'notebook-ipython')
+-        for filename in os.listdir(path):
++        for filename in os.listdir('ext/notebook-ipython'):
+             self.symlink(
+                 os.path.join(path, filename),
+                 os.path.join(self.kernel_dir, filename)
+

Deleted: latte-count.patch
===================================================================
--- latte-count.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ latte-count.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,71 +0,0 @@
-diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
-index 268af9db0d..70d41dfa30 100644
---- a/src/sage/geometry/polyhedron/base_ZZ.py
-+++ b/src/sage/geometry/polyhedron/base_ZZ.py
-@@ -171,7 +171,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(maxdet=5, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
-             ...
-             sage: p    # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -179,7 +179,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(dual=True, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -187,7 +187,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(irrational_primal=True, verbose=True)   # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -195,7 +195,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             sage: p = P.ehrhart_polynomial(irrational_all_primal=True, verbose=True)  # optional - latte_int
-             This is LattE integrale ...
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
-             ...
-             sage: p   # optional - latte_int
-             1/2*t^2 + 3/2*t + 1
-@@ -207,7 +207,7 @@ class Polyhedron_ZZ(Polyhedron_base):
-             ...
-             RuntimeError: LattE integrale program failed (exit code 1):
-             ...
--            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
-+            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
-             Unknown command/option --bim-bam-boum=19
-         """
-         if self.is_empty():
-diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
-index 066cedd401..302b39910d 100644
---- a/src/sage/interfaces/latte.py
-+++ b/src/sage/interfaces/latte.py
-@@ -88,7 +88,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
-         sage: n = count(cddin, cdd=True, verbose=True, raw_output=True)  # optional - latte_int
-         This is LattE integrale ...
-         ...
--        Invocation: count '--redundancy-check=none' --cdd /dev/stdin
-+        Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
-         ...
-         Total Unimodular Cones: ...
-         Maximum number of simplicial cones in memory at once: ...
-@@ -108,7 +108,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
-     from sage.misc.misc import SAGE_TMP
-     from sage.rings.integer import Integer
- 
--    args = ['count']
-+    args = ['latte-count']
-     if ehrhart_polynomial and multivariate_generating_function:
-         raise ValueError
-     if ehrhart_polynomial:

Copied: sagemath/repos/community-x86_64/latte-count.patch (from rev 274537, sagemath/trunk/latte-count.patch)
===================================================================
--- latte-count.patch	                        (rev 0)
+++ latte-count.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,71 @@
+diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
+index 268af9db0d..70d41dfa30 100644
+--- a/src/sage/geometry/polyhedron/base_ZZ.py
++++ b/src/sage/geometry/polyhedron/base_ZZ.py
+@@ -171,7 +171,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(maxdet=5, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
+             ...
+             sage: p    # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -179,7 +179,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(dual=True, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -187,7 +187,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(irrational_primal=True, verbose=True)   # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -195,7 +195,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             sage: p = P.ehrhart_polynomial(irrational_all_primal=True, verbose=True)  # optional - latte_int
+             This is LattE integrale ...
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
+             ...
+             sage: p   # optional - latte_int
+             1/2*t^2 + 3/2*t + 1
+@@ -207,7 +207,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+             ...
+             RuntimeError: LattE integrale program failed (exit code 1):
+             ...
+-            Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
++            Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
+             Unknown command/option --bim-bam-boum=19
+         """
+         if self.is_empty():
+diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
+index 066cedd401..302b39910d 100644
+--- a/src/sage/interfaces/latte.py
++++ b/src/sage/interfaces/latte.py
+@@ -88,7 +88,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+         sage: n = count(cddin, cdd=True, verbose=True, raw_output=True)  # optional - latte_int
+         This is LattE integrale ...
+         ...
+-        Invocation: count '--redundancy-check=none' --cdd /dev/stdin
++        Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
+         ...
+         Total Unimodular Cones: ...
+         Maximum number of simplicial cones in memory at once: ...
+@@ -108,7 +108,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+     from sage.misc.misc import SAGE_TMP
+     from sage.rings.integer import Integer
+ 
+-    args = ['count']
++    args = ['latte-count']
+     if ehrhart_polynomial and multivariate_generating_function:
+         raise ValueError
+     if ehrhart_polynomial:

Deleted: package.patch
===================================================================
--- package.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ package.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,38 +0,0 @@
---- 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)
-     """
--    return any(p.split('-')[0] == package for p in installed_packages(exclude_pip))
-+    return True
- 
- def package_versions(package_type, local=False):
-     r"""
---- src/sage_setup/optional_extension.py.orig  2016-10-19 18:35:10.092577510 +0000
-+++ 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
- 
--all_packages = list_packages(local=True)
--
- 
- class CythonizeExtension(Extension):
-     """
-@@ -76,14 +74,7 @@
-         condition = kwds.pop("condition")
-     except KeyError:
-         pkg = kwds.pop("package")
--        try:
--            pkginfo = all_packages[pkg]
--        except KeyError:
--            # Might be an installed old-style package
--            condition = is_package_installed(pkg)
--        else:
--            condition = (pkginfo["installed_version"] == pkginfo["remote_version"])
--
-+        condition = True
-     if condition:
-         return Extension(*args, **kwds)
-     else:

Copied: sagemath/repos/community-x86_64/package.patch (from rev 274537, sagemath/trunk/package.patch)
===================================================================
--- package.patch	                        (rev 0)
+++ package.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,38 @@
+--- 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)
+     """
+-    return any(p.split('-')[0] == package for p in installed_packages(exclude_pip))
++    return True
+ 
+ def package_versions(package_type, local=False):
+     r"""
+--- src/sage_setup/optional_extension.py.orig  2016-10-19 18:35:10.092577510 +0000
++++ 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
+ 
+-all_packages = list_packages(local=True)
+-
+ 
+ class CythonizeExtension(Extension):
+     """
+@@ -76,14 +74,7 @@
+         condition = kwds.pop("condition")
+     except KeyError:
+         pkg = kwds.pop("package")
+-        try:
+-            pkginfo = all_packages[pkg]
+-        except KeyError:
+-            # Might be an installed old-style package
+-            condition = is_package_installed(pkg)
+-        else:
+-            condition = (pkginfo["installed_version"] == pkginfo["remote_version"])
+-
++        condition = True
+     if condition:
+         return Extension(*args, **kwds)
+     else:

Copied: sagemath/repos/community-x86_64/pari-stackwarn.patch (from rev 274537, sagemath/trunk/pari-stackwarn.patch)
===================================================================
--- pari-stackwarn.patch	                        (rev 0)
+++ pari-stackwarn.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,23 @@
+Description: Ignore warnings of PARI increasing the stack size when parsing doctests
+ Since we can't patch PARI to not produce the warnings and we don't want to
+ patch tons of doctests to expect the warnings, we patch the doctest parser
+ to ignore them.
+Author: Tobias Hansen <thansen at debian.org>
+--- sage/src/sage/doctest/parsing.py
++++ sage/src/sage/doctest/parsing.py
+@@ -39,6 +39,7 @@
+ 
+ float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)')
+ optional_regex = re.compile(r'(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+\.')
+ 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)
+@@ -879,6 +880,7 @@
+             'you'
+         """
+         got = self.human_readable_escape_sequences(got)
++        got = pari_stack_warning_regex.sub('', got)
+         if isinstance(want, MarkedOutput):
+             if want.random:
+                 return True

Deleted: r-no-readline.patch
===================================================================
--- r-no-readline.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ r-no-readline.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,11 +0,0 @@
---- a/src/sage/interfaces/r.py
-+++ b/src/sage/interfaces/r.py
-@@ -332,7 +332,7 @@
-                   prompt = '> ', #default, later comes the change
- 
-                   # This is the command that starts up your program
--                  command = "R --vanilla --quiet",
-+                  command = "R --no-readline --vanilla --quiet",
- 
-                   server=server,
-                   server_tmpdir=server_tmpdir,

Copied: sagemath/repos/community-x86_64/r-no-readline.patch (from rev 274537, sagemath/trunk/r-no-readline.patch)
===================================================================
--- r-no-readline.patch	                        (rev 0)
+++ r-no-readline.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,11 @@
+--- a/src/sage/interfaces/r.py
++++ b/src/sage/interfaces/r.py
+@@ -332,7 +332,7 @@
+                   prompt = '> ', #default, later comes the change
+ 
+                   # This is the command that starts up your program
+-                  command = "R --vanilla --quiet",
++                  command = "R --no-readline --vanilla --quiet",
+ 
+                   server=server,
+                   server_tmpdir=server_tmpdir,

Deleted: sagemath-detect-igraph.patch
===================================================================
--- sagemath-detect-igraph.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-detect-igraph.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -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)
-

Copied: sagemath/repos/community-x86_64/sagemath-detect-igraph.patch (from rev 274537, sagemath/trunk/sagemath-detect-igraph.patch)
===================================================================
--- sagemath-detect-igraph.patch	                        (rev 0)
+++ sagemath-detect-igraph.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,21 @@
+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)
+

Deleted: sagemath-ecl-no-sigfpe.patch
===================================================================
--- sagemath-ecl-no-sigfpe.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-ecl-no-sigfpe.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,12 +0,0 @@
-diff --git a/src/sage/libs/ecl.pyx b/src/sage/libs/ecl.pyx
-index 1fafb6c..4f730ad 100644
---- a/src/sage/libs/ecl.pyx
-+++ b/src/sage/libs/ecl.pyx
-@@ -314,6 +314,7 @@ def init_ecl():
-         """))
-     safe_funcall_clobj=cl_eval(string_to_object("(symbol-function 'sage-safe-funcall)"))
- 
-+    cl_eval(string_to_object("(si::trap-fpe T NIL)"))
-     ecl_has_booted = 1
- 
- cdef cl_object ecl_safe_eval(cl_object form) except NULL:

Copied: sagemath/repos/community-x86_64/sagemath-ecl-no-sigfpe.patch (from rev 274537, sagemath/trunk/sagemath-ecl-no-sigfpe.patch)
===================================================================
--- sagemath-ecl-no-sigfpe.patch	                        (rev 0)
+++ sagemath-ecl-no-sigfpe.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,12 @@
+diff --git a/src/sage/libs/ecl.pyx b/src/sage/libs/ecl.pyx
+index 1fafb6c..4f730ad 100644
+--- a/src/sage/libs/ecl.pyx
++++ b/src/sage/libs/ecl.pyx
+@@ -314,6 +314,7 @@ def init_ecl():
+         """))
+     safe_funcall_clobj=cl_eval(string_to_object("(symbol-function 'sage-safe-funcall)"))
+ 
++    cl_eval(string_to_object("(si::trap-fpe T NIL)"))
+     ecl_has_booted = 1
+ 
+ cdef cl_object ecl_safe_eval(cl_object form) except NULL:

Deleted: sagemath-env.patch
===================================================================
--- sagemath-env.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-env.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,105 +0,0 @@
---- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
-+++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
-@@ -111,41 +111,7 @@
- }
- 
- 
--# New value for SAGE_ROOT: either SAGE_ROOT (if given)
--# or a guessed value based on pwd.
--if [ -n "$SAGE_ROOT" ]; then
--    NEW_SAGE_ROOT="$SAGE_ROOT"
--elif [ -f sage -a -d build ]; then
--    NEW_SAGE_ROOT="."
--elif [ -f ../../sage -a -d ../../build ]; then
--    NEW_SAGE_ROOT="../.."
--else
--    # No idea what SAGE_ROOT should be...
--    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
--    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Make NEW_SAGE_ROOT absolute
--NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
--
--# Sanity check NEW_SAGE_ROOT
--if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
--    :
--else
--    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
--    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
--    echo >&2 "or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
--if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
--    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
--    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
--fi
-+NEW_SAGE_ROOT="/usr"
- 
- # Display the Sage startup banner, used in src/bin/sage
- sage_banner() {
-@@ -185,6 +185,7 @@
- export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
- 
- export SAGE_ROOT="$NEW_SAGE_ROOT"
-+export SAGE_LOCAL='/usr'
- 
- 
- # sage-env must know where the Sage's script files are.
-@@ -307,8 +307,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_DOC_SRC="$SAGE_SHARE/doc/sage"
- export SAGE_DOC="$SAGE_SHARE/doc/sage"
- 
- if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
-@@ -414,6 +414,9 @@
-     export SAGE_STARTUP_FILE
- fi
- 
-+export LIBMTX="$DOT_SAGE/meataxe"
-+[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
-+
- if [ "$PYTHON_EGG_CACHE" = "" ]; then
-     PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs"
-     export PYTHON_EGG_CACHE
-@@ -499,7 +499,6 @@
-         fi
-     fi
- fi
--export MAXIMA_PREFIX="$SAGE_LOCAL"
- 
- PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
- 
-@@ -619,9 +619,6 @@
-     LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
- fi
- 
--# See trac 7186 -- this is needed if ecl is moved
--ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
--
- # Handle parallel building/testing/...
- # See Trac Ticket #12016
- # 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
-@@ -118,7 +118,7 @@
- 
- # bunch of sage directories and files
- _add_variable_or_fallback('SAGE_ROOT',       None)
--_add_variable_or_fallback('SAGE_LOCAL',      None)
-+_add_variable_or_fallback('SAGE_LOCAL',      '/usr')
- _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'))
-

Copied: sagemath/repos/community-x86_64/sagemath-env.patch (from rev 274537, sagemath/trunk/sagemath-env.patch)
===================================================================
--- sagemath-env.patch	                        (rev 0)
+++ sagemath-env.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,105 @@
+--- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
++++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
+@@ -111,41 +111,7 @@
+ }
+ 
+ 
+-# New value for SAGE_ROOT: either SAGE_ROOT (if given)
+-# or a guessed value based on pwd.
+-if [ -n "$SAGE_ROOT" ]; then
+-    NEW_SAGE_ROOT="$SAGE_ROOT"
+-elif [ -f sage -a -d build ]; then
+-    NEW_SAGE_ROOT="."
+-elif [ -f ../../sage -a -d ../../build ]; then
+-    NEW_SAGE_ROOT="../.."
+-else
+-    # No idea what SAGE_ROOT should be...
+-    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
+-    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Make NEW_SAGE_ROOT absolute
+-NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
+-
+-# Sanity check NEW_SAGE_ROOT
+-if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
+-    :
+-else
+-    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
+-    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
+-    echo >&2 "or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
+-if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
+-    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
+-    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
+-fi
++NEW_SAGE_ROOT="/usr"
+ 
+ # Display the Sage startup banner, used in src/bin/sage
+ sage_banner() {
+@@ -185,6 +185,7 @@
+ export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
+ 
+ export SAGE_ROOT="$NEW_SAGE_ROOT"
++export SAGE_LOCAL='/usr'
+ 
+ 
+ # sage-env must know where the Sage's script files are.
+@@ -307,8 +307,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_DOC_SRC="$SAGE_SHARE/doc/sage"
+ export SAGE_DOC="$SAGE_SHARE/doc/sage"
+ 
+ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
+@@ -414,6 +414,9 @@
+     export SAGE_STARTUP_FILE
+ fi
+ 
++export LIBMTX="$DOT_SAGE/meataxe"
++[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
++
+ if [ "$PYTHON_EGG_CACHE" = "" ]; then
+     PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs"
+     export PYTHON_EGG_CACHE
+@@ -499,7 +499,6 @@
+         fi
+     fi
+ fi
+-export MAXIMA_PREFIX="$SAGE_LOCAL"
+ 
+ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
+ 
+@@ -619,9 +619,6 @@
+     LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
+ fi
+ 
+-# See trac 7186 -- this is needed if ecl is moved
+-ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
+-
+ # Handle parallel building/testing/...
+ # See Trac Ticket #12016
+ # 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
+@@ -118,7 +118,7 @@
+ 
+ # bunch of sage directories and files
+ _add_variable_or_fallback('SAGE_ROOT',       None)
+-_add_variable_or_fallback('SAGE_LOCAL',      None)
++_add_variable_or_fallback('SAGE_LOCAL',      '/usr')
+ _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'))
+

Deleted: sagemath-linbox-1.5.patch
===================================================================
--- sagemath-linbox-1.5.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-linbox-1.5.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,272 +0,0 @@
-diff --git a/src/sage/libs/linbox/fflas.pxd b/src/sage/libs/linbox/fflas.pxd
-index ca23d71..03bbee9 100644
---- a/src/sage/libs/linbox/fflas.pxd
-+++ b/src/sage/libs/linbox/fflas.pxd
-@@ -20,19 +20,29 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "std":
-         iterator end()
-         size_t size()
- 
--    cdef cppclass list[T]:
--        cppclass iterator:
--            T operator*()
--            iterator operator++()
--            bint operator==(iterator)
--            bint operator!=(iterator)
--        void push_back(T&)
--        void pop_front()
--        T& front()
--        iterator begin()
--        iterator end()
-+cdef extern from "givaro/givpoly1.h":
-+    ## template < typename T, typename A=std::allocator<T> >
-+    ## class givvector : public __GIV_STANDARD_VECTOR<T,A>
-+    cdef cppclass givvector "Givaro::givvector" [T,ALLOCATOR=*]:
-+        T& operator[](size_t i)
-         size_t size()
--        void clear()
-+
-+ctypedef givvector[ModDoubleFieldElement] ModDoubleDensePolynomial
-+ctypedef givvector[ModFloatFieldElement] ModFloatDensePolynomial
-+
-+cdef extern from "givaro/givpoly1.h":
-+    ## template <class Domain, class StorageTag= Givaro::Dense>
-+    ## class GivPolynomialRing : public Givaro::Poly1FactorDom< Domain,StorageTag>
-+    cdef cppclass ModDoublePolynomialRing "Givaro::Poly1Dom<Givaro::Modular<double>, Givaro::Dense>":
-+        ctypedef givvector[ModDoubleField] Element
-+        ctypedef givvector[ModDoubleField] Polynomial
-+        ModDoublePolynomialRing(ModDoubleField& F)
-+    ## template <class Domain, class StorageTag= Givaro::Dense>
-+    ## class GivPolynomialRing : public Givaro::Poly1FactorDom< Domain,StorageTag>
-+    cdef cppclass ModFloatPolynomialRing "Givaro::Poly1Dom<Givaro::Modular<float>, Givaro::Dense>":
-+        ctypedef givvector[ModFloatField] Element
-+        ctypedef givvector[ModFloatField] Polynomial
-+        ModFloatPolynomialRing(ModFloatField& F)
- 
- cdef extern from "fflas-ffpack/fflas-ffpack.h":
-     ctypedef enum fflas_trans_enum "FFLAS::FFLAS_TRANSPOSE":
-@@ -105,13 +115,12 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h":
-                                             size_t nr, size_t foo, size_t r,
-                                             ModDoubleFieldElement* matrix, size_t nc, size_t* Q)
- 
--    void ModDouble_MinPoly "FFPACK::MinPoly" ( ModDoubleField F,
-+    void ModDouble_MinPoly "FFPACK::MinPoly" ( ModDoubleField& F,
-                                                vector[ModDoubleFieldElement] minP, size_t N,
--                                               ModDoubleFieldElement* A, size_t lda,
--                                               ModDoubleFieldElement* X, size_t ldx, size_t* P)
-+                                               ModDoubleFieldElement*A, size_t lda)
- 
--    void ModDouble_CharPoly "FFPACK::CharPoly" ( ModDoubleField F,
--                                                 list[vector[ModDoubleFieldElement]] charp, size_t N,
-+    void ModDouble_CharPoly "FFPACK::CharPoly" ( ModDoublePolynomialRing& R,
-+                                                 ModDoubleDensePolynomial& charp, size_t N,
-                                                  ModDoubleFieldElement* A, size_t lda)
- 
-     # float
-@@ -142,9 +151,8 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h":
- 
-     void ModFloat_MinPoly "FFPACK::MinPoly" ( ModFloatField F,
-                                               vector[ModFloatFieldElement] minP, size_t N,
--                                              ModFloatFieldElement* A, size_t lda,
--                                              ModFloatFieldElement* X, size_t ldx, size_t* P)
-+                                              ModFloatFieldElement* A, size_t lda)
- 
--    void ModFloat_CharPoly "FFPACK::CharPoly" ( ModFloatField F,
--                                                list[vector[ModFloatFieldElement]] charp, size_t N,
-+    void ModFloat_CharPoly "FFPACK::CharPoly" ( ModFloatPolynomialRing& F,
-+                                                ModFloatDensePolynomial& charp, size_t N,
-                                                 ModFloatFieldElement* A, size_t lda )
-diff --git a/src/sage/libs/linbox/linbox_flint_interface.pyx b/src/sage/libs/linbox/linbox_flint_interface.pyx
-index 02a6151..a00d303 100644
---- a/src/sage/libs/linbox/linbox_flint_interface.pyx
-+++ b/src/sage/libs/linbox/linbox_flint_interface.pyx
-@@ -76,19 +76,23 @@ cdef extern from "givaro/zring.h":
-         ctypedef GivaroInteger Element
- 
- 
--cdef extern from "givaro/givpoly1.h":
--    ## template < typename T, typename A=std::allocator<T> >
--    ## class givvector : public __GIV_STANDARD_VECTOR<T,A>
--    cdef cppclass givvector "Givaro::givvector" [T,ALLOCATOR=*]:
--        T& operator[](size_t i)
-+cdef extern from "linbox/polynomial/dense-polynomial.h":
-+    ## template<class Field>
-+    ## class DensePolynomial : public Givaro::Poly1FactorDom<Field, Givaro::Dense>::Element
-+    cdef cppclass LinBoxIntegerDensePolynomial "LinBox::DensePolynomial<Givaro::ZRing<Givaro::Integer> >":
-+        ctypedef GivaroIntegerRing BaseRing
-+        ctypedef GivaroInteger BaseRingElement
-+        LinBoxIntegerDensePolynomial(BaseRing &F)
-+        LinBoxIntegerDensePolynomial(BaseRing &F, size_t s)
-+        BaseRingElement& operator[](size_t i)
-         size_t size()
- 
--cdef extern from "linbox/ring/givaro-polynomial.h":
--    ## template <class Domain, class StorageTag= Givaro::Dense>
--    ## class GivPolynomialRing : public Givaro::Poly1FactorDom< Domain,StorageTag>
--    cdef cppclass LinBoxIntegerPolynomialRing "LinBox::GivPolynomialRing<Givaro::ZRing<Givaro::Integer>, Givaro::Dense>":
--        ctypedef givvector[GivaroInteger] Element
--        ctypedef givvector[GivaroInteger] Polynomial
-+cdef extern from "linbox/ring/polynomial-ring.h":
-+    ## template <class BaseRing, class StorageTag= Givaro::Dense>
-+    ##	class PolynomialRing : public Givaro::Poly1FactorDom<BaseRing,StorageTag>
-+    cdef cppclass LinBoxIntegerPolynomialRing "LinBox::PolynomialRing<Givaro::ZRing<Givaro::Integer>, Givaro::Dense>":
-+        ctypedef LinBoxIntegerDensePolynomial Element
-+        ctypedef LinBoxIntegerDensePolynomial Polynomial
- 
- cdef extern from "linbox/matrix/matrix-domain.h":
-     ## template <class Field_ >
-@@ -190,40 +194,32 @@ cdef void linbox_fmpz_mat_mul(fmpz_mat_t C, fmpz_mat_t A, fmpz_mat_t B):
- cdef void linbox_fmpz_mat_charpoly(fmpz_poly_t cp, fmpz_mat_t A):
-     cdef GivaroIntegerRing ZZ
-     cdef LinBoxIntegerDenseMatrix * LBA
--    cdef LinBoxIntegerPolynomialRing.Element m_A
--
--    # FIXME: bug in LinBox
--    # see https://github.com/linbox-team/linbox/issues/51
--    if fmpz_mat_nrows(A) == 0:
--        fmpz_poly_one(cp)
--        return
-+    cdef LinBoxIntegerDensePolynomial * m_A
- 
-     LBA = new LinBoxIntegerDenseMatrix(ZZ, fmpz_mat_nrows(A), fmpz_mat_ncols(A))
-     fmpz_mat_get_linbox(LBA[0], A)
--    LinBoxIntegerDense_charpoly(m_A, LBA[0])
--    fmpz_poly_set_linbox(cp, m_A)
-+    m_A = new LinBoxIntegerDensePolynomial(ZZ, fmpz_mat_nrows(A))
-+    LinBoxIntegerDense_charpoly(m_A[0], LBA[0])
-+    fmpz_poly_set_linbox(cp, m_A[0])
- 
-     del LBA
-+    del m_A
- 
- 
- # set mp to the minimal polynomial of A
- cdef void linbox_fmpz_mat_minpoly(fmpz_poly_t mp, fmpz_mat_t A):
-     cdef GivaroIntegerRing ZZ
-     cdef LinBoxIntegerDenseMatrix * LBA
--    cdef LinBoxIntegerPolynomialRing.Element m_A
--
--    # FIXME: bug in LinBox
--    # see https://github.com/linbox-team/linbox/issues/51
--    if fmpz_mat_nrows(A) == 0:
--        fmpz_poly_one(mp)
--        return
-+    cdef LinBoxIntegerDensePolynomial * m_A
- 
-     LBA = new LinBoxIntegerDenseMatrix(ZZ, fmpz_mat_nrows(A), fmpz_mat_ncols(A))
-+    m_A = new LinBoxIntegerDensePolynomial(ZZ)
-     fmpz_mat_get_linbox(LBA[0], A)
--    LinBoxIntegerDense_minpoly(m_A, LBA[0])
--    fmpz_poly_set_linbox(mp, m_A)
-+    LinBoxIntegerDense_minpoly(m_A[0], LBA[0])
-+    fmpz_poly_set_linbox(mp, m_A[0])
- 
-     del LBA
-+    del m_A
- 
- 
- # return the rank of A
-diff --git a/src/sage/matrix/matrix_modn_dense_double.pyx b/src/sage/matrix/matrix_modn_dense_double.pyx
-index 15c35cb..b1f6154 100644
---- a/src/sage/matrix/matrix_modn_dense_double.pyx
-+++ b/src/sage/matrix/matrix_modn_dense_double.pyx
-@@ -27,7 +27,9 @@ from sage.libs.linbox.fflas cimport ModDouble_fgemm as Mod_fgemm, ModDouble_fgem
-     ModDoubleRank as ModRank, ModDouble_echelon as Mod_echelon, \
-     ModDouble_applyp as Mod_applyp, \
-     ModDouble_MinPoly as Mod_MinPoly, \
--    ModDouble_CharPoly as Mod_CharPoly
-+    ModDouble_CharPoly as Mod_CharPoly, \
-+    ModDoublePolynomialRing as ModDensePolyRing,\
-+    ModDoubleDensePolynomial as ModDensePoly
- 
- # Limit for LinBox Modular<double>
- MAX_MODULUS = 2**23
-diff --git a/src/sage/matrix/matrix_modn_dense_float.pyx b/src/sage/matrix/matrix_modn_dense_float.pyx
-index 61457ce..eda8f0b 100644
---- a/src/sage/matrix/matrix_modn_dense_float.pyx
-+++ b/src/sage/matrix/matrix_modn_dense_float.pyx
-@@ -25,7 +25,10 @@ from sage.libs.linbox.fflas cimport ModFloat_fgemm as Mod_fgemm, ModFloat_fgemv
-         ModFloatRank as ModRank, ModFloat_echelon as Mod_echelon, \
-         ModFloat_applyp as Mod_applyp, \
-         ModFloat_MinPoly as Mod_MinPoly, \
--        ModFloat_CharPoly as Mod_CharPoly
-+        ModFloat_CharPoly as Mod_CharPoly, \
-+        ModFloatPolynomialRing as ModDensePolyRing,\
-+        ModFloatDensePolynomial as ModDensePoly
-+
- 
- # LinBox supports up to 2^11 using float but that's double dog slow,
- # so we pick a smaller value for crossover
-diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
-index 3da3e31..819ef2d 100644
---- a/src/sage/matrix/matrix_modn_dense_template.pxi
-+++ b/src/sage/matrix/matrix_modn_dense_template.pxi
-@@ -306,23 +306,15 @@ cdef inline linbox_minpoly(celement modulus, Py_ssize_t nrows, celement* entries
-     cdef Py_ssize_t i
-     cdef ModField *F = new ModField(<long>modulus)
-     cdef vector[ModFieldElement] *minP = new vector[ModFieldElement]()
--    cdef ModFieldElement *X = <ModFieldElement*>check_allocarray(nrows * (nrows+1), sizeof(ModFieldElement))
--    cdef size_t *P = <size_t*>check_allocarray(nrows, sizeof(size_t))
--
--    cdef celement *cpy = linbox_copy(modulus, entries, nrows, nrows)
- 
-     if nrows*nrows > 1000: sig_on()
--    Mod_MinPoly(F[0], minP[0], nrows, <ModFieldElement*>cpy, nrows, X, nrows, P)
-+    Mod_MinPoly(F[0], minP[0], nrows, <ModFieldElement*>entries, nrows)
-     if nrows*nrows > 1000: sig_off()
- 
--    sig_free(cpy)
--
-     l = []
-     for i in range(minP.size()):
-         l.append( <celement>minP.at(i) )
- 
--    sig_free(P)
--    sig_free(X)
-     del F
-     return l
- 
-@@ -332,27 +324,23 @@ cdef inline linbox_charpoly(celement modulus, Py_ssize_t nrows, celement* entrie
-     """
-     cdef Py_ssize_t i
-     cdef ModField *F = new ModField(<long>modulus)
--    cdef std_list[vector[ModFieldElement]] P_list
--    P_list.clear()
-+    cdef ModDensePolyRing * R = new ModDensePolyRing(F[0])
-+    cdef ModDensePoly  P
- 
-     cdef celement *cpy = linbox_copy(modulus, entries, nrows, nrows)
- 
-     if nrows*nrows > 1000: sig_on()
--    Mod_CharPoly(F[0], P_list, nrows, <ModFieldElement*>cpy, nrows)
-+    Mod_CharPoly(R[0], P, nrows, <ModFieldElement*>cpy, nrows)
-     if nrows*nrows > 1000: sig_off()
- 
-     sig_free(cpy)
- 
--    cdef vector[ModFieldElement] tmp
-     l = []
--    while P_list.size():
--        l.append([])
--        tmp = P_list.front()
--        for i in range(tmp.size()):
--            l[-1].append(<celement>tmp.at(i))
--        P_list.pop_front()
-+    for i in range(P.size()):
-+        l.append(<celement>P[i])
- 
-     del F
-+    del R
-     return l
- 
- 
-@@ -1731,9 +1719,7 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
-         R = self._base_ring[var]
-         # call linbox for charpoly
-         v = linbox_charpoly(self.p, self._nrows, self._entries)
--        r = R(1)
--        for e in v:
--            r *= R(e)
-+        r = R(v)
-         return r
- 
-     def echelonize(self, algorithm="linbox", **kwds):

Copied: sagemath/repos/community-x86_64/sagemath-linbox-1.5.patch (from rev 274537, sagemath/trunk/sagemath-linbox-1.5.patch)
===================================================================
--- sagemath-linbox-1.5.patch	                        (rev 0)
+++ sagemath-linbox-1.5.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,272 @@
+diff --git a/src/sage/libs/linbox/fflas.pxd b/src/sage/libs/linbox/fflas.pxd
+index ca23d71..03bbee9 100644
+--- a/src/sage/libs/linbox/fflas.pxd
++++ b/src/sage/libs/linbox/fflas.pxd
+@@ -20,19 +20,29 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h" namespace "std":
+         iterator end()
+         size_t size()
+ 
+-    cdef cppclass list[T]:
+-        cppclass iterator:
+-            T operator*()
+-            iterator operator++()
+-            bint operator==(iterator)
+-            bint operator!=(iterator)
+-        void push_back(T&)
+-        void pop_front()
+-        T& front()
+-        iterator begin()
+-        iterator end()
++cdef extern from "givaro/givpoly1.h":
++    ## template < typename T, typename A=std::allocator<T> >
++    ## class givvector : public __GIV_STANDARD_VECTOR<T,A>
++    cdef cppclass givvector "Givaro::givvector" [T,ALLOCATOR=*]:
++        T& operator[](size_t i)
+         size_t size()
+-        void clear()
++
++ctypedef givvector[ModDoubleFieldElement] ModDoubleDensePolynomial
++ctypedef givvector[ModFloatFieldElement] ModFloatDensePolynomial
++
++cdef extern from "givaro/givpoly1.h":
++    ## template <class Domain, class StorageTag= Givaro::Dense>
++    ## class GivPolynomialRing : public Givaro::Poly1FactorDom< Domain,StorageTag>
++    cdef cppclass ModDoublePolynomialRing "Givaro::Poly1Dom<Givaro::Modular<double>, Givaro::Dense>":
++        ctypedef givvector[ModDoubleField] Element
++        ctypedef givvector[ModDoubleField] Polynomial
++        ModDoublePolynomialRing(ModDoubleField& F)
++    ## template <class Domain, class StorageTag= Givaro::Dense>
++    ## class GivPolynomialRing : public Givaro::Poly1FactorDom< Domain,StorageTag>
++    cdef cppclass ModFloatPolynomialRing "Givaro::Poly1Dom<Givaro::Modular<float>, Givaro::Dense>":
++        ctypedef givvector[ModFloatField] Element
++        ctypedef givvector[ModFloatField] Polynomial
++        ModFloatPolynomialRing(ModFloatField& F)
+ 
+ cdef extern from "fflas-ffpack/fflas-ffpack.h":
+     ctypedef enum fflas_trans_enum "FFLAS::FFLAS_TRANSPOSE":
+@@ -105,13 +115,12 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h":
+                                             size_t nr, size_t foo, size_t r,
+                                             ModDoubleFieldElement* matrix, size_t nc, size_t* Q)
+ 
+-    void ModDouble_MinPoly "FFPACK::MinPoly" ( ModDoubleField F,
++    void ModDouble_MinPoly "FFPACK::MinPoly" ( ModDoubleField& F,
+                                                vector[ModDoubleFieldElement] minP, size_t N,
+-                                               ModDoubleFieldElement* A, size_t lda,
+-                                               ModDoubleFieldElement* X, size_t ldx, size_t* P)
++                                               ModDoubleFieldElement*A, size_t lda)
+ 
+-    void ModDouble_CharPoly "FFPACK::CharPoly" ( ModDoubleField F,
+-                                                 list[vector[ModDoubleFieldElement]] charp, size_t N,
++    void ModDouble_CharPoly "FFPACK::CharPoly" ( ModDoublePolynomialRing& R,
++                                                 ModDoubleDensePolynomial& charp, size_t N,
+                                                  ModDoubleFieldElement* A, size_t lda)
+ 
+     # float
+@@ -142,9 +151,8 @@ cdef extern from "fflas-ffpack/fflas-ffpack.h":
+ 
+     void ModFloat_MinPoly "FFPACK::MinPoly" ( ModFloatField F,
+                                               vector[ModFloatFieldElement] minP, size_t N,
+-                                              ModFloatFieldElement* A, size_t lda,
+-                                              ModFloatFieldElement* X, size_t ldx, size_t* P)
++                                              ModFloatFieldElement* A, size_t lda)
+ 
+-    void ModFloat_CharPoly "FFPACK::CharPoly" ( ModFloatField F,
+-                                                list[vector[ModFloatFieldElement]] charp, size_t N,
++    void ModFloat_CharPoly "FFPACK::CharPoly" ( ModFloatPolynomialRing& F,
++                                                ModFloatDensePolynomial& charp, size_t N,
+                                                 ModFloatFieldElement* A, size_t lda )
+diff --git a/src/sage/libs/linbox/linbox_flint_interface.pyx b/src/sage/libs/linbox/linbox_flint_interface.pyx
+index 02a6151..a00d303 100644
+--- a/src/sage/libs/linbox/linbox_flint_interface.pyx
++++ b/src/sage/libs/linbox/linbox_flint_interface.pyx
+@@ -76,19 +76,23 @@ cdef extern from "givaro/zring.h":
+         ctypedef GivaroInteger Element
+ 
+ 
+-cdef extern from "givaro/givpoly1.h":
+-    ## template < typename T, typename A=std::allocator<T> >
+-    ## class givvector : public __GIV_STANDARD_VECTOR<T,A>
+-    cdef cppclass givvector "Givaro::givvector" [T,ALLOCATOR=*]:
+-        T& operator[](size_t i)
++cdef extern from "linbox/polynomial/dense-polynomial.h":
++    ## template<class Field>
++    ## class DensePolynomial : public Givaro::Poly1FactorDom<Field, Givaro::Dense>::Element
++    cdef cppclass LinBoxIntegerDensePolynomial "LinBox::DensePolynomial<Givaro::ZRing<Givaro::Integer> >":
++        ctypedef GivaroIntegerRing BaseRing
++        ctypedef GivaroInteger BaseRingElement
++        LinBoxIntegerDensePolynomial(BaseRing &F)
++        LinBoxIntegerDensePolynomial(BaseRing &F, size_t s)
++        BaseRingElement& operator[](size_t i)
+         size_t size()
+ 
+-cdef extern from "linbox/ring/givaro-polynomial.h":
+-    ## template <class Domain, class StorageTag= Givaro::Dense>
+-    ## class GivPolynomialRing : public Givaro::Poly1FactorDom< Domain,StorageTag>
+-    cdef cppclass LinBoxIntegerPolynomialRing "LinBox::GivPolynomialRing<Givaro::ZRing<Givaro::Integer>, Givaro::Dense>":
+-        ctypedef givvector[GivaroInteger] Element
+-        ctypedef givvector[GivaroInteger] Polynomial
++cdef extern from "linbox/ring/polynomial-ring.h":
++    ## template <class BaseRing, class StorageTag= Givaro::Dense>
++    ##	class PolynomialRing : public Givaro::Poly1FactorDom<BaseRing,StorageTag>
++    cdef cppclass LinBoxIntegerPolynomialRing "LinBox::PolynomialRing<Givaro::ZRing<Givaro::Integer>, Givaro::Dense>":
++        ctypedef LinBoxIntegerDensePolynomial Element
++        ctypedef LinBoxIntegerDensePolynomial Polynomial
+ 
+ cdef extern from "linbox/matrix/matrix-domain.h":
+     ## template <class Field_ >
+@@ -190,40 +194,32 @@ cdef void linbox_fmpz_mat_mul(fmpz_mat_t C, fmpz_mat_t A, fmpz_mat_t B):
+ cdef void linbox_fmpz_mat_charpoly(fmpz_poly_t cp, fmpz_mat_t A):
+     cdef GivaroIntegerRing ZZ
+     cdef LinBoxIntegerDenseMatrix * LBA
+-    cdef LinBoxIntegerPolynomialRing.Element m_A
+-
+-    # FIXME: bug in LinBox
+-    # see https://github.com/linbox-team/linbox/issues/51
+-    if fmpz_mat_nrows(A) == 0:
+-        fmpz_poly_one(cp)
+-        return
++    cdef LinBoxIntegerDensePolynomial * m_A
+ 
+     LBA = new LinBoxIntegerDenseMatrix(ZZ, fmpz_mat_nrows(A), fmpz_mat_ncols(A))
+     fmpz_mat_get_linbox(LBA[0], A)
+-    LinBoxIntegerDense_charpoly(m_A, LBA[0])
+-    fmpz_poly_set_linbox(cp, m_A)
++    m_A = new LinBoxIntegerDensePolynomial(ZZ, fmpz_mat_nrows(A))
++    LinBoxIntegerDense_charpoly(m_A[0], LBA[0])
++    fmpz_poly_set_linbox(cp, m_A[0])
+ 
+     del LBA
++    del m_A
+ 
+ 
+ # set mp to the minimal polynomial of A
+ cdef void linbox_fmpz_mat_minpoly(fmpz_poly_t mp, fmpz_mat_t A):
+     cdef GivaroIntegerRing ZZ
+     cdef LinBoxIntegerDenseMatrix * LBA
+-    cdef LinBoxIntegerPolynomialRing.Element m_A
+-
+-    # FIXME: bug in LinBox
+-    # see https://github.com/linbox-team/linbox/issues/51
+-    if fmpz_mat_nrows(A) == 0:
+-        fmpz_poly_one(mp)
+-        return
++    cdef LinBoxIntegerDensePolynomial * m_A
+ 
+     LBA = new LinBoxIntegerDenseMatrix(ZZ, fmpz_mat_nrows(A), fmpz_mat_ncols(A))
++    m_A = new LinBoxIntegerDensePolynomial(ZZ)
+     fmpz_mat_get_linbox(LBA[0], A)
+-    LinBoxIntegerDense_minpoly(m_A, LBA[0])
+-    fmpz_poly_set_linbox(mp, m_A)
++    LinBoxIntegerDense_minpoly(m_A[0], LBA[0])
++    fmpz_poly_set_linbox(mp, m_A[0])
+ 
+     del LBA
++    del m_A
+ 
+ 
+ # return the rank of A
+diff --git a/src/sage/matrix/matrix_modn_dense_double.pyx b/src/sage/matrix/matrix_modn_dense_double.pyx
+index 15c35cb..b1f6154 100644
+--- a/src/sage/matrix/matrix_modn_dense_double.pyx
++++ b/src/sage/matrix/matrix_modn_dense_double.pyx
+@@ -27,7 +27,9 @@ from sage.libs.linbox.fflas cimport ModDouble_fgemm as Mod_fgemm, ModDouble_fgem
+     ModDoubleRank as ModRank, ModDouble_echelon as Mod_echelon, \
+     ModDouble_applyp as Mod_applyp, \
+     ModDouble_MinPoly as Mod_MinPoly, \
+-    ModDouble_CharPoly as Mod_CharPoly
++    ModDouble_CharPoly as Mod_CharPoly, \
++    ModDoublePolynomialRing as ModDensePolyRing,\
++    ModDoubleDensePolynomial as ModDensePoly
+ 
+ # Limit for LinBox Modular<double>
+ MAX_MODULUS = 2**23
+diff --git a/src/sage/matrix/matrix_modn_dense_float.pyx b/src/sage/matrix/matrix_modn_dense_float.pyx
+index 61457ce..eda8f0b 100644
+--- a/src/sage/matrix/matrix_modn_dense_float.pyx
++++ b/src/sage/matrix/matrix_modn_dense_float.pyx
+@@ -25,7 +25,10 @@ from sage.libs.linbox.fflas cimport ModFloat_fgemm as Mod_fgemm, ModFloat_fgemv
+         ModFloatRank as ModRank, ModFloat_echelon as Mod_echelon, \
+         ModFloat_applyp as Mod_applyp, \
+         ModFloat_MinPoly as Mod_MinPoly, \
+-        ModFloat_CharPoly as Mod_CharPoly
++        ModFloat_CharPoly as Mod_CharPoly, \
++        ModFloatPolynomialRing as ModDensePolyRing,\
++        ModFloatDensePolynomial as ModDensePoly
++
+ 
+ # LinBox supports up to 2^11 using float but that's double dog slow,
+ # so we pick a smaller value for crossover
+diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi
+index 3da3e31..819ef2d 100644
+--- a/src/sage/matrix/matrix_modn_dense_template.pxi
++++ b/src/sage/matrix/matrix_modn_dense_template.pxi
+@@ -306,23 +306,15 @@ cdef inline linbox_minpoly(celement modulus, Py_ssize_t nrows, celement* entries
+     cdef Py_ssize_t i
+     cdef ModField *F = new ModField(<long>modulus)
+     cdef vector[ModFieldElement] *minP = new vector[ModFieldElement]()
+-    cdef ModFieldElement *X = <ModFieldElement*>check_allocarray(nrows * (nrows+1), sizeof(ModFieldElement))
+-    cdef size_t *P = <size_t*>check_allocarray(nrows, sizeof(size_t))
+-
+-    cdef celement *cpy = linbox_copy(modulus, entries, nrows, nrows)
+ 
+     if nrows*nrows > 1000: sig_on()
+-    Mod_MinPoly(F[0], minP[0], nrows, <ModFieldElement*>cpy, nrows, X, nrows, P)
++    Mod_MinPoly(F[0], minP[0], nrows, <ModFieldElement*>entries, nrows)
+     if nrows*nrows > 1000: sig_off()
+ 
+-    sig_free(cpy)
+-
+     l = []
+     for i in range(minP.size()):
+         l.append( <celement>minP.at(i) )
+ 
+-    sig_free(P)
+-    sig_free(X)
+     del F
+     return l
+ 
+@@ -332,27 +324,23 @@ cdef inline linbox_charpoly(celement modulus, Py_ssize_t nrows, celement* entrie
+     """
+     cdef Py_ssize_t i
+     cdef ModField *F = new ModField(<long>modulus)
+-    cdef std_list[vector[ModFieldElement]] P_list
+-    P_list.clear()
++    cdef ModDensePolyRing * R = new ModDensePolyRing(F[0])
++    cdef ModDensePoly  P
+ 
+     cdef celement *cpy = linbox_copy(modulus, entries, nrows, nrows)
+ 
+     if nrows*nrows > 1000: sig_on()
+-    Mod_CharPoly(F[0], P_list, nrows, <ModFieldElement*>cpy, nrows)
++    Mod_CharPoly(R[0], P, nrows, <ModFieldElement*>cpy, nrows)
+     if nrows*nrows > 1000: sig_off()
+ 
+     sig_free(cpy)
+ 
+-    cdef vector[ModFieldElement] tmp
+     l = []
+-    while P_list.size():
+-        l.append([])
+-        tmp = P_list.front()
+-        for i in range(tmp.size()):
+-            l[-1].append(<celement>tmp.at(i))
+-        P_list.pop_front()
++    for i in range(P.size()):
++        l.append(<celement>P[i])
+ 
+     del F
++    del R
+     return l
+ 
+ 
+@@ -1731,9 +1719,7 @@ cdef class Matrix_modn_dense_template(Matrix_dense):
+         R = self._base_ring[var]
+         # call linbox for charpoly
+         v = linbox_charpoly(self.p, self._nrows, self._entries)
+-        r = R(1)
+-        for e in v:
+-            r *= R(e)
++        r = R(v)
+         return r
+ 
+     def echelonize(self, algorithm="linbox", **kwds):

Copied: sagemath/repos/community-x86_64/sagemath-lrs.patch (from rev 274537, sagemath/trunk/sagemath-lrs.patch)
===================================================================
--- sagemath-lrs.patch	                        (rev 0)
+++ sagemath-lrs.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,22 @@
+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"
+

Copied: sagemath/repos/community-x86_64/sagemath-matplotlib2.patch (from rev 274537, sagemath/trunk/sagemath-matplotlib2.patch)
===================================================================
--- sagemath-matplotlib2.patch	                        (rev 0)
+++ sagemath-matplotlib2.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,253 @@
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 300f519..19bc8ec 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -313,8 +313,6 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0))
+ # Ignore all deprecations from IPython etc.
+ warnings.filterwarnings('ignore',
+     module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)')
+-# Ignore warnings due to matplotlib-1.5 together with numpy-1.13
+-warnings.filterwarnings('ignore', module='matplotlib[.]contour|numpy[.]ma[.]core')
+ # However, be sure to keep OUR deprecation warnings
+ warnings.filterwarnings('default',
+     '[\s\S]*See http://trac.sagemath.org/[0-9]* for details.')
+diff --git a/src/sage/plot/arrow.py b/src/sage/plot/arrow.py
+index 98d6224..fbce029 100644
+--- a/src/sage/plot/arrow.py
++++ b/src/sage/plot/arrow.py
+@@ -147,8 +147,8 @@ class CurveArrow(GraphicPrimitive):
+         bpath = Path(self.vertices, self.codes)
+         p = FancyArrowPatch(path=bpath,
+                             lw=width, arrowstyle='%s,head_width=%s,head_length=%s' % (style, head_width, head_length),
+-                            fc=color, ec=color)
+-        p.set_linestyle(get_matplotlib_linestyle(options['linestyle'], return_type='long'))
++                            fc=color, ec=color, 
++                            linestyle=get_matplotlib_linestyle(options['linestyle'], return_type='long'))
+         p.set_zorder(options['zorder'])
+         p.set_label(options['legend_label'])
+         subplot.add_patch(p)
+@@ -336,7 +336,7 @@ class Arrow(GraphicPrimitive):
+         this into account. See :trac:`12836`::
+ 
+             sage: fig = Graphics().matplotlib()
+-            sage: sp = fig.add_subplot(1,1,1)
++            sage: sp = fig.add_subplot(1,1,1, label='axis1')
+             sage: a = arrow((0,0), (1,1))
+             sage: b = arrow((0,0), (1,1), width=20)
+             sage: p1 = a[0]._render_on_subplot(sp)
+@@ -358,7 +358,7 @@ class Arrow(GraphicPrimitive):
+             sage: a.save(filename=filename)
+             sage: with open(filename, 'r') as f:
+             ....:     contents = f.read().replace('\n', ' ')
+-            sage: two_stroke_pattern = r'setdash.*stroke.*stroke.*setdash'
++            sage: two_stroke_pattern = r'setdash.*setdash.*stroke.*stroke.*setdash'
+             sage: import re
+             sage: two_stroke_re = re.compile(two_stroke_pattern)
+             sage: two_stroke_re.search(contents) is None
+@@ -383,8 +383,8 @@ class Arrow(GraphicPrimitive):
+                             lw=width,
+                             arrowstyle='%s,head_width=%s,head_length=%s' % (style, head_width, head_length),
+                             shrinkA=arrowshorten_end, shrinkB=arrowshorten_end,
+-                            fc=color, ec=color)
+-        p.set_linestyle(get_matplotlib_linestyle(options['linestyle'], return_type='long'))
++                            fc=color, ec=color,
++                            linestyle=get_matplotlib_linestyle(options['linestyle'], return_type='long'))
+         p.set_zorder(options['zorder'])
+         p.set_label(options['legend_label'])
+ 
+@@ -437,7 +437,7 @@ class Arrow(GraphicPrimitive):
+                             pe1.draw_path(renderer, gc, tpath, affine, rgbFace)
+ 
+             pe1 = ConditionalStroke(CheckNthSubPath(p, 0), [pe.Stroke()])
+-            pe2 = ConditionalStroke(CheckNthSubPath(p, 1), [pe.Stroke(linestyle="solid")])
++            pe2 = ConditionalStroke(CheckNthSubPath(p, 1), [pe.Stroke(dashes={'dash_offset': 0, 'dash_list': None})])
+             p.set_path_effects([pe1, pe2])
+ 
+         subplot.add_patch(p)
+diff --git a/src/sage/plot/contour_plot.py b/src/sage/plot/contour_plot.py
+index 76077e3..efc1f2b 100644
+--- a/src/sage/plot/contour_plot.py
++++ b/src/sage/plot/contour_plot.py
+@@ -178,12 +178,10 @@ class ContourPlot(GraphicPrimitive):
+         if fill:
+             if contours is None:
+                 CSF = subplot.contourf(self.xy_data_array, cmap=cmap,
+-                                       extent=(x0, x1, y0, y1),
+-                                       label=options['legend_label'])
++                                       extent=(x0, x1, y0, y1))
+             else:
+                 CSF = subplot.contourf(self.xy_data_array, contours, cmap=cmap,
+-                                       extent=(x0, x1, y0, y1), extend='both',
+-                                       label=options['legend_label'])
++                                       extent=(x0, x1, y0, y1), extend='both')
+ 
+         linewidths = options.get('linewidths', None)
+         if isinstance(linewidths, (int, Integer)):
+@@ -200,13 +198,11 @@ class ContourPlot(GraphicPrimitive):
+         if contours is None:
+             CS = subplot.contour(self.xy_data_array, cmap=cmap,
+                                  extent=(x0, x1, y0, y1),
+-                                 linewidths=linewidths, linestyles=linestyles,
+-                                 label=options['legend_label'])
++                                 linewidths=linewidths, linestyles=linestyles)
+         else:
+             CS = subplot.contour(self.xy_data_array, contours, cmap=cmap,
+                                  extent=(x0, x1, y0, y1),
+-                                 linewidths=linewidths, linestyles=linestyles,
+-                                 label=options['legend_label'])
++                                 linewidths=linewidths, linestyles=linestyles)
+         if options.get('labels', False):
+             label_options = options['label_options']
+             label_options['fontsize'] = int(label_options['fontsize'])
+diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py
+index aa82eda..03a0f3a 100644
+--- a/src/sage/plot/plot.py
++++ b/src/sage/plot/plot.py
+@@ -478,7 +478,7 @@ We test that ``imshow`` works as well, verifying that
+ 
+ ::
+ 
+-    sage: plt.imshow([[(0,0,0)]])
++    sage: plt.imshow([[(0.0,0.0,0.0)]])
+     <matplotlib.image.AxesImage object at ...>
+     sage: plt.savefig(os.path.join(SAGE_TMP, 'foo.png'))
+ 
+@@ -2908,11 +2908,14 @@ def list_plot(data, plotjoined=False, **kwargs):
+         If ``plotjoined`` is ``False`` then the axis that is in log scale
+         must have all points strictly positive. For instance, the following
+         plot will show no points in the figure since the points in the
+-        horizontal axis starts from `(0,1)`.
++        horizontal axis starts from `(0,1)`. Further, matplotlib will display
++        a user warning.
+ 
+         ::
+ 
+             sage: list_plot(yl, scale='loglog')         # both axes are log
++            doctest:warning
++            ...
+             Graphics object consisting of 1 graphics primitive
+ 
+         Instead this will work. We drop the point `(0,1)`.::
+@@ -3288,12 +3291,15 @@ def list_plot_semilogy(data, plotjoined=False, **kwds):
+ 
+         If ``plotjoined`` is ``False`` then the vertical axis must have all
+         points strictly positive. Otherwise the plot will come up empty.
+-        For instance the following plot contains a point at `(1,0)`.
++        For instance the following plot contains a point at `(1,0)`. Further, 
++        matplotlib will display a user warning.
+ 
+         ::
+ 
+             sage: xl = [2**k for k in range(12)]; yl = range(len(xl))
+             sage: list_plot_semilogy(list(zip(xl,yl))) # plot empty due to (1,0)
++            doctest:warning
++            ...
+             Graphics object consisting of 1 graphics primitive
+ 
+         We remove `(1,0)` to fix this.::
+diff --git a/src/sage/plot/plot3d/list_plot3d.py b/src/sage/plot/plot3d/list_plot3d.py
+index c9f22dd..be87ff2 100644
+--- a/src/sage/plot/plot3d/list_plot3d.py
++++ b/src/sage/plot/plot3d/list_plot3d.py
+@@ -29,21 +29,20 @@ def list_plot3d(v, interpolation_type='default', texture="automatic", point_list
+ 
+     OPTIONAL KEYWORDS:
+ 
+-    - ``interpolation_type`` - 'linear', 'nn' (natural neighbor), 'spline'
++    - ``interpolation_type`` - 'linear', 'clough' (CloughTocher2D), 'spline'
+ 
+       'linear' will perform linear interpolation
+ 
+-      The option 'nn' An interpolation method for multivariate data in a 
+-      Delaunay triangulation. The value for an interpolation point is 
+-      estimated using weighted values of the closest surrounding points in 
+-      the triangulation. These points, the natural neighbors, are the ones 
+-      the interpolation point would connect to if inserted into the 
+-      triangulation.
++      The option 'clough' will interpolate by using a piecewise cubic interpolating
++      Bezier polynomial on each triangle, using a Clough-Tocher scheme.
++      The interpolant is guaranteed to be continuously differentiable.
++      The gradients of the interpolant are chosen so that the curvature of the
++      interpolating surface is approximatively minimized.
+ 
+       The option 'spline' interpolates using a bivariate B-spline.
+ 
+       When v is a matrix the default is to use linear interpolation, when
+-      v is a list of points the default is nearest neighbor.
++      v is a list of points the default is 'clough'.
+ 
+     - ``degree`` - an integer between 1 and 5, controls the degree of spline
+       used for spline interpolation. For data that is highly oscillatory
+@@ -320,18 +319,18 @@ def list_plot3d_tuples(v, interpolation_type, texture, **kwds):
+ 
+     OPTIONAL KEYWORDS:
+ 
+-    - ``interpolation_type`` - 'linear', 'nn' (natural neighbor), 'spline'
++    - ``interpolation_type`` - 'linear', 'clough' (CloughTocher2D), 'spline'
+ 
+       'linear' will perform linear interpolation
+ 
+-      The option 'nn' will interpolate by using natural neighbors. The 
+-      value for an interpolation point is estimated using weighted values 
+-      of the closest surrounding points in the triangulation.
++      The option 'clough' will interpolate by using a piecewise cubic interpolating
++      Bezier polynomial on each triangle, using a Clough-Tocher scheme.
++      The interpolant is guaranteed to be continuously differentiable.
+ 
+       The option 'spline' interpolates using a bivariate B-spline.
+ 
+       When v is a matrix the default is to use linear interpolation, when
+-      v is a list of points the default is nearest neighbor.
++      v is a list of points the default is 'clough'.
+ 
+     - ``degree`` - an integer between 1 and 5, controls the degree of spline
+       used for spline interpolation. For data that is highly oscillatory
+@@ -373,7 +372,7 @@ def list_plot3d_tuples(v, interpolation_type, texture, **kwds):
+         sage: list_plot3d([(1, 2, 3), (0, 1, 3), (2, 1, 4), (1, 0, -2)], texture='yellow', num_points=50)
+         Graphics3d Object
+     """
+-    from matplotlib import tri, delaunay
++    from matplotlib import tri
+     import numpy
+     import scipy
+     from random import random
+@@ -439,19 +438,15 @@ def list_plot3d_tuples(v, interpolation_type, texture, **kwds):
+         G._set_extra_kwds(kwds)
+         return G
+ 
+-    if interpolation_type == 'nn'  or interpolation_type =='default':
++    if interpolation_type == 'clough'  or interpolation_type =='default':
+ 
+-        T=delaunay.Triangulation(x,y)
+-        f=T.nn_interpolator(z)
+-        f.default_value=0.0
+-        j=numpy.complex(0,1)
+-        vals=f[ymin:ymax:j*num_points,xmin:xmax:j*num_points]
++        points=[[x[i],y[i]] for i in range(len(x))]
++        j = numpy.complex(0, 1)
++        f = interpolate.CloughTocher2DInterpolator(points,z)
+         from .parametric_surface import ParametricSurface
+-        def g(x,y):
+-            i=round( (x-xmin)/(xmax-xmin)*(num_points-1) )
+-            j=round( (y-ymin)/(ymax-ymin)*(num_points-1) )
+-            z=vals[int(j),int(i)]
+-            return (x,y,z)
++        def g(x, y):
++            z = f([x, y])
++            return (x, y, z)
+         G = ParametricSurface(g, (list(numpy.r_[xmin:xmax:num_points*j]), list(numpy.r_[ymin:ymax:num_points*j])), texture=texture, **kwds)
+         G._set_extra_kwds(kwds)
+         return G
+diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
+index 3ce4642..f66cd89 100644
+--- a/src/sage/probability/probability_distribution.pyx
++++ b/src/sage/probability/probability_distribution.pyx
+@@ -118,7 +118,7 @@ cdef class ProbabilityDistribution:
+             sage: P = [0.3, 0.4, 0.3]
+             sage: X = GeneralDiscreteDistribution(P)
+             sage: h, b = X.generate_histogram_data(bins = 10)
+-            sage: h
++            sage: h  # rel tol 1e-08
+             [1.6299999999999999,
+              0.0,
+              0.0,

Deleted: sagemath-networkx2.patch
===================================================================
--- sagemath-networkx2.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-networkx2.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,26 +0,0 @@
-diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py
-index 8c29602da6..e7a185d586 100644
---- a/src/sage/graphs/digraph.py
-+++ b/src/sage/graphs/digraph.py
-@@ -755,7 +755,7 @@ class DiGraph(GenericGraph):
-             self.allow_multiple_edges(multiedges,check=False)
-             self.allow_loops(loops,check=False)
-             self.add_vertices(data.nodes())
--            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
-+            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
-         elif format == 'igraph':
-             if not data.is_directed():
-                 raise ValueError("A *directed* igraph graph was expected. To "+
-diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py
-index b63135d8e6..5775042976 100644
---- a/src/sage/graphs/graph.py
-+++ b/src/sage/graphs/graph.py
-@@ -1199,7 +1199,7 @@ class Graph(GenericGraph):
-             self.allow_loops(loops, check=False)
-             self.allow_multiple_edges(multiedges, check=False)
-             self.add_vertices(data.nodes())
--            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
-+            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
-         elif format == 'igraph':
-             if data.is_directed():
-                 raise ValueError("An *undirected* igraph graph was expected. "+

Copied: sagemath/repos/community-x86_64/sagemath-networkx2.patch (from rev 274537, sagemath/trunk/sagemath-networkx2.patch)
===================================================================
--- sagemath-networkx2.patch	                        (rev 0)
+++ sagemath-networkx2.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,196 @@
+diff --git a/src/sage/graphs/base/graph_backends.pyx b/src/sage/graphs/base/graph_backends.pyx
+index ff1d02900a..bad4a18539 100644
+--- a/src/sage/graphs/base/graph_backends.pyx
++++ b/src/sage/graphs/base/graph_backends.pyx
+@@ -800,9 +800,9 @@ class NetworkXGraphDeprecated(SageObject):
+             sage: X.multiedges = True
+             sage: G = X.mutate()
+             sage: G.edges()
+-            [(1, 2), (2, 3)]
++            MultiEdgeDataView([(1, 2), (2, 3)])
+             sage: G.edges(data=True)
+-            [(1, 2, {'weight': 7}), (2, 3, {4: {}, 5: {}, 6: {}, 7: {}})]
++            MultiEdgeDataView([(1, 2, {'weight': 7}), (2, 3, {4: {}, 5: {}, 6: {}, 7: {}})])
+ 
+         """
+         import networkx
+@@ -868,11 +868,9 @@ class NetworkXDiGraphDeprecated(SageObject):
+             sage: X.multiedges = True
+             sage: G = X.mutate()
+             sage: G.edges()
+-            [(1, 2), (2, 1), (2, 3)]
++            OutMultiEdgeDataView([(1, 2), (2, 1), (2, 3)])
+             sage: G.edges(data=True)
+-            [(1, 2, {'weight': 7}),
+-             (2, 1, {7: {}, 8: {}}),
+-             (2, 3, {4: {}, 5: {}, 6: {}, 7: {}})]
++            OutMultiEdgeDataView([(1, 2, {'weight': 7}), (2, 1, {8: {}, 7: {}}), (2, 3, {4: {}, 5: {}, 6: {}, 7: {}})])
+ 
+         """
+         import networkx
+@@ -1158,7 +1156,7 @@ class NetworkXGraphBackend(GenericGraphBackend):
+         import networkx
+         try:
+             if self._nxg.is_multigraph():
+-                for k,d in self._nxg.edge[u][v].iteritems():
++                for u0,v0,k,d in self._nxg.edges([u,v],True,keys=True):
+                     if d.get('weight',None) == l:
+                         self._nxg.remove_edge(u,v,k)
+                         break
+@@ -1227,7 +1225,7 @@ class NetworkXGraphBackend(GenericGraphBackend):
+         """
+         cdef dict E
+         try:
+-            E = self._nxg.edge[u][v]
++            E = self._nxg.edges[u,v,0]
+         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):
+             sage: G.iterator_nbrs(0)
+             <dictionary-keyiterator object at ...>
+         """
+-        return self._nxg.neighbors_iter(v)
++        return self._nxg.neighbors(v)
+ 
+     def iterator_in_nbrs(self, v):
+         """
+diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py
+index 003a8d6bcb..986137a9b0 100644
+--- a/src/sage/graphs/digraph.py
++++ b/src/sage/graphs/digraph.py
+@@ -755,7 +755,7 @@ class DiGraph(GenericGraph):
+             self.allow_multiple_edges(multiedges,check=False)
+             self.allow_loops(loops,check=False)
+             self.add_vertices(data.nodes())
+-            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
++            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
+         elif format == 'igraph':
+             if not data.is_directed():
+                 raise ValueError("A *directed* igraph graph was expected. To "+
+@@ -2844,7 +2844,7 @@ class DiGraph(GenericGraph):
+         Using the NetworkX implementation ::
+ 
+             sage: D.topological_sort(implementation = "NetworkX")
+-            [4, 5, 6, 9, 0, 1, 2, 3, 7, 8, 10]
++            [4, 5, 6, 9, 0, 3, 2, 7, 1, 8, 10]
+ 
+         Using the NetworkX recursive implementation ::
+ 
+@@ -2870,9 +2870,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()
+-              sage: networkx.topological_sort(N)
+-              [4, 5, 6, 9, 0, 1, 2, 3, 7, 8, 10]
+-              sage: networkx.topological_sort_recursive(N)
++              sage: list(networkx.topological_sort(N))
+               [4, 5, 6, 9, 0, 3, 2, 7, 1, 8, 10]
+ 
+         TESTS:
+@@ -2895,10 +2893,7 @@ class DiGraph(GenericGraph):
+ 
+         elif implementation == "NetworkX" or implementation == "recursive":
+             import networkx
+-            if implementation == "NetworkX":
+-                S = networkx.topological_sort(self.networkx_graph(copy=False))
+-            else:
+-                S = networkx.topological_sort_recursive(self.networkx_graph(copy=False))
++            S = list(networkx.topological_sort(self.networkx_graph(copy=False)))
+             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
++++ b/src/sage/graphs/generators/families.py
+@@ -197,7 +197,7 @@ def BalancedTree(r, h):
+     gracefully::
+ 
+         sage: graphs.BalancedTree(1, 10)
+-        Balanced tree: Graph on 2 vertices
++        Balanced tree: Graph on 11 vertices
+ 
+         sage: graphs.BalancedTree(-1, 10)
+         Balanced tree: Graph on 1 vertex
+@@ -208,9 +208,6 @@ def BalancedTree(r, h):
+         sage: graphs.BalancedTree(3, 0)
+         Balanced tree: Graph on 1 vertex
+ 
+-        sage: graphs.BalancedTree(5, -2)
+-        Balanced tree: Graph on 0 vertices
+-
+         sage: graphs.BalancedTree(-2,-2)
+         Balanced tree: Graph on 0 vertices
+     """
+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)
+             self.add_vertices(data.nodes())
+-            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
++            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
+         elif format == 'igraph':
+             if data.is_directed():
+                 raise ValueError("An *undirected* igraph graph was expected. "+
+@@ -4600,7 +4600,7 @@ class Graph(GenericGraph):
+ 
+             sage: g = Graph([(0,1,0), (1,2,999), (2,3,-5)])
+             sage: g.matching(use_edge_labels=True)
+-            [(1, 2, 999)]
++            [(0, 1, 0), (2, 3, -5)]
+             sage: g.matching(algorithm="LP", use_edge_labels=True)
+             [(1, 2, 999)]
+ 
+@@ -6288,7 +6288,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):
+             sage: (G.cliques_get_max_clique_graph()).show(figsize=[2,2])
+         """
+         import networkx
+-        return Graph(networkx.make_max_clique_graph(self.networkx_graph(copy=False), name=name, create_using=networkx.MultiGraph()))
++        return Graph(networkx.make_max_clique_graph(self.networkx_graph(copy=False), create_using=networkx.MultiGraph()))
+ 
+     @doc_index("Clique-related methods")
+     def cliques_get_clique_bipartite(self, **kwds):

Deleted: sagemath-pynac-0.7.14.patch
===================================================================
--- sagemath-pynac-0.7.14.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-pynac-0.7.14.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,167 +0,0 @@
-diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
-index d4afc4e..6d1fcac 100644
---- a/src/sage/libs/pynac/pynac.pxd
-+++ b/src/sage/libs/pynac/pynac.pxd
-@@ -481,22 +481,17 @@ cdef extern from "pynac_wrap.h":
-     ctypedef GParamSet const_paramset_ref "const GiNaC::paramset&"
- 
-     ctypedef struct py_funcs_struct:
--        py_binomial(a, b)
--        py_binomial_int(int n, unsigned int k)
-         py_gcd(a, b)
-         py_lcm(a, b)
-         py_real(a)
-         py_imag(a)
-         py_numer(a)
-         py_denom(a)
--        py_conjugate(a)
-         bint py_is_rational(a)
--        bint py_is_crational(a)
-         bint py_is_real(a)
-         bint py_is_integer(a)
-         bint py_is_equal(a, b)
-         bint py_is_even(a)
--        bint py_is_cinteger(a)
-         bint py_is_prime(n)
-         bint py_is_exact(x)
- 
-@@ -534,23 +529,14 @@ cdef extern from "pynac_wrap.h":
-         py_asinh(x)
-         py_acosh(x)
-         py_atanh(x)
--        py_tgamma(x)
--        py_lgamma(x)
-         py_isqrt(x)
-         py_sqrt(x)
--        py_abs(x)
-         py_mod(x, y)
-         py_smod(x, y)
-         py_irem(x, y)
--        py_iquo(x, y)
--        py_iquo2(x, y)
--        py_li(x, n, parent)
--        py_li2(x)
-         py_psi(x)
-         py_psi2(n, x)
- 
--        int py_int_length(x) except -1
--
-         py_eval_constant(unsigned serial, parent)
-         py_eval_unsigned_infinity()
-         py_eval_infinity()
-@@ -583,8 +569,6 @@ cdef extern from "pynac_wrap.h":
-         stdstring* py_latex_fderivative(unsigned id, params, args)
-         paramset_to_PyTuple(const_paramset_ref s)
- 
--        py_rational_power_parts(basis, exp)
--
-     py_funcs_struct py_funcs "GiNaC::py_funcs"
- 
- cdef extern from "pynac/order.h":
-diff --git a/src/sage/libs/pynac/pynac.pyx b/src/sage/libs/pynac/pynac.pyx
-index f303184..419cc47 100644
---- a/src/sage/libs/pynac/pynac.pyx
-+++ b/src/sage/libs/pynac/pynac.pyx
-@@ -2432,23 +2432,18 @@ def init_function_table():
-     called before Pynac is used; otherwise, there will be segfaults.
-     """
- 
--    py_funcs.py_binomial_int = &py_binomial_int
--    py_funcs.py_binomial = &py_binomial
-     py_funcs.py_gcd = &py_gcd
-     py_funcs.py_lcm = &py_lcm
-     py_funcs.py_real = &py_real
-     py_funcs.py_imag = &py_imag
-     py_funcs.py_numer = &py_numer
-     py_funcs.py_denom = &py_denom
--    py_funcs.py_conjugate = &py_conjugate
- 
-     py_funcs.py_is_rational = &py_is_rational
--    py_funcs.py_is_crational = &py_is_crational
-     py_funcs.py_is_real = &py_is_real
-     py_funcs.py_is_integer = &py_is_integer
-     py_funcs.py_is_equal = &py_is_equal
-     py_funcs.py_is_even = &py_is_even
--    py_funcs.py_is_cinteger = &py_is_cinteger
-     py_funcs.py_is_prime = &py_is_prime
-     py_funcs.py_is_exact = &py_is_exact
- 
-@@ -2462,7 +2457,6 @@ def init_function_table():
-     py_funcs.py_mpq_from_rational = &py_mpq_from_rational
- 
-     py_funcs.py_float = &py_float
--    py_funcs.py_RDF_from_double = &py_RDF_from_double
- 
-     py_funcs.py_factorial = &py_factorial
-     py_funcs.py_doublefactorial = &py_doublefactorial
-@@ -2486,23 +2480,14 @@ def init_function_table():
-     py_funcs.py_asinh = &py_asinh
-     py_funcs.py_acosh = &py_acosh
-     py_funcs.py_atanh = &py_atanh
--    py_funcs.py_tgamma = &py_tgamma
--    py_funcs.py_lgamma = &py_lgamma
-     py_funcs.py_isqrt = &py_isqrt
-     py_funcs.py_sqrt = &py_sqrt
--    py_funcs.py_abs = &py_abs
-     py_funcs.py_mod = &py_mod
-     py_funcs.py_smod = &py_smod
-     py_funcs.py_irem = &py_irem
--    py_funcs.py_iquo = &py_iquo
--    py_funcs.py_iquo2 = &py_iquo2
--    py_funcs.py_li = &py_li
--    py_funcs.py_li2 = &py_li2
-     py_funcs.py_psi = &py_psi
-     py_funcs.py_psi2 = &py_psi2
- 
--    py_funcs.py_int_length = &py_int_length
--
-     py_funcs.py_eval_constant = &py_eval_constant
-     py_funcs.py_eval_unsigned_infinity = &py_eval_unsigned_infinity
-     py_funcs.py_eval_infinity = &py_eval_infinity
-@@ -2531,7 +2516,6 @@ def init_function_table():
-     py_funcs.py_print_fderivative =  &py_print_fderivative
-     py_funcs.py_latex_fderivative =  &py_latex_fderivative
-     py_funcs.paramset_to_PyTuple = &paramset_to_PyTuple
--    py_funcs.py_rational_power_parts = &py_rational_power_parts
- 
- init_function_table()
- init_pynac_I()
-
-diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
-index 81cd485..931cecc 100644
---- a/src/sage/functions/other.py
-+++ b/src/sage/functions/other.py
-@@ -688,7 +688,6 @@ class Function_gamma(GinacFunction):
-             :meth:`sage.functions.other.gamma`
-         """
-         GinacFunction.__init__(self, 'gamma', latex_name=r"\Gamma",
--                               ginac_name='tgamma',
-                                conversions={'mathematica':'Gamma',
-                                             'maple':'GAMMA',
-                                             'sympy':'gamma',
-diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
-index 1739067..d4afc4e 100644
---- a/src/sage/libs/pynac/pynac.pxd
-+++ b/src/sage/libs/pynac/pynac.pxd
-@@ -362,7 +362,7 @@ cdef extern from "pynac_wrap.h":
-     GEx g_zeta2 "GiNaC::zeta" (GEx m, GEx s)            except + # alternating Euler sum
-     GEx g_stieltjes "GiNaC::stieltjes" (GEx m)          except + # Stieltjes constants
-     GEx g_zetaderiv "GiNaC::zetaderiv" (GEx n, GEx x)   except + # derivatives of Riemann's zeta function
--    GEx g_tgamma "GiNaC::tgamma" (GEx x)                except + # gamma function
-+    GEx g_gamma "GiNaC::gamma" (GEx x)                  except + # gamma function
-     GEx g_lgamma "GiNaC::lgamma" (GEx x)                except + # logarithm of gamma function
-     GEx g_beta "GiNaC::beta" (GEx x, GEx y)             except + # beta function (tgamma(x)*tgamma(y)/tgamma(x+y))
-     GEx g_psi "GiNaC::psi" (GEx x)                      except + # psi (digamma) function
-diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
-index dfb8751..52303d1 100644
---- a/src/sage/symbolic/expression.pyx
-+++ b/src/sage/symbolic/expression.pyx
-@@ -8917,7 +8917,7 @@ cdef class Expression(CommutativeRingElement):
-         cdef GEx x
-         sig_on()
-         try:
--            x = g_hold_wrapper(g_tgamma, self._gobj, hold)
-+            x = g_hold_wrapper(g_gamma, self._gobj, hold)
-         finally:
-             sig_off()
-         return new_Expression_from_GEx(self._parent, x)

Copied: sagemath/repos/community-x86_64/sagemath-pynac-0.7.14.patch (from rev 274537, sagemath/trunk/sagemath-pynac-0.7.14.patch)
===================================================================
--- sagemath-pynac-0.7.14.patch	                        (rev 0)
+++ sagemath-pynac-0.7.14.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,167 @@
+diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
+index d4afc4e..6d1fcac 100644
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -481,22 +481,17 @@ cdef extern from "pynac_wrap.h":
+     ctypedef GParamSet const_paramset_ref "const GiNaC::paramset&"
+ 
+     ctypedef struct py_funcs_struct:
+-        py_binomial(a, b)
+-        py_binomial_int(int n, unsigned int k)
+         py_gcd(a, b)
+         py_lcm(a, b)
+         py_real(a)
+         py_imag(a)
+         py_numer(a)
+         py_denom(a)
+-        py_conjugate(a)
+         bint py_is_rational(a)
+-        bint py_is_crational(a)
+         bint py_is_real(a)
+         bint py_is_integer(a)
+         bint py_is_equal(a, b)
+         bint py_is_even(a)
+-        bint py_is_cinteger(a)
+         bint py_is_prime(n)
+         bint py_is_exact(x)
+ 
+@@ -534,23 +529,14 @@ cdef extern from "pynac_wrap.h":
+         py_asinh(x)
+         py_acosh(x)
+         py_atanh(x)
+-        py_tgamma(x)
+-        py_lgamma(x)
+         py_isqrt(x)
+         py_sqrt(x)
+-        py_abs(x)
+         py_mod(x, y)
+         py_smod(x, y)
+         py_irem(x, y)
+-        py_iquo(x, y)
+-        py_iquo2(x, y)
+-        py_li(x, n, parent)
+-        py_li2(x)
+         py_psi(x)
+         py_psi2(n, x)
+ 
+-        int py_int_length(x) except -1
+-
+         py_eval_constant(unsigned serial, parent)
+         py_eval_unsigned_infinity()
+         py_eval_infinity()
+@@ -583,8 +569,6 @@ cdef extern from "pynac_wrap.h":
+         stdstring* py_latex_fderivative(unsigned id, params, args)
+         paramset_to_PyTuple(const_paramset_ref s)
+ 
+-        py_rational_power_parts(basis, exp)
+-
+     py_funcs_struct py_funcs "GiNaC::py_funcs"
+ 
+ cdef extern from "pynac/order.h":
+diff --git a/src/sage/libs/pynac/pynac.pyx b/src/sage/libs/pynac/pynac.pyx
+index f303184..419cc47 100644
+--- a/src/sage/libs/pynac/pynac.pyx
++++ b/src/sage/libs/pynac/pynac.pyx
+@@ -2432,23 +2432,18 @@ def init_function_table():
+     called before Pynac is used; otherwise, there will be segfaults.
+     """
+ 
+-    py_funcs.py_binomial_int = &py_binomial_int
+-    py_funcs.py_binomial = &py_binomial
+     py_funcs.py_gcd = &py_gcd
+     py_funcs.py_lcm = &py_lcm
+     py_funcs.py_real = &py_real
+     py_funcs.py_imag = &py_imag
+     py_funcs.py_numer = &py_numer
+     py_funcs.py_denom = &py_denom
+-    py_funcs.py_conjugate = &py_conjugate
+ 
+     py_funcs.py_is_rational = &py_is_rational
+-    py_funcs.py_is_crational = &py_is_crational
+     py_funcs.py_is_real = &py_is_real
+     py_funcs.py_is_integer = &py_is_integer
+     py_funcs.py_is_equal = &py_is_equal
+     py_funcs.py_is_even = &py_is_even
+-    py_funcs.py_is_cinteger = &py_is_cinteger
+     py_funcs.py_is_prime = &py_is_prime
+     py_funcs.py_is_exact = &py_is_exact
+ 
+@@ -2462,7 +2457,6 @@ def init_function_table():
+     py_funcs.py_mpq_from_rational = &py_mpq_from_rational
+ 
+     py_funcs.py_float = &py_float
+-    py_funcs.py_RDF_from_double = &py_RDF_from_double
+ 
+     py_funcs.py_factorial = &py_factorial
+     py_funcs.py_doublefactorial = &py_doublefactorial
+@@ -2486,23 +2480,14 @@ def init_function_table():
+     py_funcs.py_asinh = &py_asinh
+     py_funcs.py_acosh = &py_acosh
+     py_funcs.py_atanh = &py_atanh
+-    py_funcs.py_tgamma = &py_tgamma
+-    py_funcs.py_lgamma = &py_lgamma
+     py_funcs.py_isqrt = &py_isqrt
+     py_funcs.py_sqrt = &py_sqrt
+-    py_funcs.py_abs = &py_abs
+     py_funcs.py_mod = &py_mod
+     py_funcs.py_smod = &py_smod
+     py_funcs.py_irem = &py_irem
+-    py_funcs.py_iquo = &py_iquo
+-    py_funcs.py_iquo2 = &py_iquo2
+-    py_funcs.py_li = &py_li
+-    py_funcs.py_li2 = &py_li2
+     py_funcs.py_psi = &py_psi
+     py_funcs.py_psi2 = &py_psi2
+ 
+-    py_funcs.py_int_length = &py_int_length
+-
+     py_funcs.py_eval_constant = &py_eval_constant
+     py_funcs.py_eval_unsigned_infinity = &py_eval_unsigned_infinity
+     py_funcs.py_eval_infinity = &py_eval_infinity
+@@ -2531,7 +2516,6 @@ def init_function_table():
+     py_funcs.py_print_fderivative =  &py_print_fderivative
+     py_funcs.py_latex_fderivative =  &py_latex_fderivative
+     py_funcs.paramset_to_PyTuple = &paramset_to_PyTuple
+-    py_funcs.py_rational_power_parts = &py_rational_power_parts
+ 
+ init_function_table()
+ init_pynac_I()
+
+diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
+index 81cd485..931cecc 100644
+--- a/src/sage/functions/other.py
++++ b/src/sage/functions/other.py
+@@ -688,7 +688,6 @@ class Function_gamma(GinacFunction):
+             :meth:`sage.functions.other.gamma`
+         """
+         GinacFunction.__init__(self, 'gamma', latex_name=r"\Gamma",
+-                               ginac_name='tgamma',
+                                conversions={'mathematica':'Gamma',
+                                             'maple':'GAMMA',
+                                             'sympy':'gamma',
+diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
+index 1739067..d4afc4e 100644
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -362,7 +362,7 @@ cdef extern from "pynac_wrap.h":
+     GEx g_zeta2 "GiNaC::zeta" (GEx m, GEx s)            except + # alternating Euler sum
+     GEx g_stieltjes "GiNaC::stieltjes" (GEx m)          except + # Stieltjes constants
+     GEx g_zetaderiv "GiNaC::zetaderiv" (GEx n, GEx x)   except + # derivatives of Riemann's zeta function
+-    GEx g_tgamma "GiNaC::tgamma" (GEx x)                except + # gamma function
++    GEx g_gamma "GiNaC::gamma" (GEx x)                  except + # gamma function
+     GEx g_lgamma "GiNaC::lgamma" (GEx x)                except + # logarithm of gamma function
+     GEx g_beta "GiNaC::beta" (GEx x, GEx y)             except + # beta function (tgamma(x)*tgamma(y)/tgamma(x+y))
+     GEx g_psi "GiNaC::psi" (GEx x)                      except + # psi (digamma) function
+diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
+index dfb8751..52303d1 100644
+--- a/src/sage/symbolic/expression.pyx
++++ b/src/sage/symbolic/expression.pyx
+@@ -8917,7 +8917,7 @@ cdef class Expression(CommutativeRingElement):
+         cdef GEx x
+         sig_on()
+         try:
+-            x = g_hold_wrapper(g_tgamma, self._gobj, hold)
++            x = g_hold_wrapper(g_gamma, self._gobj, hold)
+         finally:
+             sig_off()
+         return new_Expression_from_GEx(self._parent, x)

Deleted: sagemath-python3-notebook.patch
===================================================================
--- sagemath-python3-notebook.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-python3-notebook.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,27 +0,0 @@
-diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook
-index 74192da240..0ede281aad 100755
---- a/src/bin/sage-notebook
-+++ b/src/bin/sage-notebook
-@@ -96,8 +96,7 @@ class NotebookJupyter(object):
-         if not have_prerequisites():
-             print(self.PREREQUISITE_ERROR)
-             raise SystemExit(1)
--        from notebook.notebookapp import main
--        main(argv)
-+        os.execvp('jupyter-notebook', ['jupyter-notebook'] + argv)
- 
- 
- class NotebookJupyterlab(object):
-diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
-index 3912b8cdf5..bd40cdadda 100644
---- a/src/sage/repl/ipython_kernel/install.py
-+++ b/src/sage/repl/ipython_kernel/install.py
-@@ -280,7 +280,6 @@ def have_prerequisites(debug=True):
-         True
-     """
-     try:
--        from notebook.notebookapp import NotebookApp
-         return True
-     except ImportError:
-         if debug:
-

Copied: sagemath/repos/community-x86_64/sagemath-python3-notebook.patch (from rev 274537, sagemath/trunk/sagemath-python3-notebook.patch)
===================================================================
--- sagemath-python3-notebook.patch	                        (rev 0)
+++ sagemath-python3-notebook.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook
+index 74192da240..0ede281aad 100755
+--- a/src/bin/sage-notebook
++++ b/src/bin/sage-notebook
+@@ -96,8 +96,7 @@ class NotebookJupyter(object):
+         if not have_prerequisites():
+             print(self.PREREQUISITE_ERROR)
+             raise SystemExit(1)
+-        from notebook.notebookapp import main
+-        main(argv)
++        os.execvp('jupyter-notebook', ['jupyter-notebook'] + argv)
+ 
+ 
+ class NotebookJupyterlab(object):
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 3912b8cdf5..bd40cdadda 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -280,7 +280,6 @@ def have_prerequisites(debug=True):
+         True
+     """
+     try:
+-        from notebook.notebookapp import NotebookApp
+         return True
+     except ImportError:
+         if debug:
+

Copied: sagemath/repos/community-x86_64/sagemath-scipy-1.0.patch (from rev 274537, sagemath/trunk/sagemath-scipy-1.0.patch)
===================================================================
--- sagemath-scipy-1.0.patch	                        (rev 0)
+++ sagemath-scipy-1.0.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,16 @@
+diff --git a/src/sage/numerical/optimize.py b/src/sage/numerical/optimize.py
+index 17b5ebb84b..7ce9055cba 100644
+--- a/src/sage/numerical/optimize.py
++++ b/src/sage/numerical/optimize.py
+@@ -486,9 +486,9 @@ def minimize_constrained(func,cons,x0,gradient=None,algorithm='default', **args)
+                 else:
+                     min = optimize.fmin_tnc(f, x0, approx_grad=True, bounds=cons, messages=0, **args)[0]
+         elif isinstance(cons[0], function_type) or isinstance(cons[0], Expression):
+-            min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args)
++            min = optimize.fmin_cobyla(f, x0, cons, **args)
+     elif isinstance(cons, function_type) or isinstance(cons, Expression):
+-        min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args)
++        min = optimize.fmin_cobyla(f, x0, cons, **args)
+     return vector(RDF, min)
+ 
+ 

Deleted: sagemath-threejs.patch
===================================================================
--- sagemath-threejs.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ sagemath-threejs.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,11 +0,0 @@
---- a/src/sage/repl/rich_output/display_manager.py
-+++ b/src/sage/repl/rich_output/display_manager.py
-@@ -744,7 +744,7 @@ class DisplayManager(SageObject):
-         """
-         if online:
-             from sage.misc.package import installed_packages
--            version = installed_packages()['threejs']
-+            version = 'r80'
-             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>

Copied: sagemath/repos/community-x86_64/sagemath-threejs.patch (from rev 274537, sagemath/trunk/sagemath-threejs.patch)
===================================================================
--- sagemath-threejs.patch	                        (rev 0)
+++ sagemath-threejs.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,11 @@
+--- a/src/sage/repl/rich_output/display_manager.py
++++ b/src/sage/repl/rich_output/display_manager.py
+@@ -744,7 +744,7 @@ class DisplayManager(SageObject):
+         """
+         if online:
+             from sage.misc.package import installed_packages
+-            version = installed_packages()['threejs']
++            version = 'r80'
+             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>

Deleted: test-optional.patch
===================================================================
--- test-optional.patch	2017-12-15 21:39:13 UTC (rev 274537)
+++ test-optional.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -1,25 +0,0 @@
---- 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 @@
-             if "all" in options.optional:
-                 # Special case to run all optional tests
-                 options.optional = True
--            else:
--                # We replace the 'optional' tag by all optional
--                # packages for which the installed version matches the
--                # latest available version (this implies in particular
--                # that the package is actually installed).
--                if 'optional' in options.optional:
--                    options.optional.discard('optional')
--                    from sage.misc.package import list_packages
--                    for pkg in list_packages('optional', local=True).values():
--                        if pkg['installed_version'] == pkg['remote_version']:
--                            options.optional.add(pkg['name'])
--
--                # Check that all tags are valid
--                for o in options.optional:
--                    if not optionaltag_regex.search(o):
--                        raise ValueError('invalid optional tag {!r}'.format(o))
- 
-         self.options = options
-         self.files = args

Copied: sagemath/repos/community-x86_64/test-optional.patch (from rev 274537, sagemath/trunk/test-optional.patch)
===================================================================
--- test-optional.patch	                        (rev 0)
+++ test-optional.patch	2017-12-15 21:40:15 UTC (rev 274538)
@@ -0,0 +1,25 @@
+--- 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 @@
+             if "all" in options.optional:
+                 # Special case to run all optional tests
+                 options.optional = True
+-            else:
+-                # We replace the 'optional' tag by all optional
+-                # packages for which the installed version matches the
+-                # latest available version (this implies in particular
+-                # that the package is actually installed).
+-                if 'optional' in options.optional:
+-                    options.optional.discard('optional')
+-                    from sage.misc.package import list_packages
+-                    for pkg in list_packages('optional', local=True).values():
+-                        if pkg['installed_version'] == pkg['remote_version']:
+-                            options.optional.add(pkg['name'])
+-
+-                # Check that all tags are valid
+-                for o in options.optional:
+-                    if not optionaltag_regex.search(o):
+-                        raise ValueError('invalid optional tag {!r}'.format(o))
+ 
+         self.options = options
+         self.files = args



More information about the arch-commits mailing list