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

Antonio Rojas arojas at archlinux.org
Thu Jul 12 14:26:45 UTC 2018


    Date: Thursday, July 12, 2018 @ 14:26:44
  Author: arojas
Revision: 357921

archrelease: copy trunk to community-x86_64

Added:
  sagemath/repos/community-x86_64/PKGBUILD
    (from rev 357920, sagemath/trunk/PKGBUILD)
  sagemath/repos/community-x86_64/fes02.patch
    (from rev 357920, sagemath/trunk/fes02.patch)
  sagemath/repos/community-x86_64/jupyter-path.patch
    (from rev 357920, sagemath/trunk/jupyter-path.patch)
  sagemath/repos/community-x86_64/latte-count.patch
    (from rev 357920, sagemath/trunk/latte-count.patch)
  sagemath/repos/community-x86_64/package.patch
    (from rev 357920, sagemath/trunk/package.patch)
  sagemath/repos/community-x86_64/r-no-readline.patch
    (from rev 357920, sagemath/trunk/r-no-readline.patch)
  sagemath/repos/community-x86_64/sagemath-cddlib-094j.patch
    (from rev 357920, sagemath/trunk/sagemath-cddlib-094j.patch)
  sagemath/repos/community-x86_64/sagemath-detect-igraph.patch
    (from rev 357920, sagemath/trunk/sagemath-detect-igraph.patch)
  sagemath/repos/community-x86_64/sagemath-eclib-20180710.patch
    (from rev 357920, sagemath/trunk/sagemath-eclib-20180710.patch)
  sagemath/repos/community-x86_64/sagemath-env.patch
    (from rev 357920, sagemath/trunk/sagemath-env.patch)
  sagemath/repos/community-x86_64/sagemath-gap-4.8.patch
    (from rev 357920, sagemath/trunk/sagemath-gap-4.8.patch)
  sagemath/repos/community-x86_64/sagemath-ignore-warnings.patch
    (from rev 357920, sagemath/trunk/sagemath-ignore-warnings.patch)
  sagemath/repos/community-x86_64/sagemath-lcalc-c++11.patch
    (from rev 357920, sagemath/trunk/sagemath-lcalc-c++11.patch)
  sagemath/repos/community-x86_64/sagemath-lrs.patch
    (from rev 357920, sagemath/trunk/sagemath-lrs.patch)
  sagemath/repos/community-x86_64/sagemath-networkx2.patch
    (from rev 357920, sagemath/trunk/sagemath-networkx2.patch)
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
    (from rev 357920, sagemath/trunk/sagemath-python3-notebook.patch)
  sagemath/repos/community-x86_64/sagemath-scipy-1.0.patch
    (from rev 357920, sagemath/trunk/sagemath-scipy-1.0.patch)
  sagemath/repos/community-x86_64/sagemath-singular-4.1.1.patch
    (from rev 357920, sagemath/trunk/sagemath-singular-4.1.1.patch)
  sagemath/repos/community-x86_64/sagemath-threejs.patch
    (from rev 357920, sagemath/trunk/sagemath-threejs.patch)
  sagemath/repos/community-x86_64/test-optional.patch
    (from rev 357920, 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-env.patch
  sagemath/repos/community-x86_64/sagemath-gap-4.8.patch
  sagemath/repos/community-x86_64/sagemath-ignore-warnings.patch
  sagemath/repos/community-x86_64/sagemath-lcalc-c++11.patch
  sagemath/repos/community-x86_64/sagemath-lrs.patch
  sagemath/repos/community-x86_64/sagemath-networkx2.patch
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
  sagemath/repos/community-x86_64/sagemath-scipy-1.0.patch
  sagemath/repos/community-x86_64/sagemath-singular-4.1.1.patch
  sagemath/repos/community-x86_64/sagemath-threejs.patch
  sagemath/repos/community-x86_64/test-optional.patch

---------------------------------+
 PKGBUILD                        |  353 ++++++-------
 fes02.patch                     |  114 ++--
 jupyter-path.patch              |   44 -
 latte-count.patch               |  142 ++---
 package.patch                   |   76 +-
 r-no-readline.patch             |   22 
 sagemath-cddlib-094j.patch      |  980 ++++++++++++++++++++++++++++++++++++++
 sagemath-detect-igraph.patch    |   42 -
 sagemath-eclib-20180710.patch   |   24 
 sagemath-env.patch              |  298 +++++------
 sagemath-gap-4.8.patch          |   62 +-
 sagemath-ignore-warnings.patch  |   50 -
 sagemath-lcalc-c++11.patch      |   20 
 sagemath-lrs.patch              |   44 -
 sagemath-networkx2.patch        |  350 ++++++-------
 sagemath-python3-notebook.patch |   54 +-
 sagemath-scipy-1.0.patch        |   32 -
 sagemath-singular-4.1.1.patch   |  216 ++++----
 sagemath-threejs.patch          |   22 
 test-optional.patch             |   54 +-
 20 files changed, 2005 insertions(+), 994 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-07-12 14:25:43 UTC (rev 357920)
+++ PKGBUILD	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,173 +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.2
-pkgrel=11
-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'
-  'coxeter: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-4.8-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'
-  'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra'
-  'sirocco: for computing the fundamental group of the complement of a plane curve'
-  'three.js: alternative 3D plots engine' 'dot2tex: for displaying some diagrams'
-  'python2-pip: to install optional packages with sage -pip')
-makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco
-  mcqd coxeter bliss-graphs tdlib python2-pkgconfig shared_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-threejs.patch sagemath-ignore-warnings.patch
-        sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch
-        sagemath-singular-4.1.1.patch sagemath-lcalc-c++11.patch sagemath-gap-4.8.patch
-        pari-ratpoints.patch::"https://github.com/sagemath/sage/commit/83458400.patch"
-        sagemath-cypari2.patch::"https://git.sagemath.org/sage.git/patch?id=da380b32")
-sha256sums=('41ba2c2dde7a02e1bb6880ae875d37ab058567cc26e760efe87eeb12188cd65b'
-            'b3c5f5c159d72ba7bc2b186b7b0e50a02b1ca60caef49b3857dbaad3da36b6fc'
-            'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107'
-            '0b680e674c11c47afa86162d8b49645620b8912722e08133d23357c29ca9310a'
-            '2cad308f8adbb6c54e6603fa22b2f0eb60f6f09248d5d015000c3932ac14f646'
-            '962ce805c87147212b21fc2ab0ac9af9bd0033942c7a6905b9906645b48e8a4f'
-            '18edeafb01cc1ed7270c2dfb41a58717918680c98e8eada1858736acd65d92ba'
-            'afd0952b9bb8f52fd428eae36cf719a58ff85a894baae88cbb2124e043768cc7'
-            '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
-            '2d13b15ad2d1511bb3d752a261497060a8901882b1c2fa9813219781b7a71d83'
-            'a4a6c87b46ff23b89608aca66d00427334502e8bfb5dfe68b94497d19be1c7ae'
-            'bfe49f0168fe0824f0eaf4ea793b08d5b3e43c4e3634eb5f664c70644a793a59'
-            '8253730940687992dd29d90d95bea7e2685bb4854db004090c8196ce92859b64'
-            '17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a'
-            'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c'
-            '507bf761df222d1961d53ebeaf8e6a5a3dc2d7b9cb78748d71ed8cb1ee1c4ac6'
-            '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0'
-            '6917cb74e50ae965ea8d7c39577e5f0a5068e4b6a67b53fc6f219149a7d06584'
-            'e24ad879f6b2eb970778fc5e867bcbe0a6d393feca8f11f5cb8d07da1f024be9'
-            '94847fc033fd36bc59217c8484d4cf48d0640ff35bb5ca5ffba88a8158c6dd44')
-
-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 or GLPK warnings during doctesting (Debian)
-  patch -p1 -i ../sagemath-ignore-warnings.patch
-# remove deprecated scipy parameters
-  patch -p1 -i ../sagemath-scipy-1.0.patch
-# fix build with Singular 4.1.1
-  patch -p1 -i ../sagemath-singular-4.1.1.patch
-# revert usage of development PARI features
-  patch -Rp1 -i ../pari-ratpoints.patch
-# don't force c++98 for lcalc (fixes build with NTL 11)
-  patch -p1 -i ../sagemath-lcalc-c++11.patch
-# Adjust paths for gap-4.8
-  patch -p1 -i ../sagemath-gap-4.8.patch
-
-# Upstream patches  
-# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
-  patch -p1 -i ../fes02.patch
-# update to cypari2 https://trac.sagemath.org/ticket/25813
-  patch -p1 -i ../sagemath-cypari2.patch
-
-# use python2
-  sed -e 's|#!/usr/bin/env sage-python23|#!/usr/bin/env python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' \
-    -e 's|exec python\b|exec python2|' -i src/bin/*
-  sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
-  sed -e 's|exec ipython\b|exec ipython2|' -e 's|exec pip\b|exec pip2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
-  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
-}
-
-
-build() {
-  cd sage-$pkgver/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 cachegrind callgrind cleaner coverage coverageall cython env eval grep grepdoc inline-fortran \
-    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run \
-    run-cython runtests startuptime.py sws2rst valgrind version.sh
-  do
-    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
-  
-# 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 357920, sagemath/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,180 @@
+# 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.2
+pkgrel=12
+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'
+  'coxeter: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-4.8-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'
+  'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra'
+  'sirocco: for computing the fundamental group of the complement of a plane curve'
+  'three.js: alternative 3D plots engine' 'dot2tex: for displaying some diagrams'
+  'python2-pip: to install optional packages with sage -pip')
+makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco
+  mcqd coxeter bliss-graphs tdlib python2-pkgconfig shared_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-threejs.patch sagemath-ignore-warnings.patch
+        sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch
+        sagemath-singular-4.1.1.patch sagemath-lcalc-c++11.patch sagemath-gap-4.8.patch
+        pari-ratpoints.patch::"https://github.com/sagemath/sage/commit/83458400.patch"
+        sagemath-cypari2.patch::"https://git.sagemath.org/sage.git/patch?id=da380b32"
+        sagemath-cddlib-094j.patch sagemath-eclib-20180710.patch)
+sha256sums=('41ba2c2dde7a02e1bb6880ae875d37ab058567cc26e760efe87eeb12188cd65b'
+            'b3c5f5c159d72ba7bc2b186b7b0e50a02b1ca60caef49b3857dbaad3da36b6fc'
+            'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107'
+            '0b680e674c11c47afa86162d8b49645620b8912722e08133d23357c29ca9310a'
+            '2cad308f8adbb6c54e6603fa22b2f0eb60f6f09248d5d015000c3932ac14f646'
+            '962ce805c87147212b21fc2ab0ac9af9bd0033942c7a6905b9906645b48e8a4f'
+            '18edeafb01cc1ed7270c2dfb41a58717918680c98e8eada1858736acd65d92ba'
+            'afd0952b9bb8f52fd428eae36cf719a58ff85a894baae88cbb2124e043768cc7'
+            '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
+            '2d13b15ad2d1511bb3d752a261497060a8901882b1c2fa9813219781b7a71d83'
+            'a4a6c87b46ff23b89608aca66d00427334502e8bfb5dfe68b94497d19be1c7ae'
+            'bfe49f0168fe0824f0eaf4ea793b08d5b3e43c4e3634eb5f664c70644a793a59'
+            '8253730940687992dd29d90d95bea7e2685bb4854db004090c8196ce92859b64'
+            '17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a'
+            'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c'
+            '507bf761df222d1961d53ebeaf8e6a5a3dc2d7b9cb78748d71ed8cb1ee1c4ac6'
+            '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0'
+            '6917cb74e50ae965ea8d7c39577e5f0a5068e4b6a67b53fc6f219149a7d06584'
+            'e24ad879f6b2eb970778fc5e867bcbe0a6d393feca8f11f5cb8d07da1f024be9'
+            '94847fc033fd36bc59217c8484d4cf48d0640ff35bb5ca5ffba88a8158c6dd44'
+            '092a928b77c8bb1e23399f22be39f67797a0065954128b690ead6a09f9ce1e44'
+            '182b0765d58494978bf27628bada8b42c95ef7eb2671b91ddf9c67608560c662')
+
+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 or GLPK warnings during doctesting (Debian)
+  patch -p1 -i ../sagemath-ignore-warnings.patch
+# remove deprecated scipy parameters
+  patch -p1 -i ../sagemath-scipy-1.0.patch
+# fix build with Singular 4.1.1
+  patch -p1 -i ../sagemath-singular-4.1.1.patch
+# revert usage of development PARI features
+  patch -Rp1 -i ../pari-ratpoints.patch
+# don't force c++98 for lcalc (fixes build with NTL 11)
+  patch -p1 -i ../sagemath-lcalc-c++11.patch
+# Adjust paths for gap-4.8
+  patch -p1 -i ../sagemath-gap-4.8.patch
+# Fix build with eclib 20180710
+  patch -p1 -i ../sagemath-eclib-20180710.patch
+
+# Upstream patches  
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+  patch -p1 -i ../fes02.patch
+# update to cypari2 https://trac.sagemath.org/ticket/25813
+  patch -p1 -i ../sagemath-cypari2.patch
+# port to cddlib 0.94j https://trac.sagemath.org/ticket/25344
+  patch -p1 -i ../sagemath-cddlib-094j.patch
+
+# use python2
+  sed -e 's|#!/usr/bin/env sage-python23|#!/usr/bin/env python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' \
+    -e 's|exec python\b|exec python2|' -i src/bin/*
+  sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+  sed -e 's|exec ipython\b|exec ipython2|' -e 's|exec pip\b|exec pip2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
+  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
+}
+
+
+build() {
+  cd sage-$pkgver/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 cachegrind callgrind cleaner coverage coverageall cython env eval grep grepdoc inline-fortran \
+    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run \
+    run-cython runtests startuptime.py sws2rst valgrind version.sh
+  do
+    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
+  
+# 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	2018-07-12 14:25:43 UTC (rev 357920)
+++ fes02.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 357920, sagemath/trunk/fes02.patch)
===================================================================
--- fes02.patch	                        (rev 0)
+++ fes02.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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	2018-07-12 14:25:43 UTC (rev 357920)
+++ jupyter-path.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 357920, sagemath/trunk/jupyter-path.patch)
===================================================================
--- jupyter-path.patch	                        (rev 0)
+++ jupyter-path.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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	2018-07-12 14:25:43 UTC (rev 357920)
+++ latte-count.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 357920, sagemath/trunk/latte-count.patch)
===================================================================
--- latte-count.patch	                        (rev 0)
+++ latte-count.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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	2018-07-12 14:25:43 UTC (rev 357920)
+++ package.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 357920, sagemath/trunk/package.patch)
===================================================================
--- package.patch	                        (rev 0)
+++ package.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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:

Deleted: r-no-readline.patch
===================================================================
--- r-no-readline.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ r-no-readline.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 357920, sagemath/trunk/r-no-readline.patch)
===================================================================
--- r-no-readline.patch	                        (rev 0)
+++ r-no-readline.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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,

Copied: sagemath/repos/community-x86_64/sagemath-cddlib-094j.patch (from rev 357920, sagemath/trunk/sagemath-cddlib-094j.patch)
===================================================================
--- sagemath-cddlib-094j.patch	                        (rev 0)
+++ sagemath-cddlib-094j.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,980 @@
+diff --git a/src/sage/geometry/polyhedron/backend_cdd.py b/src/sage/geometry/polyhedron/backend_cdd.py
+index 9e0ca53ba7b..8497741b0c4 100644
+--- a/src/sage/geometry/polyhedron/backend_cdd.py
++++ b/src/sage/geometry/polyhedron/backend_cdd.py
+@@ -154,7 +154,9 @@ def _init_from_cdd_input(self, cdd_input_string, cmdline_arg='--all', verbose=Fa
+             ....:    [0.62, -1.38, 0.38],[0.144, -1.04, 0.04],
+             ....:    [0.1309090909, -1.0290909091, 0.04]]
+             sage: Polyhedron(point_list)
+-            A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 14 vertices
++            Traceback (most recent call last):
++            ...
++            ValueError: *Error: Numerical inconsistency is found.  Use the GMP exact arithmetic.
+             sage: Polyhedron(point_list, base_ring=QQ)
+             A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 14 vertices
+         """
+@@ -286,7 +288,9 @@ def cdd_adjacencies():
+             else:
+                 n_cdd=n;
+             self._V_adjacency_matrix = matrix(ZZ, n, n, 0)
+-            expect_in_cddout('begin')
++            if not find_in_cddout('begin'):
++                raise ValueError('Error while parsing cdd output: could not '
++                                 'find "begin" after "Vertex graph"')
+             l = cddout.pop(0).split()
+             assert int(l[0]) == n_cdd, "Not enough V-adjacencies in cdd output?"
+             for i in range(n_cdd):
+@@ -309,7 +313,9 @@ def cdd_adjacencies():
+         if find_in_cddout('Facet graph'):
+             n = len(self._Hrepresentation);
+             self._H_adjacency_matrix = matrix(ZZ, n, n, 0)
+-            expect_in_cddout('begin')
++            if not find_in_cddout('begin'):
++                raise ValueError('Error while parsing cdd output: could not '
++                                 'find "begin" after "Facet graph"')
+             l = cddout.pop(0).split()
+             assert int(l[0]) == n, "Not enough H-adjacencies in cdd output?"
+             for i in range(n):
+---
+diff --git a/src/sage/geometry/hasse_diagram.py b/src/sage/geometry/hasse_diagram.py
+index 9d336ce..c5bff21 100644
+--- a/src/sage/geometry/hasse_diagram.py
++++ b/src/sage/geometry/hasse_diagram.py
+@@ -44,7 +44,7 @@ def Hasse_diagram_from_incidences(atom_to_coatoms, coatom_to_atoms,
+       implementation will just return these two tuples as a tuple;
+ 
+     - ``required_atoms`` -- list of atoms (default:None). Each
+-      non-empty "face" requires at least on of the specified atoms
++      non-empty "face" requires at least one of the specified atoms
+       present. Used to ensure that each face has a vertex.
+ 
+     - ``key`` -- any hashable value (default: None). It is passed down
+diff --git a/src/sage/geometry/polyhedron/backend_cdd.py b/src/sage/geometry/polyhedron/backend_cdd.py
+index 8497741..85f6632 100644
+--- a/src/sage/geometry/polyhedron/backend_cdd.py
++++ b/src/sage/geometry/polyhedron/backend_cdd.py
+@@ -1,6 +1,19 @@
+-"""
++# -*- coding: utf-8 -*-
++r"""
+ The cdd backend for polyhedral computations
+ """
++# ****************************************************************************
++#       Copyright (C) 2011-2014 Volker Braun <vbraun.name at gmail.com>
++#                     2018      Timo Kaufmann <timokau at zoho.com>
++#                     2018      Julian Rüth <julian.rueth at fsfe.org>
++#
++# This program is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 2 of the License, or
++# (at your option) any later version.
++#                  https://www.gnu.org/licenses/
++# ****************************************************************************
++
+ from __future__ import print_function
+ from __future__ import absolute_import
+ 
+@@ -13,12 +26,10 @@ from .base import Polyhedron_base
+ from .base_QQ import Polyhedron_QQ
+ from .base_RDF import Polyhedron_RDF
+ 
+-#########################################################################
+ class Polyhedron_cdd(Polyhedron_base):
+-    """
++    r"""
+     Base class for the cdd backend.
+     """
+-
+     def _init_from_Vrepresentation(self, vertices, rays, lines, verbose=False):
+         """
+         Construct polyhedron from V-representation data.
+@@ -49,8 +60,30 @@ class Polyhedron_cdd(Polyhedron_base):
+         """
+         from .cdd_file_format import cdd_Vrepresentation
+         s = cdd_Vrepresentation(self._cdd_type, vertices, rays, lines)
+-        self._init_from_cdd_input(s, '--reps', verbose)
+-
++        s = self._run_cdd(s, '--redcheck', verbose=verbose)
++        s = self._run_cdd(s, '--repall', verbose=verbose)
++        self._init_from_cdd_output(s)
++        if not self.base_ring().is_exact():
++            # cdd's parser can not handle the full output of --repall, so we
++            # need to extract the first block before we feed it back into cdd
++            s = s.splitlines()
++            s = s[:s.index('end')+1]
++            s = '\n'.join(s)
++            t = self._run_cdd(s, '--rep', verbose=verbose)
++
++            def parse(intro, data):
++                count = int(data[0][0])
++                if count != len(self._cdd_V_to_sage_V):
++                    # Upstream claims that nothing can be done about these
++                    # cases/that they are features not bugs. Imho, cddlib is
++                    # not really suitable for automatic parsing of its output,
++                    # the implementation backed by doubles has not really been
++                    # optimized for numerical stability, and makes some
++                    # somewhat random numerical choices. (But I am not an
++                    # expert in that field by any means.) See also
++                    # https://github.com/cddlib/cddlib/pull/7.
++                    raise ValueError("polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data")
++            Polyhedron_cdd._parse_block(t.splitlines(), 'V-representation', parse)
+ 
+     def _init_from_Hrepresentation(self, ieqs, eqns, verbose=False):
+         """
+@@ -78,88 +111,32 @@ class Polyhedron_cdd(Polyhedron_base):
+         """
+         from .cdd_file_format import cdd_Hrepresentation
+         s = cdd_Hrepresentation(self._cdd_type, ieqs, eqns)
+-        self._init_from_cdd_input(s, '--reps', verbose)
+-
+-
+-    def _init_facet_adjacency_matrix(self, verbose=False):
+-        """
+-        Compute the facet adjacency matrix in case it has not been
+-        computed during initialization.
+-
+-        INPUT:
+-
+-        - ``verbose`` -- boolean (default: ``False``). Whether to print
+-          verbose output for debugging purposes.
+-
+-        EXAMPLES::
+-
+-            sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], backend='cdd', base_ring=QQ)
+-            sage: '_H_adjacency_matrix' in p.__dict__
+-            False
+-            sage: p._init_facet_adjacency_matrix()
+-            sage: p._H_adjacency_matrix
+-            [0 1 1]
+-            [1 0 1]
+-            [1 1 0]
+-        """
+-        self._init_from_cdd_input(self.cdd_Hrepresentation(),
+-                                  '--adjacency', verbose)
+-
+-
+-    def _init_vertex_adjacency_matrix(self, verbose=False):
+-        """
+-        Compute the vertex adjacency matrix in case it has not been
+-        computed during initialization.
+-
+-        INPUT:
+-
+-        - ``verbose`` -- boolean (default: ``False``). Whether to print
+-          verbose output for debugging purposes.
+-
+-        EXAMPLES::
+-
+-            sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], backend='cdd', base_ring=QQ)
+-            sage: '_V_adjacency_matrix' in p.__dict__
+-            False
+-            sage: p._init_vertex_adjacency_matrix()
+-            sage: p._V_adjacency_matrix
+-            [0 1 1]
+-            [1 0 1]
+-            [1 1 0]
+-        """
+-        self._init_from_cdd_input(self.cdd_Vrepresentation(),
+-                                  '--adjacency', verbose)
+-
+-
+-    def _init_from_cdd_input(self, cdd_input_string, cmdline_arg='--all', verbose=False):
+-        """
+-        Internal method: run cdd on a cdd H- or V-representation
+-        and initialize ourselves with the output.
+-
+-        TESTS::
+-
+-            sage: p = Polyhedron(vertices=[[0,0,0],[1,0,0],[0,1,0],[0,0,1]],
+-            ....:                backend='cdd', base_ring=QQ)
+-            sage: from sage.geometry.polyhedron.cdd_file_format import cdd_Vrepresentation
+-            sage: s = cdd_Vrepresentation('rational', [[0,0,1],[0,1,0],[1,0,0]], [], [])
+-            sage: p._init_from_cdd_input(s)
+-            sage: p.dim()
+-            2
+-
+-            sage: point_list = [[0.132, -1.028, 0.028],[0.5, 0.5, -1.5],
+-            ....:    [-0.5, 1.5, -0.5],[0.5, 0.5, 0.5],[1.5, -0.5, -0.5],
+-            ....:    [-0.332, -0.332, -0.668],[-1.332, 0.668, 0.332],
+-            ....:    [-0.932, 0.068, 0.932],[-0.38, -0.38, 1.38],
+-            ....:    [-0.744, -0.12, 1.12],[-0.7781818182, -0.12, 0.9490909091],
+-            ....:    [0.62, -1.38, 0.38],[0.144, -1.04, 0.04],
+-            ....:    [0.1309090909, -1.0290909091, 0.04]]
+-            sage: Polyhedron(point_list)
+-            Traceback (most recent call last):
+-            ...
+-            ValueError: *Error: Numerical inconsistency is found.  Use the GMP exact arithmetic.
+-            sage: Polyhedron(point_list, base_ring=QQ)
+-            A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 14 vertices
+-        """
++        s = self._run_cdd(s, '--redcheck', verbose=verbose)
++        s = self._run_cdd(s, '--repall', verbose=verbose)
++        self._init_from_cdd_output(s)
++        if not self.base_ring().is_exact():
++            # cdd's parser can not handle the full output of --repall, so we
++            # need to extract the first block before we feed it back into cdd
++            s = s.splitlines()
++            s = s[:s.index('end')+1]
++            s = '\n'.join(s)
++            t = self._run_cdd(s, '--rep', verbose=verbose)
++
++            def parse(intro, data):
++                count = int(data[0][0])
++                infinite_count = len([d for d in data[1:] if d[0] == '1' and all(c == '0' for c in d[1:])])
++                if count - infinite_count != len(self._Hrepresentation):
++                    # Upstream claims that nothing can be done about these
++                    # cases/that they are features not bugs. Imho, cddlib is
++                    # not really suitable for automatic parsing of its output,
++                    # the implementation backed by doubles has not really been
++                    # optimized for numerical stability, and makes some
++                    # somewhat random numerical choices. (But I am not an
++                    # expert in that field by any means.)
++                    raise ValueError("polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data")
++            Polyhedron_cdd._parse_block(t.splitlines(), 'H-representation', parse)
++
++    def _run_cdd(self, cdd_input_string, cmdline_arg, verbose=False):
+         if verbose:
+             print('---- CDD input -----')
+             print(cdd_input_string)
+@@ -175,157 +152,189 @@ class Polyhedron_cdd(Polyhedron_base):
+         if 'Error:' in ans + err:
+             # cdd reports errors on stdout and misc information on stderr
+             raise ValueError(ans.strip())
+-        self._init_from_cdd_output(ans)
++        return ans
++
++    @classmethod
++    def _parse_block(cls, cddout, header, parser):
++        r"""
++        Parse a block of cdd data identified by ``header`` by invoking
++        ``parser`` on it.
++
++        EXAMPLES::
+ 
++            sage: cddout = r'''
++            ....: unrelated
++            ....: HEADER
++            ....: intro 0 1 2
++            ....: begin
++            ....: data 0 1 2
++            ....: data 3 4 5
++            ....: end
++            ....: unrelated
++            ....: '''.splitlines()
++            sage: from sage.geometry.polyhedron.backend_cdd import Polyhedron_cdd
++            sage: def parser(intro, data):
++            ....:     print("INTRO:", intro)
++            ....:     print("DATA:", data)
++            sage: Polyhedron_cdd._parse_block(cddout, 'HEADER', parser)
++            INTRO: [['intro', '0', '1', '2']]
++            DATA: [['data', '0', '1', '2'], ['data', '3', '4', '5']]
+ 
+-    def _init_from_cdd_output(self, cdd_output_string):
++        """
++        try:
++            block = cddout[cddout.index(header)+1:]
++        except ValueError:
++            # section is missing in the cdd output
++            return
++
++        intro = block[:block.index('begin')]
++        intro = [i.strip().split() for i in intro]
++        data = block[block.index('begin')+1:block.index('end')]
++        data = [d.strip().split() for d in data]
++        parser(intro, data)
++
++    def _init_from_cdd_output(self, cddout):
+         """
+         Initialize ourselves with the output from cdd.
+ 
+         TESTS::
+ 
+-            sage: from sage.geometry.polyhedron.cdd_file_format import cdd_Vrepresentation
+-            sage: s = cdd_Vrepresentation('rational',[[0,0],[1,0],[0,1],[1,1]], [], [])
+-            sage: from subprocess import Popen, PIPE
+-            sage: cdd_proc = Popen(['cdd_both_reps_gmp', '--all'], stdin=PIPE, stdout=PIPE, stderr=PIPE)
+-            sage: ans, err = cdd_proc.communicate(input=s)
+-            sage: p = Polyhedron(vertices = [[0,0],[1,0],[0,1],[1,1]], backend='cdd', base_ring=QQ)
+-            sage: p._init_from_cdd_output(ans)
++            sage: p = Polyhedron(vertices = [[0,0],[1,0],[0,1],[1,1]], backend='cdd', base_ring=QQ) # indirect doctest
+             sage: p.vertices()
+             (A vertex at (0, 0), A vertex at (1, 0), A vertex at (0, 1), A vertex at (1, 1))
+         """
+-        cddout=cdd_output_string.splitlines()
+-        suppressed_vertex = False   # whether cdd suppressed the vertex in output
+-        parent = self.parent()
+-
+-        # nested function
+-        def expect_in_cddout(expected_string):
+-            l = cddout.pop(0).strip()
+-            if l!=expected_string:
+-                raise ValueError('Error while parsing cdd output: expected "'
+-                                   +expected_string+'" but got "'+l+'".\n')
+-        # nested function
+-        def cdd_linearities():
+-            l = cddout[0].split()
+-            if l[0] != "linearity":
+-                return []
+-            cddout.pop(0)
+-            assert len(l) == int(l[1])+2, "Not enough linearities given"
+-            return [int(i)-1 for i in l[2:]]  # make indices pythonic
+-
+-        # nested function
+-        def cdd_convert(string, base_ring=self.base_ring()):
+-            """
+-            Converts the cdd output string to a numerical value.
+-            """
+-            return [base_ring(x) for x in string.split()]
+-
+-        # nested function
+-        def find_in_cddout(expected_string):
+-            """
+-            Find the expected string in a list of strings, and
+-            truncates ``cddout`` to start at that point. Returns
+-            ``False`` if search fails.
+-            """
+-            for pos in range(0,len(cddout)):
+-                l = cddout[pos].strip();
+-                if l==expected_string:
+-                    # must not assign to cddout in nested function
+-                    for i in range(0,pos+1):
+-                        cddout.pop(0)
+-                    return True
+-            return False
+-
+-        if find_in_cddout('V-representation'):
++        cddout = cddout.splitlines()
++
++        def parse_indices(count, cdd_indices, cdd_indices_to_sage_indices=None):
++            cdd_indices = map(int, cdd_indices)
++            if cdd_indices_to_sage_indices is None:
++                cdd_indices_to_sage_indices = {i:i-1 for i in cdd_indices}
++            if count < 0:
++                assert cdd_indices_to_sage_indices is not None, "Did not expect negative counts here"
++                count = -count
++                cdd_indices = list(set(cdd_indices_to_sage_indices.keys()) - set(cdd_indices))
++                assert count in [len(cdd_indices), len(cdd_indices) -1]
++            assert count == len(cdd_indices)
++            return [cdd_indices_to_sage_indices[i] for i in cdd_indices if cdd_indices_to_sage_indices[i] is not None]
++
++        def parse_linearities(intro):
++            for entries in intro:
++                if entries and entries.pop(0) == 'linearity':
++                    return parse_indices(int(entries.pop(0)), entries)
++            return []
++
++        def parse_H_representation(intro, data):
++            if '_Hrepresentation' in self.__dict__:
++                raise NotImplementedError("can not replace internal representation as this breaks caching")
++            self._Hrepresentation = []
++            # we drop some entries in cdd's output and this changes the numbering; this dict keeps track of that
++            self._cdd_H_to_sage_H = {}
++            equations = parse_linearities(intro)
++            data[0].pop(2) # ignore data type, we know the base ring already
++            count, dimension = map(int, data.pop(0))
++            assert self.ambient_dim() == dimension - 1, "Unexpected ambient dimension"
++            assert len(data) == count, "Unexpected number of lines"
++            for i, line in enumerate(data):
++                coefficients = map(self.base_ring(), line)
++                if coefficients[0] != 0 and all([e == 0 for e in coefficients[1:]]):
++                    # cddlib sometimes includes an implicit plane at infinity: 1 0 0 ... 0
++                    # We do not care about this entry.
++                    self._cdd_H_to_sage_H[i+1] = None
++                    continue
++
++                self._cdd_H_to_sage_H[i+1] = len(self._Hrepresentation)
++                if i in equations:
++                    self.parent()._make_Equation(self, coefficients)
++                else:
++                    self.parent()._make_Inequality(self, coefficients)
++
++            self._Hrepresentation = tuple(self._Hrepresentation)
++
++        def parse_V_representation(intro, data):
++            if '_Vrepresentation' in self.__dict__:
++                raise NotImplementedError("can not replace internal representation as this breaks caching")
+             self._Vrepresentation = []
+-            lines = cdd_linearities()
+-            expect_in_cddout('begin')
+-            l = cddout.pop(0).split()
+-            assert self.ambient_dim() == int(l[1])-1,  "Different ambient dimension?"
+-            suppressed_vertex = True
+-            for i in range(int(l[0])):
+-                l = cddout.pop(0).strip()
+-                l_type = l[0]
+-                l = l[1:]
++            # we drop some entries in cdd's output and this changes the numbering; this dict keeps track of that
++            self._cdd_V_to_sage_V = {}
++            lines = parse_linearities(intro)
++            data[0].pop(2) # ignore data type, we know the base ring already
++            count, dimension = map(int, data.pop(0))
++            assert self.ambient_dim() == dimension - 1, "Unexpected ambient dimension"
++            assert len(data) == count, "Unexpected number of lines"
++            has_vertex = False
++            for i, line in enumerate(data):
++                kind = line.pop(0)
++                coefficients = map(self.base_ring(), line)
++                self._cdd_V_to_sage_V[i+1] = len(self._Vrepresentation)
+                 if i in lines:
+-                    parent._make_Line(self, cdd_convert(l));
+-                elif l_type == '0':
+-                    parent._make_Ray(self, cdd_convert(l));
++                    self.parent()._make_Line(self, coefficients);
++                elif kind == '0':
++                    self.parent()._make_Ray(self, coefficients);
+                 else:
+-                    parent._make_Vertex(self, cdd_convert(l));
+-                    suppressed_vertex = False
+-            if suppressed_vertex and self.n_Vrepresentation()>0:
+-                # cdd does not output the vertex if it is only the origin
+-                parent._make_Vertex(self, [0] * self.ambient_dim())
++                    self.parent()._make_Vertex(self, coefficients)
++                    has_vertex = True
++            if len(self._Vrepresentation) and not has_vertex:
++                # when the Polyhedron consists only of lines/rays from the
++                # origin, cddlib does not output the single vertex at the
++                # origin so we have to add it here as the Polyhedron class
++                # expects it to be there.
++                self.parent()._make_Vertex(self, [self.base_ring().zero()] * self.ambient_dim())
+             self._Vrepresentation = tuple(self._Vrepresentation)
+-            expect_in_cddout('end')
+ 
+-        if find_in_cddout('H-representation'):
+-            self._Hrepresentation = []
+-            equations = cdd_linearities()
+-            expect_in_cddout('begin')
+-            l = cddout.pop(0).split()
+-            assert self.ambient_dim() == int(l[1])-1, "Different ambient dimension?"
+-            for i in range(int(l[0])):
+-                l = cddout.pop(0)
+-                if i in equations:
+-                    parent._make_Equation(self, cdd_convert(l));
+-                else:
+-                    parent._make_Inequality(self, cdd_convert(l));
+-            self._Hrepresentation = tuple(self._Hrepresentation)
+-            expect_in_cddout('end')
+-
+-        # nested function
+-        def cdd_adjacencies():
+-            l = cddout.pop(0).split()
+-            assert l[2] == ':', "Not a line of the adjacency data?"
+-            return [int(i)-1 for i in l[3:]]
+-
+-        if find_in_cddout('Vertex graph'):
+-            n = len(self._Vrepresentation);
+-            if suppressed_vertex:
+-                n_cdd=n-1;
+-            else:
+-                n_cdd=n;
+-            self._V_adjacency_matrix = matrix(ZZ, n, n, 0)
+-            if not find_in_cddout('begin'):
+-                raise ValueError('Error while parsing cdd output: could not '
+-                                 'find "begin" after "Vertex graph"')
+-            l = cddout.pop(0).split()
+-            assert int(l[0]) == n_cdd, "Not enough V-adjacencies in cdd output?"
+-            for i in range(n_cdd):
+-                for a in cdd_adjacencies():
+-                    self._V_adjacency_matrix[i,a] = 1
++        def parse_adjacency(intro, data, N, cdd_indices_to_sage_indices):
++            ret = matrix(ZZ, N, N, 0)
++            cdd_vertex_count = int(data.pop(0)[0])
++            data.reverse()
++            for adjacencies in data:
++                assert adjacencies[2] == ':', "Not a line of adjacency data"
++                cdd_vertex = int(adjacencies[0])
++                count = int(adjacencies[1])
++
++                # cdd sometimes prints implicit adjacencies for the plane at
++                # infinity at the end of the output (even though it's not part
++                # of the V/H representation) so we ignore indices that we do
++                # not know about.
++                if cdd_vertex not in cdd_indices_to_sage_indices:
++                    cdd_indices_to_sage_indices[cdd_vertex] = None
++                v = cdd_indices_to_sage_indices[cdd_vertex]
++                if v is None:
++                    continue
++                for w in parse_indices(count, adjacencies[3:], cdd_indices_to_sage_indices):
++                    if w is None:
++                        continue
++                    ret[v, w] = 1
++            return ret
++
++        def parse_vertex_adjacency(intro, data):
++            if '_V_adjacency_matrix' in self.__dict__:
++                raise NotImplementedError("can not replace internal representation as this breaks caching")
++            N = len(self._Vrepresentation)
++            self._V_adjacency_matrix = parse_adjacency(intro, data, N, self._cdd_V_to_sage_V)
++            for i, v in enumerate(self._Vrepresentation):
+                 # cdd reports that lines are never adjacent to anything.
+-                # I disagree, they are adjacent to everything!
+-                if self._Vrepresentation[i].is_line():
+-                    for j in range(n):
++                # we disagree, they are adjacent to everything.
++                if v.is_line():
++                    for j in range(len(self._Vrepresentation)):
+                         self._V_adjacency_matrix[i,j] = 1
+                         self._V_adjacency_matrix[j,i] = 1
+-                    self._V_adjacency_matrix[i,i] = 0
+-            if suppressed_vertex: # cdd implied that there is only one vertex
+-                for i in range(n-1):
+-                    self._V_adjacency_matrix[i,n-1] = 1
+-                    self._V_adjacency_matrix[n-1,i] = 1
++                self._V_adjacency_matrix[i,i] = 0
+             self._V_adjacency_matrix.set_immutable()
+-            expect_in_cddout('end')
+-
+-        if find_in_cddout('Facet graph'):
+-            n = len(self._Hrepresentation);
+-            self._H_adjacency_matrix = matrix(ZZ, n, n, 0)
+-            if not find_in_cddout('begin'):
+-                raise ValueError('Error while parsing cdd output: could not '
+-                                 'find "begin" after "Facet graph"')
+-            l = cddout.pop(0).split()
+-            assert int(l[0]) == n, "Not enough H-adjacencies in cdd output?"
+-            for i in range(n):
+-                for a in cdd_adjacencies():
+-                    self._H_adjacency_matrix[i,a] = 1
++            self.vertex_adjacency_matrix.set_cache(self._V_adjacency_matrix)
++
++        def parse_facet_adjacency(intro, data):
++            if '_H_adjacency_matrix' in self.__dict__:
++                raise NotImplementedError("can not replace internal representation as this breaks caching")
++            N = len(self._Hrepresentation)
++            self._H_adjacency_matrix = parse_adjacency(intro, data, N, self._cdd_H_to_sage_H)
+             self._H_adjacency_matrix.set_immutable()
+-            expect_in_cddout('end')
++            self.facet_adjacency_matrix.set_cache(self._H_adjacency_matrix)
++
++        Polyhedron_cdd._parse_block(cddout, 'H-representation', parse_H_representation)
++        Polyhedron_cdd._parse_block(cddout, 'V-representation', parse_V_representation)
++        Polyhedron_cdd._parse_block(cddout, 'Facet adjacency', parse_facet_adjacency)
++        Polyhedron_cdd._parse_block(cddout, 'Vertex adjacency', parse_vertex_adjacency)
+ 
+ 
+-#########################################################################
+ class Polyhedron_QQ_cdd(Polyhedron_cdd, Polyhedron_QQ):
+     """
+     Polyhedra over QQ with cdd
+@@ -350,7 +359,7 @@ class Polyhedron_QQ_cdd(Polyhedron_cdd, Polyhedron_QQ):
+ 
+     _cdd_type = 'rational'
+ 
+-    _cdd_executable = 'cdd_both_reps_gmp'
++    _cdd_executable = 'cddexec_gmp'
+ 
+     def __init__(self, parent, Vrep, Hrep, **kwds):
+         """
+@@ -369,7 +378,6 @@ class Polyhedron_QQ_cdd(Polyhedron_cdd, Polyhedron_QQ):
+         Polyhedron_cdd.__init__(self, parent, Vrep, Hrep, **kwds)
+ 
+ 
+-#########################################################################
+ class Polyhedron_RDF_cdd(Polyhedron_cdd, Polyhedron_RDF):
+     """
+     Polyhedra over RDF with cdd
+@@ -392,7 +400,7 @@ class Polyhedron_RDF_cdd(Polyhedron_cdd, Polyhedron_RDF):
+     """
+     _cdd_type = 'real'
+ 
+-    _cdd_executable = 'cdd_both_reps'
++    _cdd_executable = 'cddexec'
+ 
+     def __init__(self, parent, Vrep, Hrep, **kwds):
+         """
+diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py
+index 34f0a3f..a8ca502 100644
+--- a/src/sage/geometry/polyhedron/base.py
++++ b/src/sage/geometry/polyhedron/base.py
+@@ -47,10 +47,9 @@ from sage.categories.sets_cat import EmptySetError
+ #  * derive from Polyhedron_base
+ #
+ #  * you must implement _init_from_Vrepresentation and
+-#    _init_from_Vrepresentationa
++#    _init_from_Hrepresentation
+ #
+-#  * You might want to override _init_empty_polyhedron,
+-#    _init_facet_adjacency_matrix, _init_vertex_adjacency_matrix, and
++#  * You might want to override _init_empty_polyhedron and
+ #    _make_polyhedron_face.
+ #
+ #  * You can of course also override any other method for which you
+diff --git a/src/sage/geometry/polyhedron/library.py b/src/sage/geometry/polyhedron/library.py
+index bbadbb3..2cdc728 100644
+--- a/src/sage/geometry/polyhedron/library.py
++++ b/src/sage/geometry/polyhedron/library.py
+@@ -1100,18 +1100,23 @@ class Polytopes():
+ 
+         EXAMPLES::
+ 
+-            sage: td = polytopes.truncated_dodecahedron()   # long time - 6secs
+-            sage: td.f_vector()                # long time
++            sage: td = polytopes.truncated_dodecahedron()
++            sage: td.f_vector()
+             (1, 60, 90, 32, 1)
+-            sage: td.base_ring()               # long time
++            sage: td.base_ring()
+             Number Field in sqrt5 with defining polynomial x^2 - 5
+ 
+-        A much faster implementation using floating point approximations::
++        The faster implementation using floating point approximations does not
++        work unfortunately, see https://github.com/cddlib/cddlib/pull/7 for a
++        detailed discussion of this case::
+ 
+             sage: td = polytopes.truncated_dodecahedron(exact=False)
+-            sage: td.f_vector()
++            Traceback (most recent call last):
++            ...
++            ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
++            sage: td.f_vector() # not tested
+             (1, 60, 90, 32, 1)
+-            sage: td.base_ring()
++            sage: td.base_ring() # not tested
+             Real Double Field
+ 
+         Its faces are 20 triangles and 12 regular decagons::
+@@ -1323,21 +1328,25 @@ class Polytopes():
+             sage: ti.base_ring()               # long time
+             Number Field in sqrt5 with defining polynomial x^2 - 5
+ 
+-        A much faster implementation using floating point approximations::
++        The faster implementation using floating point approximations does not
++        work unfortunately::
+ 
+             sage: ti = polytopes.truncated_icosidodecahedron(exact=False)
+-            sage: ti.f_vector()
++            Traceback (most recent call last):
++            ...
++            ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
++            sage: ti.f_vector() # not tested
+             (1, 120, 180, 62, 1)
+-            sage: ti.base_ring()
++            sage: ti.base_ring() # not tested
+             Real Double Field
+ 
+         Its faces are 30 squares, 20 hexagons and 12 decagons::
+ 
+-            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 4)
++            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 4) # long time
+             30
+-            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 6)
++            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 6) # long time
+             20
+-            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 10)
++            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 10) # long time
+             12
+         """
+         if base_ring is None and exact:
+@@ -1382,26 +1391,32 @@ class Polytopes():
+ 
+         - ``backend`` -- the backend to use to create the polytope.
+ 
+-        EXAMPLES::
++        EXAMPLES:
++
++        Unfortunately, no polyhedra backend supports the construction of the
++        snub dodecahedron at the moment::
+ 
+             sage: sd = polytopes.snub_dodecahedron()
+-            sage: sd.f_vector()
++            Traceback (most recent call last):
++            ...
++            ValueError: *Error: Numerical inconsistency is found.  Use the GMP exact arithmetic.
++            sage: sd.f_vector() # not tested
+             (1, 60, 150, 92, 1)
+-            sage: sd.base_ring()
++            sage: sd.base_ring() # not tested
+             Real Double Field
+ 
+         Its faces are 80 triangles and 12 pentagons::
+ 
+-            sage: sum(1 for f in sd.faces(2) if len(f.vertices()) == 3)
++            sage: sum(1 for f in sd.faces(2) if len(f.vertices()) == 3) # not tested
+             80
+-            sage: sum(1 for f in sd.faces(2) if len(f.vertices()) == 5)
++            sage: sum(1 for f in sd.faces(2) if len(f.vertices()) == 5) # not tested
+             12
+         """
+         if base_ring is None:
+             base_ring = RDF
+         phi = (1 + base_ring(5).sqrt()) / 2
+-        xi = ((phi/2 + (phi - 5/27).sqrt()/2).nth_root(3) +
+-              (phi/2 - (phi - 5/27).sqrt()/2).nth_root(3))
++        xi = ((phi/2 + (phi - 5/27).sqrt()/2)**(~ZZ(3)) +
++              (phi/2 - (phi - 5/27).sqrt()/2)**(~ZZ(3)))
+ 
+         alpha = xi - 1 / xi
+         beta = xi * phi + phi**2 + phi / xi
+@@ -1549,14 +1564,18 @@ class Polytopes():
+             sage: gap                                # not tested - very long time
+             A 4-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5)^4 defined as the convex hull of 100 vertices
+ 
+-        Computation with approximated coordinates is much faster::
++        Computation with approximated coordinates would be much faster but is
++        not supported currently::
+ 
+             sage: gap = polytopes.grand_antiprism(exact=False)
+-            sage: gap
++            Traceback (most recent call last):
++            ...
++            ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
++            sage: gap # not tested
+             A 4-dimensional polyhedron in RDF^4 defined as the convex hull of 100 vertices
+-            sage: gap.f_vector()
++            sage: gap.f_vector() # not tested
+             (1, 100, 500, 720, 320, 1)
+-            sage: len(list(gap.bounded_edges()))
++            sage: len(list(gap.bounded_edges())) # not tested
+             500
+         """
+         from itertools import product
+diff --git a/src/sage/libs/ppl.pyx b/src/sage/libs/ppl.pyx
+index 5366c74..e318e86 100644
+--- a/src/sage/libs/ppl.pyx
++++ b/src/sage/libs/ppl.pyx
+@@ -110,14 +110,11 @@ basis vectors::
+     sage: C_Polyhedron(gs)
+     A 4-dimensional polyhedron in QQ^5 defined as the convex hull of 120 points
+ 
+-The above computation (using PPL) finishes without noticeable delay (timeit
+-measures it to be 90 microseconds on sage.math). Below we do the same
+-computation with cddlib, which needs more than 3 seconds on the same
+-hardware::
++The same computation with cddlib which is slightly slower::
+ 
+     sage: basis = list(range(5))
+     sage: gs = [ tuple(coeff) for coeff in Permutations(basis) ]
+-    sage: Polyhedron(vertices=gs, backend='cdd')  # long time (3s on sage.math, 2011)
++    sage: Polyhedron(vertices=gs, backend='cdd')
+     A 4-dimensional polyhedron in QQ^5 defined as the convex hull of 120 vertices
+ 
+ DIFFERENCES VS. C++
+diff --git a/src/sage/categories/finite_coxeter_groups.py b/src/sage/categories/finite_coxeter_groups.py
+index e0b2846..8395895 100644
+--- a/src/sage/categories/finite_coxeter_groups.py
++++ b/src/sage/categories/finite_coxeter_groups.py
+@@ -712,11 +712,15 @@ class FiniteCoxeterGroups(CategoryWithAxiom):
+                 If function is too slow, switching the base ring to
+                 :class:`RDF` will almost certainly speed things up.
+ 
+-            EXAMPLES::
++            EXAMPLES:
++
++            Unfortunately, an inexact base ring can not always be used::
+ 
+                 sage: W = CoxeterGroup(['H',3], base_ring=RDF)
+                 sage: W.permutahedron()
+-                A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 120 vertices
++                Traceback (most recent call last):
++                ...
++                ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
+ 
+                 sage: W = CoxeterGroup(['I',7])
+                 sage: W.permutahedron()
+diff --git a/src/sage/geometry/polyhedron/backend_cdd.py b/src/sage/geometry/polyhedron/backend_cdd.py
+index 85f6632..aaae546 100644
+--- a/src/sage/geometry/polyhedron/backend_cdd.py
++++ b/src/sage/geometry/polyhedron/backend_cdd.py
+@@ -115,6 +115,10 @@ class Polyhedron_cdd(Polyhedron_base):
+         s = self._run_cdd(s, '--repall', verbose=verbose)
+         self._init_from_cdd_output(s)
+         if not self.base_ring().is_exact():
++            if len(self._Vrepresentation) == 0:
++                # cdd (reasonably) refuses to handle empty polyhedra, so we
++                # skip this check
++                return
+             # cdd's parser can not handle the full output of --repall, so we
+             # need to extract the first block before we feed it back into cdd
+             s = s.splitlines()
+diff --git a/src/sage/graphs/generators/smallgraphs.py b/src/sage/graphs/generators/smallgraphs.py
+index bae02d7..084ed43 100644
+--- a/src/sage/graphs/generators/smallgraphs.py
++++ b/src/sage/graphs/generators/smallgraphs.py
+@@ -4454,14 +4454,19 @@ def TruncatedIcosidodecahedralGraph():
+     and 180 edges. For more information, see the
+     :wikipedia:`Truncated_icosidodecahedron`.
+ 
+-    EXAMPLES::
++    EXAMPLES:
++
++    Unfortunately, this graph can not be constructed currently, due to numerical issues::
+ 
+         sage: g = graphs.TruncatedIcosidodecahedralGraph(); g
+-        Truncated Icosidodecahedron: Graph on 120 vertices
+-        sage: g.order(), g.size()
++        Traceback (most recent call last):
++        ...
++        ValueError: *Error: Numerical inconsistency is found.  Use the GMP exact arithmetic.
++        sage: g.order(), g.size() # not tested
+         (120, 180)
+     """
+     from sage.geometry.polyhedron.library import polytopes
++    # note that dropping exact=False here makes the construction take forever
+     G = polytopes.icosidodecahedron(exact=False).truncation().graph()
+     G.name("Truncated Icosidodecahedron")
+     return G
+-- 
+cgit v1.0-1-gd88e
+
+
+From c4048677393f7088d1aa9a2c1392ed95d809d31c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Julian=20R=C3=BCth?= <julian.rueth at fsfe.org>
+Date: Thu, 14 Jun 2018 12:00:27 +0200
+Subject: Relax cddlib sanity checks
+
+sometimes cddlib's output is useful even if it fails to transform back and forth
+---
+ src/sage/categories/finite_coxeter_groups.py |  9 ++---
+ src/sage/geometry/polyhedron/backend_cdd.py  |  6 ++-
+ src/sage/geometry/polyhedron/library.py      | 56 +++++++++++++---------------
+ 3 files changed, 33 insertions(+), 38 deletions(-)
+
+diff --git a/src/sage/categories/finite_coxeter_groups.py b/src/sage/categories/finite_coxeter_groups.py
+index 8395895..78a89fd 100644
+--- a/src/sage/categories/finite_coxeter_groups.py
++++ b/src/sage/categories/finite_coxeter_groups.py
+@@ -712,15 +712,14 @@ class FiniteCoxeterGroups(CategoryWithAxiom):
+                 If function is too slow, switching the base ring to
+                 :class:`RDF` will almost certainly speed things up.
+ 
+-            EXAMPLES:
+-
+-            Unfortunately, an inexact base ring can not always be used::
++            EXAMPLES::
+ 
+                 sage: W = CoxeterGroup(['H',3], base_ring=RDF)
+                 sage: W.permutahedron()
+-                Traceback (most recent call last):
++                doctest:warning
+                 ...
+-                ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
++                UserWarning: This polyhedron data is numerically complicated; cdd could not convert between the inexact V and H representation without loss of data. The resulting object might show inconsistencies.
++                A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 120 vertices
+ 
+                 sage: W = CoxeterGroup(['I',7])
+                 sage: W.permutahedron()
+diff --git a/src/sage/geometry/polyhedron/backend_cdd.py b/src/sage/geometry/polyhedron/backend_cdd.py
+index aaae546..64f3002 100644
+--- a/src/sage/geometry/polyhedron/backend_cdd.py
++++ b/src/sage/geometry/polyhedron/backend_cdd.py
+@@ -82,7 +82,8 @@ class Polyhedron_cdd(Polyhedron_base):
+                     # somewhat random numerical choices. (But I am not an
+                     # expert in that field by any means.) See also
+                     # https://github.com/cddlib/cddlib/pull/7.
+-                    raise ValueError("polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data")
++                    from warnings import warn
++                    warn("This polyhedron data is numerically complicated; cdd could not convert between the inexact V and H representation without loss of data. The resulting object might show inconsistencies.")
+             Polyhedron_cdd._parse_block(t.splitlines(), 'V-representation', parse)
+ 
+     def _init_from_Hrepresentation(self, ieqs, eqns, verbose=False):
+@@ -137,7 +138,8 @@ class Polyhedron_cdd(Polyhedron_base):
+                     # optimized for numerical stability, and makes some
+                     # somewhat random numerical choices. (But I am not an
+                     # expert in that field by any means.)
+-                    raise ValueError("polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data")
++                    from warnings import warn
++                    warn("This polyhedron data is numerically complicated; cdd could not convert between the inexact V and H representation without loss of data. The resulting object might show inconsistencies.")
+             Polyhedron_cdd._parse_block(t.splitlines(), 'H-representation', parse)
+ 
+     def _run_cdd(self, cdd_input_string, cmdline_arg, verbose=False):
+diff --git a/src/sage/geometry/polyhedron/library.py b/src/sage/geometry/polyhedron/library.py
+index 2cdc728..1115978 100644
+--- a/src/sage/geometry/polyhedron/library.py
++++ b/src/sage/geometry/polyhedron/library.py
+@@ -1106,25 +1106,27 @@ class Polytopes():
+             sage: td.base_ring()
+             Number Field in sqrt5 with defining polynomial x^2 - 5
+ 
+-        The faster implementation using floating point approximations does not
+-        work unfortunately, see https://github.com/cddlib/cddlib/pull/7 for a
+-        detailed discussion of this case::
+-
+-            sage: td = polytopes.truncated_dodecahedron(exact=False)
+-            Traceback (most recent call last):
+-            ...
+-            ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
+-            sage: td.f_vector() # not tested
+-            (1, 60, 90, 32, 1)
+-            sage: td.base_ring() # not tested
+-            Real Double Field
+-
+         Its faces are 20 triangles and 12 regular decagons::
+ 
+             sage: sum(1 for f in td.faces(2) if len(f.vertices()) == 3)
+             20
+             sage: sum(1 for f in td.faces(2) if len(f.vertices()) == 10)
+             12
++
++        The faster implementation using floating point approximations does not
++        fully work unfortunately, see https://github.com/cddlib/cddlib/pull/7
++        for a detailed discussion of this case::
++
++            sage: td = polytopes.truncated_dodecahedron(exact=False)
++            doctest:warning
++            ...
++            UserWarning: This polyhedron data is numerically complicated; cdd could not convert between the inexact V and H representation without loss of data. The resulting object might show inconsistencies.
++            sage: td.f_vector()
++            Traceback (most recent call last):
++            ...
++            KeyError: ...
++            sage: td.base_ring()
++            Real Double Field
+         """
+         if base_ring is None and exact:
+             from sage.rings.number_field.number_field import QuadraticField
+@@ -1328,25 +1330,21 @@ class Polytopes():
+             sage: ti.base_ring()               # long time
+             Number Field in sqrt5 with defining polynomial x^2 - 5
+ 
+-        The faster implementation using floating point approximations does not
+-        work unfortunately::
++        The implementation using floating point approximations is much faster::
+ 
+             sage: ti = polytopes.truncated_icosidodecahedron(exact=False)
+-            Traceback (most recent call last):
+-            ...
+-            ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
+-            sage: ti.f_vector() # not tested
++            sage: ti.f_vector()
+             (1, 120, 180, 62, 1)
+-            sage: ti.base_ring() # not tested
++            sage: ti.base_ring()
+             Real Double Field
+ 
+         Its faces are 30 squares, 20 hexagons and 12 decagons::
+ 
+-            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 4) # long time
++            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 4)
+             30
+-            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 6) # long time
++            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 6)
+             20
+-            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 10) # long time
++            sage: sum(1 for f in ti.faces(2) if len(f.vertices()) == 10)
+             12
+         """
+         if base_ring is None and exact:
+@@ -1564,18 +1562,14 @@ class Polytopes():
+             sage: gap                                # not tested - very long time
+             A 4-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5)^4 defined as the convex hull of 100 vertices
+ 
+-        Computation with approximated coordinates would be much faster but is
+-        not supported currently::
++        Computation with approximated coordinates is much faster::
+ 
+             sage: gap = polytopes.grand_antiprism(exact=False)
+-            Traceback (most recent call last):
+-            ...
+-            ValueError: polyhedron data is numerically complicated; cdd could not convert between inexact V and H representation without loss of data
+-            sage: gap # not tested
++            sage: gap
+             A 4-dimensional polyhedron in RDF^4 defined as the convex hull of 100 vertices
+-            sage: gap.f_vector() # not tested
++            sage: gap.f_vector()
+             (1, 100, 500, 720, 320, 1)
+-            sage: len(list(gap.bounded_edges())) # not tested
++            sage: len(list(gap.bounded_edges()))
+             500
+         """
+         from itertools import product
+-- 
+cgit v1.0-1-gd88e

Deleted: sagemath-detect-igraph.patch
===================================================================
--- sagemath-detect-igraph.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-detect-igraph.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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
-@@ -8480,10 +8480,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 357920, sagemath/trunk/sagemath-detect-igraph.patch)
===================================================================
--- sagemath-detect-igraph.patch	                        (rev 0)
+++ sagemath-detect-igraph.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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
+@@ -8480,10 +8480,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-eclib-20180710.patch (from rev 357920, sagemath/trunk/sagemath-eclib-20180710.patch)
===================================================================
--- sagemath-eclib-20180710.patch	                        (rev 0)
+++ sagemath-eclib-20180710.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,24 @@
+diff --git a/src/sage/libs/eclib/wrap.cpp b/src/sage/libs/eclib/wrap.cpp
+index 5fd5693b53..d12468faa8 100644
+--- a/src/sage/libs/eclib/wrap.cpp
++++ b/src/sage/libs/eclib/wrap.cpp
+@@ -133,8 +133,8 @@ char* Curvedata_isogeny_class(struct Curvedata* E, int verbose)
+ 
+ 
+ int mw_process(struct Curvedata* curve, struct mw* m,
+-                      const struct bigint* x, const struct bigint* y,
+-                      const struct bigint* z, int sat)
++                      const bigint* x, const bigint* y,
++                      const bigint* z, int sat)
+ {
+   Point P(*curve, *x, *y, *z);
+   if (!P.isvalid())
+@@ -188,7 +188,7 @@ int mw_rank(struct mw* m)
+ }
+ 
+ /* Returns index and unsat long array, which user must deallocate */
+-int mw_saturate(struct mw* m, struct bigint* index, char** unsat,
++int mw_saturate(struct mw* m, bigint* index, char** unsat,
+                        long sat_bd, int odd_primes_only)
+ {
+   vector<long> v;

Deleted: sagemath-env.patch
===================================================================
--- sagemath-env.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-env.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,149 +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"
- 
- 
- # Don't execute the commands more than once for the same version of
-@@ -174,33 +174,9 @@
- export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
- 
- export SAGE_ROOT="$NEW_SAGE_ROOT"
-+export SAGE_LOCAL='/usr'
-+export SAGE_SCRIPTS_DIR='/usr/bin'
- 
--
--# sage-env must know where the Sage's script files are.
--# Note that SAGE_SCRIPTS_DIR is only used here, so it does not need to
--# be exported.
--if [ -z "$SAGE_SCRIPTS_DIR" ]; then
--    if [ -n "$SAGE_LOCAL" ] && [ -f "$SAGE_LOCAL/bin/sage-env-config" ]; then
--        SAGE_SCRIPTS_DIR="$SAGE_LOCAL/bin"
--    elif [ -f "$SAGE_ROOT/src/bin/sage-env-config" ]; then
--        SAGE_SCRIPTS_DIR="$SAGE_ROOT/src/bin"
--    else
--        echo >&2 "Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this"
--        return 1
--    fi
--elif [ ! -f "$SAGE_SCRIPTS_DIR/sage-env-config" ]; then
--    echo >&2 "Error: SAGE_SCRIPTS_DIR is set to a bad value:"
--    echo >&2 "SAGE_SCRIPTS_DIR=$SAGE_SCRIPTS_DIR"
--    echo >&2 "You must correct it or erase it and rerun this script"
--    return 1
--fi
--
--# Set environment variables (like SAGE_LOCAL) depending on ./configure
--. "$SAGE_SCRIPTS_DIR/sage-env-config"
--if [ $? -ne 0 ]; then
--    echo >&2 "Error: failed to source $SAGE_SCRIPTS_DIR/sage-env-config"
--    return 1
--fi
- 
- # The compilers are set in order of priority by
- # 1) environment variables
-@@ -296,8 +296,9 @@
- export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
- export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
- export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
--export SAGE_SRC="$SAGE_ROOT/src"
--export SAGE_DOC_SRC="$SAGE_SRC/doc"
-+export GAP_ROOT_DIR="/usr/lib/gap-4.8"
-+export SAGE_SRC="$SAGE_LOCAL/lib/python2.7/site-packages"
-+export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
- export SAGE_DOC="$SAGE_SHARE/doc/sage"
- 
- if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
-@@ -403,6 +403,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
-@@ -488,7 +488,6 @@
-         fi
-     fi
- fi
--export MAXIMA_PREFIX="$SAGE_LOCAL"
- 
- PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
- 
-@@ -608,9 +608,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
-@@ -117,13 +117,13 @@
- _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
- 
- # 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_ROOT',       '')
-+_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'))
- 
--_add_variable_or_fallback('SAGE_SRC',        opj('$SAGE_ROOT', 'src'))
-+_add_variable_or_fallback('SAGE_SRC',        opj('$SAGE_LOCAL', 'lib', 'python2.7', 'site-packages'))
- 
- try:
-     sitepackages_dirs = site.getsitepackages()
-@@ -163,7 +163,7 @@
- _add_variable_or_fallback('GRAPHS_DATA_DIR',  opj('$SAGE_SHARE','graphs'))
- _add_variable_or_fallback('ELLCURVE_DATA_DIR',opj('$SAGE_SHARE','ellcurves'))
- _add_variable_or_fallback('POLYTOPE_DATA_DIR',opj('$SAGE_SHARE','reflexive_polytopes'))
--_add_variable_or_fallback('GAP_ROOT_DIR',     opj('$SAGE_LOCAL','gap','latest'))
-+_add_variable_or_fallback('GAP_ROOT_DIR',     opj('$SAGE_LOCAL','lib','gap-4.8'))
- _add_variable_or_fallback('THEBE_DIR',        opj('$SAGE_SHARE','thebe'))
- 
- # locate singular shared object

Copied: sagemath/repos/community-x86_64/sagemath-env.patch (from rev 357920, sagemath/trunk/sagemath-env.patch)
===================================================================
--- sagemath-env.patch	                        (rev 0)
+++ sagemath-env.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,149 @@
+--- 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"
+ 
+ 
+ # Don't execute the commands more than once for the same version of
+@@ -174,33 +174,9 @@
+ export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
+ 
+ export SAGE_ROOT="$NEW_SAGE_ROOT"
++export SAGE_LOCAL='/usr'
++export SAGE_SCRIPTS_DIR='/usr/bin'
+ 
+-
+-# sage-env must know where the Sage's script files are.
+-# Note that SAGE_SCRIPTS_DIR is only used here, so it does not need to
+-# be exported.
+-if [ -z "$SAGE_SCRIPTS_DIR" ]; then
+-    if [ -n "$SAGE_LOCAL" ] && [ -f "$SAGE_LOCAL/bin/sage-env-config" ]; then
+-        SAGE_SCRIPTS_DIR="$SAGE_LOCAL/bin"
+-    elif [ -f "$SAGE_ROOT/src/bin/sage-env-config" ]; then
+-        SAGE_SCRIPTS_DIR="$SAGE_ROOT/src/bin"
+-    else
+-        echo >&2 "Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this"
+-        return 1
+-    fi
+-elif [ ! -f "$SAGE_SCRIPTS_DIR/sage-env-config" ]; then
+-    echo >&2 "Error: SAGE_SCRIPTS_DIR is set to a bad value:"
+-    echo >&2 "SAGE_SCRIPTS_DIR=$SAGE_SCRIPTS_DIR"
+-    echo >&2 "You must correct it or erase it and rerun this script"
+-    return 1
+-fi
+-
+-# Set environment variables (like SAGE_LOCAL) depending on ./configure
+-. "$SAGE_SCRIPTS_DIR/sage-env-config"
+-if [ $? -ne 0 ]; then
+-    echo >&2 "Error: failed to source $SAGE_SCRIPTS_DIR/sage-env-config"
+-    return 1
+-fi
+ 
+ # The compilers are set in order of priority by
+ # 1) environment variables
+@@ -296,8 +296,9 @@
+ export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
+ export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
+ export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
+-export SAGE_SRC="$SAGE_ROOT/src"
+-export SAGE_DOC_SRC="$SAGE_SRC/doc"
++export GAP_ROOT_DIR="/usr/lib/gap-4.8"
++export SAGE_SRC="$SAGE_LOCAL/lib/python2.7/site-packages"
++export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
+ export SAGE_DOC="$SAGE_SHARE/doc/sage"
+ 
+ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
+@@ -403,6 +403,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
+@@ -488,7 +488,6 @@
+         fi
+     fi
+ fi
+-export MAXIMA_PREFIX="$SAGE_LOCAL"
+ 
+ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
+ 
+@@ -608,9 +608,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
+@@ -117,13 +117,13 @@
+ _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
+ 
+ # 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_ROOT',       '')
++_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'))
+ 
+-_add_variable_or_fallback('SAGE_SRC',        opj('$SAGE_ROOT', 'src'))
++_add_variable_or_fallback('SAGE_SRC',        opj('$SAGE_LOCAL', 'lib', 'python2.7', 'site-packages'))
+ 
+ try:
+     sitepackages_dirs = site.getsitepackages()
+@@ -163,7 +163,7 @@
+ _add_variable_or_fallback('GRAPHS_DATA_DIR',  opj('$SAGE_SHARE','graphs'))
+ _add_variable_or_fallback('ELLCURVE_DATA_DIR',opj('$SAGE_SHARE','ellcurves'))
+ _add_variable_or_fallback('POLYTOPE_DATA_DIR',opj('$SAGE_SHARE','reflexive_polytopes'))
+-_add_variable_or_fallback('GAP_ROOT_DIR',     opj('$SAGE_LOCAL','gap','latest'))
++_add_variable_or_fallback('GAP_ROOT_DIR',     opj('$SAGE_LOCAL','lib','gap-4.8'))
+ _add_variable_or_fallback('THEBE_DIR',        opj('$SAGE_SHARE','thebe'))
+ 
+ # locate singular shared object

Deleted: sagemath-gap-4.8.patch
===================================================================
--- sagemath-gap-4.8.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-gap-4.8.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,31 +0,0 @@
-diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py
-index 177fc1b6eb..51c67bdd09 100644
---- a/src/sage/interfaces/gap.py
-+++ b/src/sage/interfaces/gap.py
-@@ -197,11 +197,11 @@ import string
- 
- WORKSPACE = gap_workspace_file()
- 
--GAP_BINARY = os.path.join(SAGE_LOCAL, 'bin', 'gap')
-+GAP_BINARY = os.path.join(SAGE_LOCAL, 'bin', 'gap-4.8')
- 
- first_try = True
- 
--gap_cmd = "gap -r"
-+gap_cmd = "gap-4.8 -r"
- if platform.processor() == 'ia64' and os.path.exists('/usr/bin/prctl'):
-     # suppress unaligned access to 0x..., ip=0x... warnings
-     gap_cmd = 'prctl --unaligned=silent ' + gap_cmd
-diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
-index 7bffcfc00d..51dad178d5 100644
---- a/src/sage/libs/gap/util.pyx
-+++ b/src/sage/libs/gap/util.pyx
-@@ -166,7 +166,7 @@ def gap_root():
-     if os.path.exists(GAP_ROOT_DIR):
-         return GAP_ROOT_DIR
-     print('The gap-4.5.5.spkg (or later) seems to be not installed!')
--    gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap')).read().splitlines()
-+    gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap-4.8')).read().splitlines()
-     gapdir = filter(lambda dir:dir.strip().startswith('GAP_DIR'), gap_sh)[0]
-     gapdir = gapdir.split('"')[1]
-     gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL)

Copied: sagemath/repos/community-x86_64/sagemath-gap-4.8.patch (from rev 357920, sagemath/trunk/sagemath-gap-4.8.patch)
===================================================================
--- sagemath-gap-4.8.patch	                        (rev 0)
+++ sagemath-gap-4.8.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,31 @@
+diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py
+index 177fc1b6eb..51c67bdd09 100644
+--- a/src/sage/interfaces/gap.py
++++ b/src/sage/interfaces/gap.py
+@@ -197,11 +197,11 @@ import string
+ 
+ WORKSPACE = gap_workspace_file()
+ 
+-GAP_BINARY = os.path.join(SAGE_LOCAL, 'bin', 'gap')
++GAP_BINARY = os.path.join(SAGE_LOCAL, 'bin', 'gap-4.8')
+ 
+ first_try = True
+ 
+-gap_cmd = "gap -r"
++gap_cmd = "gap-4.8 -r"
+ if platform.processor() == 'ia64' and os.path.exists('/usr/bin/prctl'):
+     # suppress unaligned access to 0x..., ip=0x... warnings
+     gap_cmd = 'prctl --unaligned=silent ' + gap_cmd
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 7bffcfc00d..51dad178d5 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -166,7 +166,7 @@ def gap_root():
+     if os.path.exists(GAP_ROOT_DIR):
+         return GAP_ROOT_DIR
+     print('The gap-4.5.5.spkg (or later) seems to be not installed!')
+-    gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap')).read().splitlines()
++    gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap-4.8')).read().splitlines()
+     gapdir = filter(lambda dir:dir.strip().startswith('GAP_DIR'), gap_sh)[0]
+     gapdir = gapdir.split('"')[1]
+     gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL)

Deleted: sagemath-ignore-warnings.patch
===================================================================
--- sagemath-ignore-warnings.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-ignore-warnings.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,25 +0,0 @@
-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
-@@ -40,6 +40,8 @@
- 
- float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)')
- optional_regex = re.compile(r'(py2|py3|long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))')
-+pari_stack_warning_regex = re.compile(r'\s*\*\*\*.*(Warning: increasing stack size to )\d+\.')
-+glpk_simplex_warning_regex = re.compile(r'(Long-step dual simplex will be used)')
- find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M)
- find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M)
- random_marker = re.compile('.*random', re.I)
-@@ -935,6 +936,8 @@
-             <type 'float'>
-         """
-         got = self.human_readable_escape_sequences(got)
-+        got = pari_stack_warning_regex.sub('', got)
-+        got = glpk_simplex_warning_regex.sub('', got)
-         if isinstance(want, MarkedOutput):
-             if want.random:
-                 return True

Copied: sagemath/repos/community-x86_64/sagemath-ignore-warnings.patch (from rev 357920, sagemath/trunk/sagemath-ignore-warnings.patch)
===================================================================
--- sagemath-ignore-warnings.patch	                        (rev 0)
+++ sagemath-ignore-warnings.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,25 @@
+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
+@@ -40,6 +40,8 @@
+ 
+ float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)')
+ optional_regex = re.compile(r'(py2|py3|long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))')
++pari_stack_warning_regex = re.compile(r'\s*\*\*\*.*(Warning: increasing stack size to )\d+\.')
++glpk_simplex_warning_regex = re.compile(r'(Long-step dual simplex will be used)')
+ find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M)
+ find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M)
+ random_marker = re.compile('.*random', re.I)
+@@ -935,6 +936,8 @@
+             <type 'float'>
+         """
+         got = self.human_readable_escape_sequences(got)
++        got = pari_stack_warning_regex.sub('', got)
++        got = glpk_simplex_warning_regex.sub('', got)
+         if isinstance(want, MarkedOutput):
+             if want.random:
+                 return True

Deleted: sagemath-lcalc-c++11.patch
===================================================================
--- sagemath-lcalc-c++11.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-lcalc-c++11.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,10 +0,0 @@
---- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd
-+++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
-@@ -1,6 +1,5 @@
- # Lcalc requires GNU extensions, it does not strictly conform to any
- # C++ standard: https://trac.sagemath.org/ticket/23341
--# distutils: extra_compile_args = -std=gnu++98
- 
- cdef extern from "lcalc_sage.h":
-     ctypedef struct doublevec "std::vector<double>":
-

Copied: sagemath/repos/community-x86_64/sagemath-lcalc-c++11.patch (from rev 357920, sagemath/trunk/sagemath-lcalc-c++11.patch)
===================================================================
--- sagemath-lcalc-c++11.patch	                        (rev 0)
+++ sagemath-lcalc-c++11.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,10 @@
+--- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd
++++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
+@@ -1,6 +1,5 @@
+ # Lcalc requires GNU extensions, it does not strictly conform to any
+ # C++ standard: https://trac.sagemath.org/ticket/23341
+-# distutils: extra_compile_args = -std=gnu++98
+ 
+ cdef extern from "lcalc_sage.h":
+     ctypedef struct doublevec "std::vector<double>":
+

Deleted: sagemath-lrs.patch
===================================================================
--- sagemath-lrs.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-lrs.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,22 +0,0 @@
-diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py
-index 2115de6800..da94aa5d45 100644
---- a/src/sage/game_theory/normal_form_game.py
-+++ b/src/sage/game_theory/normal_form_game.py
-@@ -621,6 +621,7 @@ from sage.matrix.constructor import vector
- from sage.misc.package import is_package_installed, PackageNotFoundError
- from sage.misc.temporary_file import tmp_filename
- from sage.numerical.mip import MixedIntegerLinearProgram
-+import os
- 
- try:
-     from gambit import Game
-@@ -1636,7 +1637,7 @@ class NormalFormGame(SageObject, MutableMapping):
-         if not algorithm:
-             if self.is_constant_sum():
-                 algorithm = "lp"
--            elif is_package_installed('lrslib'):
-+            elif os.path.exists('/usr/bin/lrsnash'):
-                 algorithm = "lrs"
-             else:
-                 algorithm = "enumeration"
-

Copied: sagemath/repos/community-x86_64/sagemath-lrs.patch (from rev 357920, sagemath/trunk/sagemath-lrs.patch)
===================================================================
--- sagemath-lrs.patch	                        (rev 0)
+++ sagemath-lrs.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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"
+

Deleted: sagemath-networkx2.patch
===================================================================
--- sagemath-networkx2.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-networkx2.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,175 +0,0 @@
-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
-@@ -1154,7 +1152,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
-@@ -1223,7 +1221,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))
-@@ -1412,7 +1410,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 "+
-@@ -2846,7 +2846,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 ::
- 
-@@ -2872,9 +2872,7 @@ class DiGraph(GenericGraph):
-               sage: D = DiGraph({ 0:[1,2,3], 4:[2,5], 1:[8], 2:[7], 3:[7],
-               ....:   5:[6,7], 7:[8], 6:[9], 8:[10], 9:[10] })
-               sage: N = D.networkx_graph()
--              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:
-@@ -2897,10 +2895,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/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
-@@ -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. "+
-@@ -4621,7 +4621,7 @@ class Graph(GenericGraph):
- 
-             sage: g = Graph([(0,1,0), (1,2,999), (2,3,-5)])
-             sage: g.matching(use_edge_labels=True)
--            [(1, 2, 999)]
-+            [(0, 1, 0), (2, 3, -5)]
-             sage: g.matching(algorithm="LP", use_edge_labels=True)
-             [(1, 2, 999)]
- 
-@@ -4671,7 +4671,7 @@ class Graph(GenericGraph):
-             else:
-                 for u, v in L:
-                     g.add_edge(u, v)
--            d = networkx.max_weight_matching(g)
-+            d = dict(networkx.max_weight_matching(g).union(t[::-1] for t in networkx.max_weight_matching(g)))
-             if value_only:
-                 if use_edge_labels:
-                     return sum(W[u, v] for u, v in six.iteritems(d) if u < v)
-@@ -6305,7 +6305,7 @@ class Graph(GenericGraph):
-         return networkx.number_of_cliques(self.networkx_graph(copy=False), vertices, cliques)
- 
-     @doc_index("Clique-related methods")
--    def cliques_get_max_clique_graph(self, name=''):
-+    def cliques_get_max_clique_graph(self):
-         """
-         Return the clique graph.
- 
-@@ -6336,7 +6336,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):
-

Copied: sagemath/repos/community-x86_64/sagemath-networkx2.patch (from rev 357920, sagemath/trunk/sagemath-networkx2.patch)
===================================================================
--- sagemath-networkx2.patch	                        (rev 0)
+++ sagemath-networkx2.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,175 @@
+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
+@@ -1154,7 +1152,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
+@@ -1223,7 +1221,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))
+@@ -1412,7 +1410,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 "+
+@@ -2846,7 +2846,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 ::
+ 
+@@ -2872,9 +2872,7 @@ class DiGraph(GenericGraph):
+               sage: D = DiGraph({ 0:[1,2,3], 4:[2,5], 1:[8], 2:[7], 3:[7],
+               ....:   5:[6,7], 7:[8], 6:[9], 8:[10], 9:[10] })
+               sage: N = D.networkx_graph()
+-              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:
+@@ -2897,10 +2895,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/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
+@@ -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. "+
+@@ -4621,7 +4621,7 @@ class Graph(GenericGraph):
+ 
+             sage: g = Graph([(0,1,0), (1,2,999), (2,3,-5)])
+             sage: g.matching(use_edge_labels=True)
+-            [(1, 2, 999)]
++            [(0, 1, 0), (2, 3, -5)]
+             sage: g.matching(algorithm="LP", use_edge_labels=True)
+             [(1, 2, 999)]
+ 
+@@ -4671,7 +4671,7 @@ class Graph(GenericGraph):
+             else:
+                 for u, v in L:
+                     g.add_edge(u, v)
+-            d = networkx.max_weight_matching(g)
++            d = dict(networkx.max_weight_matching(g).union(t[::-1] for t in networkx.max_weight_matching(g)))
+             if value_only:
+                 if use_edge_labels:
+                     return sum(W[u, v] for u, v in six.iteritems(d) if u < v)
+@@ -6305,7 +6305,7 @@ class Graph(GenericGraph):
+         return networkx.number_of_cliques(self.networkx_graph(copy=False), vertices, cliques)
+ 
+     @doc_index("Clique-related methods")
+-    def cliques_get_max_clique_graph(self, name=''):
++    def cliques_get_max_clique_graph(self):
+         """
+         Return the clique graph.
+ 
+@@ -6336,7 +6336,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-python3-notebook.patch
===================================================================
--- sagemath-python3-notebook.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-python3-notebook.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 357920, sagemath/trunk/sagemath-python3-notebook.patch)
===================================================================
--- sagemath-python3-notebook.patch	                        (rev 0)
+++ sagemath-python3-notebook.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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:
+

Deleted: sagemath-scipy-1.0.patch
===================================================================
--- sagemath-scipy-1.0.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-scipy-1.0.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,16 +0,0 @@
-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)
- 
- 

Copied: sagemath/repos/community-x86_64/sagemath-scipy-1.0.patch (from rev 357920, sagemath/trunk/sagemath-scipy-1.0.patch)
===================================================================
--- sagemath-scipy-1.0.patch	                        (rev 0)
+++ sagemath-scipy-1.0.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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-singular-4.1.1.patch
===================================================================
--- sagemath-singular-4.1.1.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-singular-4.1.1.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,108 +0,0 @@
-diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd
-index 676544ab1e..5c8639d362 100644
---- a/src/sage/libs/singular/decl.pxd
-+++ b/src/sage/libs/singular/decl.pxd
-@@ -170,7 +170,7 @@ cdef extern from "singular/Singular/libsingular.h":
- 
-     int n_NumberOfParameters(const n_Procs_s* r)
- 
--    ctypedef struct poly "polyrec":
-+    ctypedef struct poly "spolyrec":
-         poly *next
-         number *coef
-         unsigned long exp[1]
-@@ -632,7 +632,7 @@ cdef extern from "singular/Singular/libsingular.h":
- 
-     # divide monomial p by monomial q, p,q const
- 
--    poly *pDivide(poly *p,poly *q)
-+    poly *pMDivide(poly *p,poly *q)
- 
-     # return the i-th power of p; p destroyed, requires global ring
- 
-diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-index 089524d6b4..ce6d58fc6f 100644
---- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-+++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-@@ -190,8 +190,8 @@ from sage.libs.singular.decl cimport (
-     n_IsUnit, n_Invers,
-     p_ISet, rChangeCurrRing, p_Copy, p_Init, p_SetCoeff, p_Setm, p_SetExp, p_Add_q,
-     p_NSet, p_GetCoeff, p_Delete, p_GetExp, pNext, rRingVar, omAlloc0, omStrDup,
--    omFree, pDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy,
--    pDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy,
-+    omFree, pMDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy,
-+    pMDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy,
-     p_IsUnit, p_Series, p_Head, idInit, fast_map_common_subexp, id_Delete,
-     p_IsHomogeneous, p_Homogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize,
-     idLift, IDELEMS, On, Off, SW_USE_CHINREM_GCD, SW_USE_EZGCD,
-@@ -1692,8 +1697,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic):
-         if not g._poly:
-             raise ZeroDivisionError
- 
--        if r!=currRing: rChangeCurrRing(r)  # pDivide
--        res = pDivide(f._poly, g._poly)
-+        if r!=currRing: rChangeCurrRing(r)  # pMDivide
-+        res = pMDivide(f._poly, g._poly)
-         if coeff:
-             if r.cf.type == n_unknown or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf):
-                 n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf)
-@@ -1852,8 +1857,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic):
-                    and (<MPolynomial_libsingular>g) \
-                    and g.parent() is self \
-                    and p_LmDivisibleBy((<MPolynomial_libsingular>g)._poly, m, r):
--                if r!=currRing: rChangeCurrRing(r)  # pDivide
--                flt = pDivide(f._poly, (<MPolynomial_libsingular>g)._poly)
-+                if r!=currRing: rChangeCurrRing(r)  # pMDivide
-+                flt = pMDivide(f._poly, (<MPolynomial_libsingular>g)._poly)
-                 #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<MPolynomial_libsingular>g)._poly, r), r), r)
-                 p_SetCoeff(flt, n_Init(1, r), r)
-                 return new_MP(self,flt), g
-@@ -4049,10 +4054,10 @@ cdef class MPolynomial_libsingular(MPolynomial):
-             if _right.is_monomial():
-                 p = _self._poly
-                 quo = p_ISet(0,r)
--                if r != currRing: rChangeCurrRing(r)   # pDivide
-+                if r != currRing: rChangeCurrRing(r)   # pMDivide
-                 while p:
-                     if p_DivisibleBy(_right._poly, p, r):
--                        temp = pDivide(p, _right._poly)
-+                        temp = pMDivide(p, _right._poly)
-                         p_SetCoeff0(temp, n_Copy(p_GetCoeff(p, r), r), r)
-                         quo = p_Add_q(quo, temp, r)
-                     p = pNext(p)
-diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx
-index 3b45a38419..c0227fd364 100644
---- a/src/sage/rings/polynomial/plural.pyx
-+++ b/src/sage/rings/polynomial/plural.pyx
-@@ -999,7 +999,7 @@ cdef class NCPolynomialRing_plural(Ring):
-         if not g._poly:
-             raise ZeroDivisionError
- 
--        res = pDivide(f._poly,g._poly)
-+        res = pMDivide(f._poly,g._poly)
-         if coeff:
-             if (r.cf.type == n_unknown) or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf):
-                 n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf)
-@@ -1194,7 +1194,7 @@ cdef class NCPolynomialRing_plural(Ring):
-             if isinstance(g, NCPolynomial_plural) \
-                    and (<NCPolynomial_plural>g) \
-                    and p_LmDivisibleBy((<NCPolynomial_plural>g)._poly, m, r):
--                flt = pDivide(f._poly, (<NCPolynomial_plural>g)._poly)
-+                flt = pMDivide(f._poly, (<NCPolynomial_plural>g)._poly)
-                 #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<NCPolynomial_plural>g)._poly, r), r), r)
-                 p_SetCoeff(flt, n_Init(1, r), r)
-                 return new_NCP(self,flt), g
-diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-index 809ca72c76..9610ce125d 100644
---- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-+++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-@@ -4881,7 +4881,7 @@ cdef class MPolynomial_libsingular(MPolynomial):
-         if right.is_zero():
-             raise ZeroDivisionError
- 
--        if not self._parent._base.is_field() and not is_IntegerRing(self._parent._base):
-+        if not self._parent._base.is_field():
-             py_quo = self//right
-             py_rem = self - right*py_quo
-             return py_quo, py_rem
-

Copied: sagemath/repos/community-x86_64/sagemath-singular-4.1.1.patch (from rev 357920, sagemath/trunk/sagemath-singular-4.1.1.patch)
===================================================================
--- sagemath-singular-4.1.1.patch	                        (rev 0)
+++ sagemath-singular-4.1.1.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,108 @@
+diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd
+index 676544ab1e..5c8639d362 100644
+--- a/src/sage/libs/singular/decl.pxd
++++ b/src/sage/libs/singular/decl.pxd
+@@ -170,7 +170,7 @@ cdef extern from "singular/Singular/libsingular.h":
+ 
+     int n_NumberOfParameters(const n_Procs_s* r)
+ 
+-    ctypedef struct poly "polyrec":
++    ctypedef struct poly "spolyrec":
+         poly *next
+         number *coef
+         unsigned long exp[1]
+@@ -632,7 +632,7 @@ cdef extern from "singular/Singular/libsingular.h":
+ 
+     # divide monomial p by monomial q, p,q const
+ 
+-    poly *pDivide(poly *p,poly *q)
++    poly *pMDivide(poly *p,poly *q)
+ 
+     # return the i-th power of p; p destroyed, requires global ring
+ 
+diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
+index 089524d6b4..ce6d58fc6f 100644
+--- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
++++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
+@@ -190,8 +190,8 @@ from sage.libs.singular.decl cimport (
+     n_IsUnit, n_Invers,
+     p_ISet, rChangeCurrRing, p_Copy, p_Init, p_SetCoeff, p_Setm, p_SetExp, p_Add_q,
+     p_NSet, p_GetCoeff, p_Delete, p_GetExp, pNext, rRingVar, omAlloc0, omStrDup,
+-    omFree, pDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy,
+-    pDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy,
++    omFree, pMDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy,
++    pMDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy,
+     p_IsUnit, p_Series, p_Head, idInit, fast_map_common_subexp, id_Delete,
+     p_IsHomogeneous, p_Homogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize,
+     idLift, IDELEMS, On, Off, SW_USE_CHINREM_GCD, SW_USE_EZGCD,
+@@ -1692,8 +1697,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic):
+         if not g._poly:
+             raise ZeroDivisionError
+ 
+-        if r!=currRing: rChangeCurrRing(r)  # pDivide
+-        res = pDivide(f._poly, g._poly)
++        if r!=currRing: rChangeCurrRing(r)  # pMDivide
++        res = pMDivide(f._poly, g._poly)
+         if coeff:
+             if r.cf.type == n_unknown or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf):
+                 n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf)
+@@ -1852,8 +1857,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_generic):
+                    and (<MPolynomial_libsingular>g) \
+                    and g.parent() is self \
+                    and p_LmDivisibleBy((<MPolynomial_libsingular>g)._poly, m, r):
+-                if r!=currRing: rChangeCurrRing(r)  # pDivide
+-                flt = pDivide(f._poly, (<MPolynomial_libsingular>g)._poly)
++                if r!=currRing: rChangeCurrRing(r)  # pMDivide
++                flt = pMDivide(f._poly, (<MPolynomial_libsingular>g)._poly)
+                 #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<MPolynomial_libsingular>g)._poly, r), r), r)
+                 p_SetCoeff(flt, n_Init(1, r), r)
+                 return new_MP(self,flt), g
+@@ -4049,10 +4054,10 @@ cdef class MPolynomial_libsingular(MPolynomial):
+             if _right.is_monomial():
+                 p = _self._poly
+                 quo = p_ISet(0,r)
+-                if r != currRing: rChangeCurrRing(r)   # pDivide
++                if r != currRing: rChangeCurrRing(r)   # pMDivide
+                 while p:
+                     if p_DivisibleBy(_right._poly, p, r):
+-                        temp = pDivide(p, _right._poly)
++                        temp = pMDivide(p, _right._poly)
+                         p_SetCoeff0(temp, n_Copy(p_GetCoeff(p, r), r), r)
+                         quo = p_Add_q(quo, temp, r)
+                     p = pNext(p)
+diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx
+index 3b45a38419..c0227fd364 100644
+--- a/src/sage/rings/polynomial/plural.pyx
++++ b/src/sage/rings/polynomial/plural.pyx
+@@ -999,7 +999,7 @@ cdef class NCPolynomialRing_plural(Ring):
+         if not g._poly:
+             raise ZeroDivisionError
+ 
+-        res = pDivide(f._poly,g._poly)
++        res = pMDivide(f._poly,g._poly)
+         if coeff:
+             if (r.cf.type == n_unknown) or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf):
+                 n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf)
+@@ -1194,7 +1194,7 @@ cdef class NCPolynomialRing_plural(Ring):
+             if isinstance(g, NCPolynomial_plural) \
+                    and (<NCPolynomial_plural>g) \
+                    and p_LmDivisibleBy((<NCPolynomial_plural>g)._poly, m, r):
+-                flt = pDivide(f._poly, (<NCPolynomial_plural>g)._poly)
++                flt = pMDivide(f._poly, (<NCPolynomial_plural>g)._poly)
+                 #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<NCPolynomial_plural>g)._poly, r), r), r)
+                 p_SetCoeff(flt, n_Init(1, r), r)
+                 return new_NCP(self,flt), g
+diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
+index 809ca72c76..9610ce125d 100644
+--- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
++++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
+@@ -4881,7 +4881,7 @@ cdef class MPolynomial_libsingular(MPolynomial):
+         if right.is_zero():
+             raise ZeroDivisionError
+ 
+-        if not self._parent._base.is_field() and not is_IntegerRing(self._parent._base):
++        if not self._parent._base.is_field():
+             py_quo = self//right
+             py_rem = self - right*py_quo
+             return py_quo, py_rem
+

Deleted: sagemath-threejs.patch
===================================================================
--- sagemath-threejs.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ sagemath-threejs.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 = 'r90'
-             return """
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>

Copied: sagemath/repos/community-x86_64/sagemath-threejs.patch (from rev 357920, sagemath/trunk/sagemath-threejs.patch)
===================================================================
--- sagemath-threejs.patch	                        (rev 0)
+++ sagemath-threejs.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -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 = 'r90'
+             return """
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>

Deleted: test-optional.patch
===================================================================
--- test-optional.patch	2018-07-12 14:25:43 UTC (rev 357920)
+++ test-optional.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -1,27 +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
-@@ -326,24 +326,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))
--
--                options.optional |= auto_optional_tags
-
-         self.options = options
-         self.files = args

Copied: sagemath/repos/community-x86_64/test-optional.patch (from rev 357920, sagemath/trunk/test-optional.patch)
===================================================================
--- test-optional.patch	                        (rev 0)
+++ test-optional.patch	2018-07-12 14:26:44 UTC (rev 357921)
@@ -0,0 +1,27 @@
+--- 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
+@@ -326,24 +326,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))
+-
+-                options.optional |= auto_optional_tags
+
+         self.options = options
+         self.files = args



More information about the arch-commits mailing list