[arch-commits] Commit in sagemath/repos (64 files)

Antonio Rojas arojas at archlinux.org
Tue Oct 3 21:21:12 UTC 2017


    Date: Tuesday, October 3, 2017 @ 21:21:11
  Author: arojas
Revision: 261408

archrelease: copy trunk to community-i686, community-x86_64

Added:
  sagemath/repos/community-i686/PKGBUILD
    (from rev 261407, sagemath/trunk/PKGBUILD)
  sagemath/repos/community-i686/env.patch
    (from rev 261407, sagemath/trunk/env.patch)
  sagemath/repos/community-i686/fes02.patch
    (from rev 261407, sagemath/trunk/fes02.patch)
  sagemath/repos/community-i686/jupyter-path.patch
    (from rev 261407, sagemath/trunk/jupyter-path.patch)
  sagemath/repos/community-i686/latte-count.patch
    (from rev 261407, sagemath/trunk/latte-count.patch)
  sagemath/repos/community-i686/package.patch
    (from rev 261407, sagemath/trunk/package.patch)
  sagemath/repos/community-i686/r-no-readline.patch
    (from rev 261407, sagemath/trunk/r-no-readline.patch)
  sagemath/repos/community-i686/sagemath-cython-0.26.patch
    (from rev 261407, sagemath/trunk/sagemath-cython-0.26.patch)
  sagemath/repos/community-i686/sagemath-detect-igraph.patch
    (from rev 261407, sagemath/trunk/sagemath-detect-igraph.patch)
  sagemath/repos/community-i686/sagemath-ecl-no-sigfpe.patch
    (from rev 261407, sagemath/trunk/sagemath-ecl-no-sigfpe.patch)
  sagemath/repos/community-i686/sagemath-networkx2.patch
    (from rev 261407, sagemath/trunk/sagemath-networkx2.patch)
  sagemath/repos/community-i686/sagemath-pynac-0.7.11.patch
    (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.11.patch)
  sagemath/repos/community-i686/sagemath-pynac-0.7.12.patch
    (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.12.patch)
  sagemath/repos/community-i686/sagemath-python3-notebook.patch
    (from rev 261407, sagemath/trunk/sagemath-python3-notebook.patch)
  sagemath/repos/community-i686/sagemath-threejs.patch
    (from rev 261407, sagemath/trunk/sagemath-threejs.patch)
  sagemath/repos/community-i686/test-optional.patch
    (from rev 261407, sagemath/trunk/test-optional.patch)
  sagemath/repos/community-x86_64/PKGBUILD
    (from rev 261407, sagemath/trunk/PKGBUILD)
  sagemath/repos/community-x86_64/env.patch
    (from rev 261407, sagemath/trunk/env.patch)
  sagemath/repos/community-x86_64/fes02.patch
    (from rev 261407, sagemath/trunk/fes02.patch)
  sagemath/repos/community-x86_64/jupyter-path.patch
    (from rev 261407, sagemath/trunk/jupyter-path.patch)
  sagemath/repos/community-x86_64/latte-count.patch
    (from rev 261407, sagemath/trunk/latte-count.patch)
  sagemath/repos/community-x86_64/package.patch
    (from rev 261407, sagemath/trunk/package.patch)
  sagemath/repos/community-x86_64/r-no-readline.patch
    (from rev 261407, sagemath/trunk/r-no-readline.patch)
  sagemath/repos/community-x86_64/sagemath-cython-0.26.patch
    (from rev 261407, sagemath/trunk/sagemath-cython-0.26.patch)
  sagemath/repos/community-x86_64/sagemath-detect-igraph.patch
    (from rev 261407, sagemath/trunk/sagemath-detect-igraph.patch)
  sagemath/repos/community-x86_64/sagemath-ecl-no-sigfpe.patch
    (from rev 261407, sagemath/trunk/sagemath-ecl-no-sigfpe.patch)
  sagemath/repos/community-x86_64/sagemath-networkx2.patch
    (from rev 261407, sagemath/trunk/sagemath-networkx2.patch)
  sagemath/repos/community-x86_64/sagemath-pynac-0.7.11.patch
    (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.11.patch)
  sagemath/repos/community-x86_64/sagemath-pynac-0.7.12.patch
    (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.12.patch)
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
    (from rev 261407, sagemath/trunk/sagemath-python3-notebook.patch)
  sagemath/repos/community-x86_64/sagemath-threejs.patch
    (from rev 261407, sagemath/trunk/sagemath-threejs.patch)
  sagemath/repos/community-x86_64/test-optional.patch
    (from rev 261407, sagemath/trunk/test-optional.patch)
Deleted:
  sagemath/repos/community-i686/PKGBUILD
  sagemath/repos/community-i686/env.patch
  sagemath/repos/community-i686/fes02.patch
  sagemath/repos/community-i686/jupyter-path.patch
  sagemath/repos/community-i686/latte-count.patch
  sagemath/repos/community-i686/package.patch
  sagemath/repos/community-i686/r-no-readline.patch
  sagemath/repos/community-i686/sagemath-cython-0.26.patch
  sagemath/repos/community-i686/sagemath-detect-igraph.patch
  sagemath/repos/community-i686/sagemath-ecl-no-sigfpe.patch
  sagemath/repos/community-i686/sagemath-networkx2.patch
  sagemath/repos/community-i686/sagemath-pynac-0.7.11.patch
  sagemath/repos/community-i686/sagemath-pynac-0.7.12.patch
  sagemath/repos/community-i686/sagemath-python3-notebook.patch
  sagemath/repos/community-i686/sagemath-threejs.patch
  sagemath/repos/community-i686/test-optional.patch
  sagemath/repos/community-x86_64/PKGBUILD
  sagemath/repos/community-x86_64/env.patch
  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-cython-0.26.patch
  sagemath/repos/community-x86_64/sagemath-detect-igraph.patch
  sagemath/repos/community-x86_64/sagemath-ecl-no-sigfpe.patch
  sagemath/repos/community-x86_64/sagemath-networkx2.patch
  sagemath/repos/community-x86_64/sagemath-pynac-0.7.11.patch
  sagemath/repos/community-x86_64/sagemath-pynac-0.7.12.patch
  sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
  sagemath/repos/community-x86_64/sagemath-threejs.patch
  sagemath/repos/community-x86_64/test-optional.patch

--------------------------------------------------+
 /PKGBUILD                                        |  342 +++++++++
 /env.patch                                       |  186 +++++
 /fes02.patch                                     |  114 +++
 /jupyter-path.patch                              |   44 +
 /latte-count.patch                               |  142 +++
 /package.patch                                   |   76 ++
 /r-no-readline.patch                             |   22 
 /sagemath-cython-0.26.patch                      |   52 +
 /sagemath-detect-igraph.patch                    |   42 +
 /sagemath-ecl-no-sigfpe.patch                    |   24 
 /sagemath-networkx2.patch                        |   52 +
 /sagemath-pynac-0.7.11.patch                     |   42 +
 /sagemath-pynac-0.7.12.patch                     |  780 +++++++++++++++++++++
 /sagemath-python3-notebook.patch                 |   54 +
 /sagemath-threejs.patch                          |   22 
 /test-optional.patch                             |   50 +
 community-i686/PKGBUILD                          |  171 ----
 community-i686/env.patch                         |   93 --
 community-i686/fes02.patch                       |   57 -
 community-i686/jupyter-path.patch                |   22 
 community-i686/latte-count.patch                 |   71 -
 community-i686/package.patch                     |   38 -
 community-i686/r-no-readline.patch               |   11 
 community-i686/sagemath-cython-0.26.patch        |   26 
 community-i686/sagemath-detect-igraph.patch      |   21 
 community-i686/sagemath-ecl-no-sigfpe.patch      |   12 
 community-i686/sagemath-networkx2.patch          |   26 
 community-i686/sagemath-pynac-0.7.11.patch       |   21 
 community-i686/sagemath-pynac-0.7.12.patch       |  390 ----------
 community-i686/sagemath-python3-notebook.patch   |   27 
 community-i686/sagemath-threejs.patch            |   11 
 community-i686/test-optional.patch               |   25 
 community-x86_64/PKGBUILD                        |  171 ----
 community-x86_64/env.patch                       |   93 --
 community-x86_64/fes02.patch                     |   57 -
 community-x86_64/jupyter-path.patch              |   22 
 community-x86_64/latte-count.patch               |   71 -
 community-x86_64/package.patch                   |   38 -
 community-x86_64/r-no-readline.patch             |   11 
 community-x86_64/sagemath-cython-0.26.patch      |   26 
 community-x86_64/sagemath-detect-igraph.patch    |   21 
 community-x86_64/sagemath-ecl-no-sigfpe.patch    |   12 
 community-x86_64/sagemath-networkx2.patch        |   26 
 community-x86_64/sagemath-pynac-0.7.11.patch     |   21 
 community-x86_64/sagemath-pynac-0.7.12.patch     |  390 ----------
 community-x86_64/sagemath-python3-notebook.patch |   27 
 community-x86_64/sagemath-threejs.patch          |   11 
 community-x86_64/test-optional.patch             |   25 
 48 files changed, 2044 insertions(+), 2044 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/PKGBUILD	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,171 +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.0
-pkgrel=7
-pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
-arch=(i686 x86_64)
-url="http://www.sagemath.org"
-license=(GPL)
-depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
-  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
-  eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth
-  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
-optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
-  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
-  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
-  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
-  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
-  'modular_decomposition: modular decomposition of graphs' 'ffmpeg: to export animations to video' 'imagemagick: to show animations'
-  'coxeter3: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-data: for computing Galois groups'
-  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
-  'libhomfly: for computing the homfly polynomial of links' 'libbraiding: for computing in braid groups'
-  'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
-  'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations'
-  'meataxe: faster matrix arithmetic over finite fields'
-  'sirocco: for computing the fundamental group of the complement of a plane curve'
-  'three.js: alternative 3D plots engine' 'tachyon: alternative 3D plots engine')
-makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco
-  mcqd coxeter3 modular_decomposition bliss-graphs tdlib python2-pkgconfig meataxe libfes)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
-        env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch
-        r-no-readline.patch fes02.patch sagemath-ecl-no-sigfpe.patch sagemath-cython-0.26.patch sagemath-threejs.patch
-        sagemath-pynac-0.7.11.patch sagemath-pynac-0.7.12.patch sagemath-detect-igraph.patch sagemath-networkx2.patch)
-sha256sums=('91df3e303add71616e24b38c04789f66d57ada7b1017e5369e850c42d5e8753d'
-            'e0b5b8673300857fde823209a7e90faecf9e754ab812cc5e54297eddc0c79571'
-            '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212'
-            'c6836783251d94c00f0229c1e671de86c58c6c6fb0f6959725317817abc64ca8'
-            '775051aa9076ebf631c8a291af38b6ec4a13c904740dc9da831641d592d8bcd8'
-            '27aa73d427d92aeb2c181a233aa3a574a4158cd7dee33832808f69edaec55ea2'
-            '81d08c6a760f171f3381455b66a6c84789c9f0eefddbe6ca5794075514ad8c3a'
-            'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf'
-            'a39da083c038ada797ffc5bedc9ba47455a3f77057d42f86484ae877ef9172ea'
-            'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
-            '2953ef15d957a2f3304a5584c154bf4777bcb4b461414d3a2178423257539755'
-            '514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830'
-            '3e23ff449a5a3a032684287722455633762636b93ecfc35fb00e875c69eff240'
-            '719bb39c9c2cd1c6e75be0969000ba5ffcd2875bb5190fce6bb6a6feaa76b96f'
-            '90be1d1a90120bd5bd3620769480106ba809dd23e896bc4a3f8931e5340f3cda'
-            'a1a0ab5b794136b518f5f66fe9f1689411fabb3b81560b159eae81f6f69000e3')
-
-prepare(){
-  cd sage-$pkgver
-
-# Arch-specific patches
-# assume all optional packages are installed
-  patch -p0 -i ../package.patch
-# set env variables
-  patch -p0 -i ../env.patch
-# don't list optional packages when running tests
-  patch -p0 -i ../test-optional.patch
-# set jupyter path
-  patch -p0 -i ../jupyter-path.patch
-# fix freezes in R interface with readline 7 (Debian)
-  patch -p1 -i ../r-no-readline.patch
-# use correct latte-count binary name
-  patch -p1 -i ../latte-count.patch
-# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
-  patch -p1 -i ../sagemath-python3-notebook.patch
-# fix Cremona database detection
-  sed -e "s|is_package_installed('database_cremona_ellcurve')|os.path.exists('/usr/share/cremona/cremona.db')|" \
-   -i src/sage/databases/cremona.py
-# fix python-igraph detection
-  patch -p1 -i ../sagemath-detect-igraph.patch
-# adapt to networkx 2 changes
-  patch -p1 -i ../sagemath-networkx2.patch
-# fix three.js plotting backend
-  patch -p1 -i ../sagemath-threejs.patch
-
-# Upstream patches  
-# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
-  patch -p1 -i ../fes02.patch
-# disable SIGFPE for ecl https://trac.sagemath.org/ticket/22191
-  patch -p1 -i ../sagemath-ecl-no-sigfpe.patch
-# disable auto_picke for cython 0.26 https://trac.sagemath.org/ticket/23360
-  patch -p1 -i ../sagemath-cython-0.26.patch
-# fix build with pynac 0.7.11 https://trac.sagemath.org/ticket/23820
-  patch -p1 -i ../sagemath-pynac-0.7.11.patch
-# fix build with pynac 0.7.12 https://trac.sagemath.org/ticket/23950
-  patch -p1 -i ../sagemath-pynac-0.7.12.patch
-
-# use python2
-  sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*
-  sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
-  sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
-  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
-  sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env
-}
-
-
-build() {
-  cd sage-$pkgver
-  autoreconf -vi
-  ./configure --prefix=/usr || true
-
-  cd src
-  export SAGE_LOCAL="/usr"
-  export SAGE_ROOT="$PWD"
-  export SAGE_SRC="$PWD"
-  export CC=gcc
-
-  python2 setup.py build
-}
-
-package_sagemath() {
-  optdepends+=('sagemath-jupyter: Jupyter kernel')
-  conflicts=(sage-mathematics)
-  replaces=(sage-mathematics) 
-  provides=(sage-mathematics)
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD"
-  export SAGE_LOCAL="/usr"
-  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
-
-  python2 setup.py install --root="$pkgdir" --optimize=1
-
-  mkdir -p "$pkgdir"/usr/bin
-  cp bin/sage "$pkgdir"/usr/bin
-  for _i in arch-env banner cachegrind callgrind cleaner coverage coverageall cython env env-config eval grep grepdoc inline-fortran \
-    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2ipynb rst2sws rst2txt run \
-    run-cython runtests startuptime.py sws2rst valgrind version.sh
-  do
-    cp bin/sage-$_i "$pkgdir"/usr/bin
-  done
-  cp bin/math-readline "$pkgdir"/usr/bin
-  
-  mkdir -p "$pkgdir"/usr/share/sage
-  cp -r ext "$pkgdir"/usr/share/sage
-  
-# Create SAGE_SRC, needed for the notebook and help
-  mkdir "$pkgdir"/usr/share/sage/source
-  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc
-
-# Remove sage_setup
-  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
-
-# Split jupyter kernel
-  rm -r "$pkgdir"/usr/share/jupyter
-}
-
-package_sagemath-jupyter() {
-  pkgdesc='Jupyter kernel for SageMath'
-  depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax)
-  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD"
-  export SAGE_LOCAL="/usr"
-  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
-
-  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update()"
-}

Copied: sagemath/repos/community-i686/PKGBUILD (from rev 261407, sagemath/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,171 @@
+# 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.0
+pkgrel=7
+pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
+arch=(i686 x86_64)
+url="http://www.sagemath.org"
+license=(GPL)
+depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
+  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
+  eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth
+  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
+optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
+  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
+  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
+  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
+  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
+  'modular_decomposition: modular decomposition of graphs' 'ffmpeg: to export animations to video' 'imagemagick: to show animations'
+  'coxeter3: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-data: for computing Galois groups'
+  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
+  'libhomfly: for computing the homfly polynomial of links' 'libbraiding: for computing in braid groups'
+  'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
+  'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations'
+  'meataxe: faster matrix arithmetic over finite fields'
+  'sirocco: for computing the fundamental group of the complement of a plane curve'
+  'three.js: alternative 3D plots engine' 'tachyon: alternative 3D plots engine')
+makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco
+  mcqd coxeter3 modular_decomposition bliss-graphs tdlib python2-pkgconfig meataxe libfes)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
+        env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch
+        r-no-readline.patch fes02.patch sagemath-ecl-no-sigfpe.patch sagemath-cython-0.26.patch sagemath-threejs.patch
+        sagemath-pynac-0.7.11.patch sagemath-pynac-0.7.12.patch sagemath-detect-igraph.patch sagemath-networkx2.patch)
+sha256sums=('91df3e303add71616e24b38c04789f66d57ada7b1017e5369e850c42d5e8753d'
+            'e0b5b8673300857fde823209a7e90faecf9e754ab812cc5e54297eddc0c79571'
+            '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212'
+            'c6836783251d94c00f0229c1e671de86c58c6c6fb0f6959725317817abc64ca8'
+            '775051aa9076ebf631c8a291af38b6ec4a13c904740dc9da831641d592d8bcd8'
+            '27aa73d427d92aeb2c181a233aa3a574a4158cd7dee33832808f69edaec55ea2'
+            '81d08c6a760f171f3381455b66a6c84789c9f0eefddbe6ca5794075514ad8c3a'
+            'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf'
+            'a39da083c038ada797ffc5bedc9ba47455a3f77057d42f86484ae877ef9172ea'
+            'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
+            '2953ef15d957a2f3304a5584c154bf4777bcb4b461414d3a2178423257539755'
+            '514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830'
+            '3e23ff449a5a3a032684287722455633762636b93ecfc35fb00e875c69eff240'
+            '719bb39c9c2cd1c6e75be0969000ba5ffcd2875bb5190fce6bb6a6feaa76b96f'
+            '90be1d1a90120bd5bd3620769480106ba809dd23e896bc4a3f8931e5340f3cda'
+            'a1a0ab5b794136b518f5f66fe9f1689411fabb3b81560b159eae81f6f69000e3')
+
+prepare(){
+  cd sage-$pkgver
+
+# Arch-specific patches
+# assume all optional packages are installed
+  patch -p0 -i ../package.patch
+# set env variables
+  patch -p0 -i ../env.patch
+# don't list optional packages when running tests
+  patch -p0 -i ../test-optional.patch
+# set jupyter path
+  patch -p0 -i ../jupyter-path.patch
+# fix freezes in R interface with readline 7 (Debian)
+  patch -p1 -i ../r-no-readline.patch
+# use correct latte-count binary name
+  patch -p1 -i ../latte-count.patch
+# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
+  patch -p1 -i ../sagemath-python3-notebook.patch
+# fix Cremona database detection
+  sed -e "s|is_package_installed('database_cremona_ellcurve')|os.path.exists('/usr/share/cremona/cremona.db')|" \
+   -i src/sage/databases/cremona.py
+# fix python-igraph detection
+  patch -p1 -i ../sagemath-detect-igraph.patch
+# adapt to networkx 2 changes
+  patch -p1 -i ../sagemath-networkx2.patch
+# fix three.js plotting backend
+  patch -p1 -i ../sagemath-threejs.patch
+
+# Upstream patches  
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+  patch -p1 -i ../fes02.patch
+# disable SIGFPE for ecl https://trac.sagemath.org/ticket/22191
+  patch -p1 -i ../sagemath-ecl-no-sigfpe.patch
+# disable auto_picke for cython 0.26 https://trac.sagemath.org/ticket/23360
+  patch -p1 -i ../sagemath-cython-0.26.patch
+# fix build with pynac 0.7.11 https://trac.sagemath.org/ticket/23820
+  patch -p1 -i ../sagemath-pynac-0.7.11.patch
+# fix build with pynac 0.7.12 https://trac.sagemath.org/ticket/23950
+  patch -p1 -i ../sagemath-pynac-0.7.12.patch
+
+# use python2
+  sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*
+  sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+  sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
+  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
+  sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env
+}
+
+
+build() {
+  cd sage-$pkgver
+  autoreconf -vi
+  ./configure --prefix=/usr || true
+
+  cd src
+  export SAGE_LOCAL="/usr"
+  export SAGE_ROOT="$PWD"
+  export SAGE_SRC="$PWD"
+  export CC=gcc
+
+  python2 setup.py build
+}
+
+package_sagemath() {
+  optdepends+=('sagemath-jupyter: Jupyter kernel')
+  conflicts=(sage-mathematics)
+  replaces=(sage-mathematics) 
+  provides=(sage-mathematics)
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD"
+  export SAGE_LOCAL="/usr"
+  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
+
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  mkdir -p "$pkgdir"/usr/bin
+  cp bin/sage "$pkgdir"/usr/bin
+  for _i in arch-env banner cachegrind callgrind cleaner coverage coverageall cython env env-config eval grep grepdoc inline-fortran \
+    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2ipynb rst2sws rst2txt run \
+    run-cython runtests startuptime.py sws2rst valgrind version.sh
+  do
+    cp bin/sage-$_i "$pkgdir"/usr/bin
+  done
+  cp bin/math-readline "$pkgdir"/usr/bin
+  
+  mkdir -p "$pkgdir"/usr/share/sage
+  cp -r ext "$pkgdir"/usr/share/sage
+  
+# Create SAGE_SRC, needed for the notebook and help
+  mkdir "$pkgdir"/usr/share/sage/source
+  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc
+
+# Remove sage_setup
+  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
+
+# Split jupyter kernel
+  rm -r "$pkgdir"/usr/share/jupyter
+}
+
+package_sagemath-jupyter() {
+  pkgdesc='Jupyter kernel for SageMath'
+  depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax)
+  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD"
+  export SAGE_LOCAL="/usr"
+  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
+
+  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update()"
+}

Deleted: community-i686/env.patch
===================================================================
--- community-i686/env.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/env.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,93 +0,0 @@
---- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
-+++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
-@@ -111,41 +111,7 @@
- }
- 
- 
--# New value for SAGE_ROOT: either SAGE_ROOT (if given)
--# or a guessed value based on pwd.
--if [ -n "$SAGE_ROOT" ]; then
--    NEW_SAGE_ROOT="$SAGE_ROOT"
--elif [ -f sage -a -d build ]; then
--    NEW_SAGE_ROOT="."
--elif [ -f ../../sage -a -d ../../build ]; then
--    NEW_SAGE_ROOT="../.."
--else
--    # No idea what SAGE_ROOT should be...
--    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
--    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Make NEW_SAGE_ROOT absolute
--NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
--
--# Sanity check NEW_SAGE_ROOT
--if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
--    :
--else
--    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
--    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
--    echo >&2 "or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
--if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
--    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
--    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
--fi
-+NEW_SAGE_ROOT="/usr"
- 
- # Display the Sage startup banner, used in src/bin/sage
- sage_banner() {
-@@ -151,6 +151,7 @@
- export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
- 
- export SAGE_ROOT="$NEW_SAGE_ROOT"
-+export SAGE_LOCAL='/usr'
- 
- # sage-env must know where the Sage's script files are.
- 
-@@ -233,8 +233,9 @@
- export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
- export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
- export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
--export SAGE_SRC="$SAGE_ROOT/src"
--export SAGE_DOC_SRC="$SAGE_SRC/doc"
-+export GAP_ROOT_DIR="/usr/lib/gap"
-+export SAGE_SRC="$SAGE_SHARE/sage/source"
-+export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
- export SAGE_DOC="$SAGE_SHARE/doc/sage"
- 
- if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
-@@ -374,6 +337,9 @@
-     export SAGE_STARTUP_FILE
- fi
- 
-+export LIBMTX="$DOT_SAGE/meataxe"
-+[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
-+
- if [ -z "$IPYTHONDIR" ]; then
-     # We hardcode a version number in the directory name. The idea is
-     # that we keep using the same version number as long as that is
-@@ -468,7 +400,6 @@
-         fi
-     fi
- fi
--export MAXIMA_PREFIX="$SAGE_LOCAL"
- 
- PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
- 
-@@ -629,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

Copied: sagemath/repos/community-i686/env.patch (from rev 261407, sagemath/trunk/env.patch)
===================================================================
--- community-i686/env.patch	                        (rev 0)
+++ community-i686/env.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,93 @@
+--- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
++++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
+@@ -111,41 +111,7 @@
+ }
+ 
+ 
+-# New value for SAGE_ROOT: either SAGE_ROOT (if given)
+-# or a guessed value based on pwd.
+-if [ -n "$SAGE_ROOT" ]; then
+-    NEW_SAGE_ROOT="$SAGE_ROOT"
+-elif [ -f sage -a -d build ]; then
+-    NEW_SAGE_ROOT="."
+-elif [ -f ../../sage -a -d ../../build ]; then
+-    NEW_SAGE_ROOT="../.."
+-else
+-    # No idea what SAGE_ROOT should be...
+-    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
+-    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Make NEW_SAGE_ROOT absolute
+-NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
+-
+-# Sanity check NEW_SAGE_ROOT
+-if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
+-    :
+-else
+-    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
+-    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
+-    echo >&2 "or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
+-if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
+-    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
+-    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
+-fi
++NEW_SAGE_ROOT="/usr"
+ 
+ # Display the Sage startup banner, used in src/bin/sage
+ sage_banner() {
+@@ -151,6 +151,7 @@
+ export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
+ 
+ export SAGE_ROOT="$NEW_SAGE_ROOT"
++export SAGE_LOCAL='/usr'
+ 
+ # sage-env must know where the Sage's script files are.
+ 
+@@ -233,8 +233,9 @@
+ export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
+ export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
+ export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
+-export SAGE_SRC="$SAGE_ROOT/src"
+-export SAGE_DOC_SRC="$SAGE_SRC/doc"
++export GAP_ROOT_DIR="/usr/lib/gap"
++export SAGE_SRC="$SAGE_SHARE/sage/source"
++export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
+ export SAGE_DOC="$SAGE_SHARE/doc/sage"
+ 
+ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
+@@ -374,6 +337,9 @@
+     export SAGE_STARTUP_FILE
+ fi
+ 
++export LIBMTX="$DOT_SAGE/meataxe"
++[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
++
+ if [ -z "$IPYTHONDIR" ]; then
+     # We hardcode a version number in the directory name. The idea is
+     # that we keep using the same version number as long as that is
+@@ -468,7 +400,6 @@
+         fi
+     fi
+ fi
+-export MAXIMA_PREFIX="$SAGE_LOCAL"
+ 
+ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
+ 
+@@ -629,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

Deleted: community-i686/fes02.patch
===================================================================
--- community-i686/fes02.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/fes02.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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)
- 
- 
- include 'sage/ext/interrupt.pxi'  #sig_on(), sig_off()
-@@ -219,7 +221,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-i686/fes02.patch (from rev 261407, sagemath/trunk/fes02.patch)
===================================================================
--- community-i686/fes02.patch	                        (rev 0)
+++ community-i686/fes02.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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)
+ 
+ 
+ include 'sage/ext/interrupt.pxi'  #sig_on(), sig_off()
+@@ -219,7 +221,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: community-i686/jupyter-path.patch
===================================================================
--- community-i686/jupyter-path.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/jupyter-path.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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_ROOT, 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):
-
-@@ -208,7 +208,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-i686/jupyter-path.patch (from rev 261407, sagemath/trunk/jupyter-path.patch)
===================================================================
--- community-i686/jupyter-path.patch	                        (rev 0)
+++ community-i686/jupyter-path.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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_ROOT, 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):
+
+@@ -208,7 +208,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: community-i686/latte-count.patch
===================================================================
--- community-i686/latte-count.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/latte-count.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
-@@ -228,7 +228,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
-@@ -236,7 +236,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
-@@ -244,7 +244,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
-@@ -252,7 +252,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
-@@ -264,7 +264,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
-@@ -86,7 +86,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: ...
-@@ -106,7 +106,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-i686/latte-count.patch (from rev 261407, sagemath/trunk/latte-count.patch)
===================================================================
--- community-i686/latte-count.patch	                        (rev 0)
+++ community-i686/latte-count.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
+@@ -228,7 +228,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
+@@ -236,7 +236,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
+@@ -244,7 +244,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
+@@ -252,7 +252,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
+@@ -264,7 +264,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
+@@ -86,7 +86,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: ...
+@@ -106,7 +106,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: community-i686/package.patch
===================================================================
--- community-i686/package.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/package.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
-@@ -343,7 +343,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-i686/package.patch (from rev 261407, sagemath/trunk/package.patch)
===================================================================
--- community-i686/package.patch	                        (rev 0)
+++ community-i686/package.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
+@@ -343,7 +343,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: community-i686/r-no-readline.patch
===================================================================
--- community-i686/r-no-readline.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/r-no-readline.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,11 +0,0 @@
---- a/src/sage/interfaces/r.py
-+++ b/src/sage/interfaces/r.py
-@@ -331,7 +331,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-i686/r-no-readline.patch (from rev 261407, sagemath/trunk/r-no-readline.patch)
===================================================================
--- community-i686/r-no-readline.patch	                        (rev 0)
+++ community-i686/r-no-readline.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,11 @@
+--- a/src/sage/interfaces/r.py
++++ b/src/sage/interfaces/r.py
+@@ -331,7 +331,7 @@
+                   prompt = '> ', #default, later comes the change
+ 
+                   # This is the command that starts up your program
+-                  command = "R --vanilla --quiet",
++                  command = "R --no-readline --vanilla --quiet",
+ 
+                   server=server,
+                   server_tmpdir=server_tmpdir,

Deleted: community-i686/sagemath-cython-0.26.patch
===================================================================
--- community-i686/sagemath-cython-0.26.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/sagemath-cython-0.26.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,26 +0,0 @@
-diff --git a/src/setup.py b/src/setup.py
-index 2215379..ddca1eb 100755
---- a/src/setup.py
-+++ b/src/setup.py
-@@ -95,7 +95,12 @@ library_dirs = [os.path.join(SAGE_LOCAL, "lib")]
- 
- # Manually add -fno-strict-aliasing, which is needed to compile Cython
- # and disappears from the default flags if the user has set CFLAGS.
--extra_compile_args = [ "-fno-strict-aliasing" ]
-+#
-+# Add -DCYTHON_CLINE_IN_TRACEBACK=1 which causes the .c line number to
-+# always appear in exception tracebacks (by default, this is a runtime
-+# setting in Cython which causes some overhead every time an exception
-+# is raised).
-+extra_compile_args = ["-fno-strict-aliasing", "-DCYTHON_CLINE_IN_TRACEBACK=1"]
- extra_link_args = [ ]
- 
- DEVEL = False
-@@ -336,6 +341,7 @@ class sage_build_cython(Command):
- 
-         # Cython compiler directives
-         self.cython_directives = dict(
-+            auto_pickle=False,
-             autotestdict=False,
-             cdivision=True,
-             embedsignature=True,

Copied: sagemath/repos/community-i686/sagemath-cython-0.26.patch (from rev 261407, sagemath/trunk/sagemath-cython-0.26.patch)
===================================================================
--- community-i686/sagemath-cython-0.26.patch	                        (rev 0)
+++ community-i686/sagemath-cython-0.26.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,26 @@
+diff --git a/src/setup.py b/src/setup.py
+index 2215379..ddca1eb 100755
+--- a/src/setup.py
++++ b/src/setup.py
+@@ -95,7 +95,12 @@ library_dirs = [os.path.join(SAGE_LOCAL, "lib")]
+ 
+ # Manually add -fno-strict-aliasing, which is needed to compile Cython
+ # and disappears from the default flags if the user has set CFLAGS.
+-extra_compile_args = [ "-fno-strict-aliasing" ]
++#
++# Add -DCYTHON_CLINE_IN_TRACEBACK=1 which causes the .c line number to
++# always appear in exception tracebacks (by default, this is a runtime
++# setting in Cython which causes some overhead every time an exception
++# is raised).
++extra_compile_args = ["-fno-strict-aliasing", "-DCYTHON_CLINE_IN_TRACEBACK=1"]
+ extra_link_args = [ ]
+ 
+ DEVEL = False
+@@ -336,6 +341,7 @@ class sage_build_cython(Command):
+ 
+         # Cython compiler directives
+         self.cython_directives = dict(
++            auto_pickle=False,
+             autotestdict=False,
+             cdivision=True,
+             embedsignature=True,

Deleted: community-i686/sagemath-detect-igraph.patch
===================================================================
--- community-i686/sagemath-detect-igraph.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/sagemath-detect-igraph.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
-@@ -7876,10 +7875,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-i686/sagemath-detect-igraph.patch (from rev 261407, sagemath/trunk/sagemath-detect-igraph.patch)
===================================================================
--- community-i686/sagemath-detect-igraph.patch	                        (rev 0)
+++ community-i686/sagemath-detect-igraph.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
+@@ -7876,10 +7875,12 @@ class GenericGraph(GenericGraph_pyx):
+         if algorithm is None:
+             if vertex_bound:
+                 algorithm = "LP"
+-            elif is_package_installed("python_igraph"):
+-                algorithm = "igraph"
+             else:
+-                algorithm = "FF"
++                algorithm = "igraph"
++                try:
++                    import igraph
++                except ImportError:
++                    algorithm = "FF"
+ 
+         if (algorithm == "FF"):
+             return self._ford_fulkerson(x,y, value_only=value_only, integer=integer, use_edge_labels=use_edge_labels)
+

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

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

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

Copied: sagemath/repos/community-i686/sagemath-networkx2.patch (from rev 261407, sagemath/trunk/sagemath-networkx2.patch)
===================================================================
--- community-i686/sagemath-networkx2.patch	                        (rev 0)
+++ community-i686/sagemath-networkx2.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,26 @@
+diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py
+index 8c29602da6..e7a185d586 100644
+--- a/src/sage/graphs/digraph.py
++++ b/src/sage/graphs/digraph.py
+@@ -751,7 +751,7 @@ class DiGraph(GenericGraph):
+             self.allow_multiple_edges(multiedges,check=False)
+             self.allow_loops(loops,check=False)
+             self.add_vertices(data.nodes())
+-            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
++            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
+         elif format == 'igraph':
+             if not data.is_directed():
+                 raise ValueError("A *directed* igraph graph was expected. To "+
+diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py
+index b63135d8e6..5775042976 100644
+--- a/src/sage/graphs/graph.py
++++ b/src/sage/graphs/graph.py
+@@ -1199,7 +1199,7 @@ class Graph(GenericGraph):
+             self.allow_loops(loops, check=False)
+             self.allow_multiple_edges(multiedges, check=False)
+             self.add_vertices(data.nodes())
+-            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
++            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
+         elif format == 'igraph':
+             if data.is_directed():
+                 raise ValueError("An *undirected* igraph graph was expected. "+

Deleted: community-i686/sagemath-pynac-0.7.11.patch
===================================================================
--- community-i686/sagemath-pynac-0.7.11.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/sagemath-pynac-0.7.11.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,21 +0,0 @@
---- a/src/sage/libs/pynac/pynac.pxd
-+++ b/src/sage/libs/pynac/pynac.pxd
-@@ -302,7 +302,6 @@ cdef extern from "sage/libs/pynac/wrap.h":
-     bint is_a_fderivative "is_a<GiNaC::fderivative>" (GEx e)
-     bint is_a_function "is_a<GiNaC::function>" (GEx e)
-     bint is_exactly_a_function "is_exactly_a<GiNaC::function>" (GEx e)
--    bint is_a_ncmul "is_a<GiNaC::ncmul>" (GEx e)
- 
-     # Arithmetic
-     int ginac_error()
---- a/src/sage/symbolic/expression.pyx
-+++ b/src/sage/symbolic/expression.pyx
-@@ -5536,7 +5536,7 @@ cdef class Expression(CommutativeRingElement):
-         cdef unsigned serial
-         if is_a_add(self._gobj):
-             return add_vararg
--        elif is_a_mul(self._gobj) or is_a_ncmul(self._gobj):
-+        elif is_a_mul(self._gobj):
-             return mul_vararg
-         elif is_a_power(self._gobj):
-             return operator.pow

Copied: sagemath/repos/community-i686/sagemath-pynac-0.7.11.patch (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.11.patch)
===================================================================
--- community-i686/sagemath-pynac-0.7.11.patch	                        (rev 0)
+++ community-i686/sagemath-pynac-0.7.11.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,21 @@
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -302,7 +302,6 @@ cdef extern from "sage/libs/pynac/wrap.h":
+     bint is_a_fderivative "is_a<GiNaC::fderivative>" (GEx e)
+     bint is_a_function "is_a<GiNaC::function>" (GEx e)
+     bint is_exactly_a_function "is_exactly_a<GiNaC::function>" (GEx e)
+-    bint is_a_ncmul "is_a<GiNaC::ncmul>" (GEx e)
+ 
+     # Arithmetic
+     int ginac_error()
+--- a/src/sage/symbolic/expression.pyx
++++ b/src/sage/symbolic/expression.pyx
+@@ -5536,7 +5536,7 @@ cdef class Expression(CommutativeRingElement):
+         cdef unsigned serial
+         if is_a_add(self._gobj):
+             return add_vararg
+-        elif is_a_mul(self._gobj) or is_a_ncmul(self._gobj):
++        elif is_a_mul(self._gobj):
+             return mul_vararg
+         elif is_a_power(self._gobj):
+             return operator.pow

Deleted: community-i686/sagemath-pynac-0.7.12.patch
===================================================================
--- community-i686/sagemath-pynac-0.7.12.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/sagemath-pynac-0.7.12.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,390 +0,0 @@
-diff --git a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
-index 5a150a0..f9ede06 100644
---- a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
-+++ b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
-@@ -716,7 +716,7 @@ die ähnliche Funktion ``canonicalize_radical``::
- Diese Gesetze können auch umgekehrt verwendet werden, wie in diesem Beispiel::
- 
-     sage: (5*log(2) + 5*log(5)).simplify_log()
--    log(100000)
-+    5*log(10)
- 
- Es geben weitere mögliche Vereinfachungen, die wir hier nicht weiter erwähnen.
- 
-diff --git a/src/sage/coding/code_bounds.py b/src/sage/coding/code_bounds.py
-index 7935bbf..64ac455 100644
---- a/src/sage/coding/code_bounds.py
-+++ b/src/sage/coding/code_bounds.py
-@@ -577,8 +577,8 @@ def entropy(x, q=2):
- 
-         sage: codes.bounds.entropy(0, 2)
-         0
--        sage: codes.bounds.entropy(1/5,4)
--        1/5*log(3)/log(4) - 4/5*log(4/5)/log(4) - 1/5*log(1/5)/log(4)
-+        sage: codes.bounds.entropy(1/5,4).factor()
-+        1/10*(log(3) - 4*log(4/5) - log(1/5))/log(2)
-         sage: codes.bounds.entropy(1, 3)
-         log(2)/log(3)
- 
-diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py
-index 15e3dbf..64d898c 100644
---- a/src/sage/functions/log.py
-+++ b/src/sage/functions/log.py
-@@ -121,12 +121,12 @@ class Function_exp(GinacFunction):
-             sage: model_exp = exp(II)**a*(b)
-             sage: sol1_l={b: 5.0, a: 1.1}
-             sage: model_exp.subs(sol1_l)
--            5.00000000000000*(e^II)^1.10000000000000
-+            5.00000000000000*e^(1.10000000000000*II)
- 
-         ::
- 
-             sage: exp(3)^II*exp(x)
--            (e^3)^II*e^x
-+            e^(3*II + x)
-             sage: exp(x)*exp(x)
-             e^(2*x)
-             sage: exp(x)*exp(a)
-@@ -137,7 +137,7 @@ class Function_exp(GinacFunction):
-         Another instance of the same problem (:trac:`7394`)::
- 
-             sage: 2*sqrt(e)
--            2*sqrt(e)
-+            2*e^(1/2)
- 
-         Check that :trac:`19918` is fixed::
- 
-@@ -271,7 +271,7 @@ class Function_log(GinacFunction):
-             sage: RDF(log(1024, 2))
-             10.0
-             sage: log(10, 4)
--            log(10)/log(4)
-+            1/2*log(10)/log(2)
-             sage: RDF(log(10, 4))
-             1.6609640474436813
-             sage: log(10, 2)
-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
-index 5db9871..c877454 100644
---- a/src/sage/functions/orthogonal_polys.py
-+++ b/src/sage/functions/orthogonal_polys.py
-@@ -1666,7 +1666,7 @@ class Func_assoc_legendre_Q(BuiltinFunction):
-         EXAMPLES::
- 
-             sage: gen_legendre_Q(2,1,3)
--            -1/4*sqrt(-2)*(-36*I*pi + 36*log(4) - 36*log(2) - 25)
-+            -1/4*sqrt(-2)*(-36*I*pi + 36*log(2) - 25)
-         """
-         ret = self._eval_special_values_(n, m, x)
-         if ret is not None:
-diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
-index 9e37f08..1d19fdd 100644
---- a/src/sage/libs/pynac/pynac.pxd
-+++ b/src/sage/libs/pynac/pynac.pxd
-@@ -97,6 +97,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
- 
-     cdef cppclass GEx "ex":
-         GEx()
-+        GEx(GNumeric o)
-         GEx(GSymbol m)
-         GEx(GEx m)
-         GEx(long n)
-@@ -127,8 +128,8 @@ cdef extern from "sage/libs/pynac/wrap.h":
-         GEx numer()                   except +
-         GEx denom()                   except +
-         GEx numer_denom()             except +
--        int degree(GEx expr)          except +
--        int ldegree(GEx expr)         except +
-+        GNumeric degree(GEx expr)          except +
-+        GNumeric ldegree(GEx expr)         except +
-         GEx unit(GEx expr)            except +
-         GEx content(GEx expr)         except +
-         GEx primpart(GEx expr)        except +
-@@ -161,6 +162,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
- 
-     # Algorithms
-     GEx g_gcd "gcd"(GEx a, GEx b) except +
-+    bint g_factor "factor"(GEx expr, GEx res) except +
-     GEx g_gosper_term "gosper_term"(GEx the_ex, GEx n) except +
-     GEx g_gosper_sum_definite "gosper_sum_definite"(GEx the_ex,
-             GEx n, GEx a, GEx b, int* p) except +
-diff --git a/src/sage/rings/asymptotic/asymptotic_ring.py b/src/sage/rings/asymptotic/asymptotic_ring.py
-index 0b03a4a..9de56a6 100644
---- a/src/sage/rings/asymptotic/asymptotic_ring.py
-+++ b/src/sage/rings/asymptotic/asymptotic_ring.py
-@@ -2485,7 +2485,7 @@ class AsymptoticExpansion(CommutativeAlgebraElement):
-         ::
- 
-             sage: (x^2 + log(x)).subs(x=4*x+2).truncate(5)
--            16*x^2 + 16*x + log(x) + log(4) + 4 + 1/2*x^(-1) + O(x^(-2))
-+            16*x^2 + 16*x + log(x) + 2*log(2) + 4 + 1/2*x^(-1) + O(x^(-2))
-             sage: _.parent()
-             Asymptotic Ring <(e^x)^QQ * x^ZZ * log(x)^ZZ> over Symbolic Ring
- 
-diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py 
-b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
-index 9a6f67a..de61ed3 100644
---- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
-+++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
-@@ -60,9 +60,15 @@ A univariate smooth point example::
-     sage: decomp = F.asymptotic_decomposition(alpha)
-     sage: decomp
-     (0, []) +
--    (-1/2*(x^2 + 6*x + 9)*r^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
--     - 1/2*(5*x^2 + 24*x + 27)*r/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
--     - 3*(x^2 + 3*x + 3)/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
-+    (-1/2*r^2*(x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 6*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
-+     - 1/2*r*(5*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 24*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 27/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
-+     - 3*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     - 9*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     - 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
-      [(x - 1/2, 1)])
-     sage: F1 = decomp[1]
-     sage: p = {x: 1/2}
-@@ -139,9 +145,9 @@ A multiple point example (Example 6.5 of [RaWi2012]_)::
-     sage: alpha = (var('a'), var('b'))
-     sage: decomp =  F.asymptotic_decomposition(alpha); decomp
-     (0, []) +
--    (-1/9*(2*b^2*x^2 - 5*a*b*x*y + 2*a^2*y^2)*r^2/(x^2*y^2)
--      - 1/9*(6*b*x^2 - 5*(a + b)*x*y + 6*a*y^2)*r/(x^2*y^2)
--      - 1/9*(4*x^2 - 5*x*y + 4*y^2)/(x^2*y^2),
-+    (-1/9*r^2*(2*a^2/x^2 + 2*b^2/y^2 - 5*a*b/(x*y))
-+     - 1/9*r*(6*a/x^2 + 6*b/y^2 - 5*a/(x*y) - 5*b/(x*y))
-+     - 4/9/x^2 - 4/9/y^2 + 5/9/(x*y),
-      [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
-     sage: F1 = decomp[1]
-     sage: F1.asymptotics(p, alpha, 2)
-@@ -1480,9 +1486,9 @@ class FractionWithFactoredDenominator(RingElement):
-             sage: alpha = [var('a')]
-             sage: F.asymptotic_decomposition(alpha)
-             (0, []) +
--            (1/54*(5*a^2*x^2 + 2*a^2*x + 11*a^2)*r^2/x^2
--             - 1/54*(5*a*x^2 - 2*a*x - 33*a)*r/x^2 + 11/27/x^2, [(x - 1, 1)]) +
--            (-5/27, [(x + 2, 1)])
-+            (1/54*(5*a^2 + 2*a^2/x + 11*a^2/x^2)*r^2
-+             - 1/54*(5*a - 2*a/x - 33*a/x^2)*r + 11/27/x^2,
-+            [(x - 1, 1)]) + (-5/27, [(x + 2, 1)])
- 
-         ::
- 
-@@ -1495,7 +1501,7 @@ class FractionWithFactoredDenominator(RingElement):
-             sage: alpha = var('a, b')
-             sage: F.asymptotic_decomposition(alpha)
-             (0, []) +
--            (1/3*(2*b*x - a*y)*r/(x*y) + 1/3*(2*x - y)/(x*y),
-+            (-1/3*r*(a/x - 2*b/y) - 1/3/x + 2/3/y,
-              [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
-         """
-         R = self.denominator_ring
-@@ -1600,7 +1606,7 @@ class FractionWithFactoredDenominator(RingElement):
-             (1, [(x*y + x + y - 1, 2)])
-             sage: alpha = [4, 3]
-             sage: decomp = F.asymptotic_decomposition(alpha); decomp
--            (0, []) + (-3/2*r*(y + 1)/y - 1/2*(y + 1)/y, [(x*y + x + y - 1, 1)])
-+            (0, []) + (-3/2*r*(1/y + 1) - 1/2/y - 1/2, [(x*y + x + y - 1, 1)])
-             sage: F1 = decomp[1]
-             sage: p = {y: 1/3, x: 1/2}
-             sage: asy = F1.asymptotics(p, alpha, 2, verbose=True)
-@@ -1634,7 +1640,7 @@ class FractionWithFactoredDenominator(RingElement):
-             sage: alpha = [3, 3, 2]
-             sage: decomp = F.asymptotic_decomposition(alpha); decomp
-             (0, []) +
--            (16*r*(4*y - 3*z)/(y*z) + 16*(2*y - z)/(y*z),
-+            (-16*r*(3/y - 4/z) - 16/y + 32/z,
-              [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 1)])
-             sage: F1 = decomp[1]
-             sage: p = {x: 1, y: 1, z: 1}
-diff --git a/src/sage/rings/asymptotic/term_monoid.py b/src/sage/rings/asymptotic/term_monoid.py
-index b879639..ded7f02 100644
---- a/src/sage/rings/asymptotic/term_monoid.py
-+++ b/src/sage/rings/asymptotic/term_monoid.py
-@@ -3339,7 +3339,7 @@ class ExactTerm(TermWithCoefficient):
-             sage: T(x^1234).log_term()
-             (1234*log(x),)
-             sage: T(49*x^7).log_term(base=7)
--            (log(49)/log(7), 7/log(7)*log(x))
-+            (2, 7/log(7)*log(x))
- 
-         ::
- 
-@@ -3347,7 +3347,7 @@ class ExactTerm(TermWithCoefficient):
-             sage: T('x * y').log_term()
-             (log(x), log(y))
-             sage: T('4 * x * y').log_term(base=2)
--            (log(4)/log(2), 1/log(2)*log(x), 1/log(2)*log(y))
-+            (2, 1/log(2)*log(x), 1/log(2)*log(y))
- 
-         .. SEEALSO::
- 
-diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx
-index 0b8a3bd..cdc34a2 100644
---- a/src/sage/rings/integer.pyx
-+++ b/src/sage/rings/integer.pyx
-@@ -2532,7 +2532,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
-             sage: Integer(125).log(5,prec=53)
-             3.00000000000000
-             sage: log(Integer(125))
--            log(125)
-+            3*log(5)
- 
-         For extremely large numbers, this works::
- 
-diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
-index 36af3a5..857081b 100644
---- a/src/sage/rings/rational.pyx
-+++ b/src/sage/rings/rational.pyx
-@@ -3075,11 +3075,11 @@ cdef class Rational(sage.structure.element.FieldElement):
-             sage: (124/345).log(5,100)
-             -0.63578895682825611710391773754
-             sage: log(QQ(125))
--            log(125)
-+            3*log(5)
-             sage: log(QQ(125), 5)
-             3
-             sage: log(QQ(125), 3)
--            log(125)/log(3)
-+            3*log(5)/log(3)
-             sage: QQ(8).log(1/2)
-             -3
-             sage: (1/8).log(1/2)
-diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py
-index 8009421..9ec892e 100644
---- a/src/sage/schemes/elliptic_curves/ell_point.py
-+++ b/src/sage/schemes/elliptic_curves/ell_point.py
-@@ -2886,7 +2886,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field):
-             sage: Q.non_archimedean_local_height(K.ideal(1-2*i))
-             0
-             sage: Q.non_archimedean_local_height()
--            1/2*log(16)
-+            2*log(2)
- 
-         An example over the rational numbers::
- 
-diff --git a/src/sage/symbolic/constants_c.pyx b/src/sage/symbolic/constants_c.pyx
-index 8eb61f5..38e8db6 100644
---- a/src/sage/symbolic/constants_c.pyx
-+++ b/src/sage/symbolic/constants_c.pyx
-@@ -145,14 +145,14 @@ cdef class E(Expression):
-             sage: t.operands()
-             [a]
- 
--        As opposed to::
-+        This applies to the unit argument as well::
- 
-             sage: u = SR(1).exp()^a; u
-             e^a
-             sage: u.operator()
--            <built-in function pow>
-+            exp
-             sage: u.operands()
--            [e, a]
-+            [a]
- 
-         It also works with matrices (see :trac:`4735`)::
- 
-diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
-index 94252ea..3e06201 100644
---- a/src/sage/symbolic/expression.pyx
-+++ b/src/sage/symbolic/expression.pyx
-@@ -3247,11 +3247,8 @@ cdef class Expression(CommutativeRingElement):
-             -1
-             sage: b = -x*A; c = b*b; c
-             1/4*x^2*(sqrt(5) + I*sqrt(2*sqrt(5) + 10) - 1)
--
--        Products of non integer powers of exp are not simplified::
--
-             sage: exp(x)^I*exp(z)^(2.5)
--            (e^x)^I*(e^z)^2.50000000000000
-+            e^(I*x + 2.50000000000000*z)
- 
-         ::
- 
-@@ -3925,7 +3922,7 @@ cdef class Expression(CommutativeRingElement):
-             sage: 0^1.0
-             0.000000000000000
-             sage: exp(x)^1.0
--            (e^x)^1.00000000000000
-+            e^(1.00000000000000*x)
-         """
-         cdef Expression base, nexp
- 
-@@ -6311,7 +6308,7 @@ cdef class Expression(CommutativeRingElement):
-             0
-         """
-         cdef Expression ss = self.coerce_in(s)
--        return self._gobj.ldegree(ss._gobj)
-+        return new_Expression_from_GEx(self._parent, GEx(self._gobj.ldegree(ss._gobj)))
- 
-     def degree(self, s):
-         """
-@@ -6337,7 +6334,7 @@ cdef class Expression(CommutativeRingElement):
-             0
-         """
-         cdef Expression ss = self.coerce_in(s)
--        return self._gobj.degree(ss._gobj)
-+        return new_Expression_from_GEx(self._parent, GEx(self._gobj.degree(ss._gobj)))
- 
-     def unit(self, s):
-         """
-@@ -7185,12 +7182,12 @@ cdef class Expression(CommutativeRingElement):
-             sage: f.collect(z)
-             (x^2*y^2 + 4)*z^2 + 4*x*y + 20*y^2 + (x + 21*y)*z
- 
--        Sometimes, we do have to call :meth:`expand()` on the
--        expression first to achieve the desired result::
-+        The terms are collected, whether the expression
-+        is expanded or not::
- 
-             sage: f = (x + y)*(x - z)
-             sage: f.collect(x)
--            x^2 + x*y - x*z - y*z
-+            x^2 + x*(y - z) - y*z
-             sage: f.expand().collect(x)
-             x^2 + x*(y - z) - y*z
- 
-@@ -10433,9 +10430,9 @@ cdef class Expression(CommutativeRingElement):
-         ``x*log(9)`` is contracted only if ``algorithm`` is ``'all'``::
- 
-             sage: (x*log(9)).simplify_log()
--            x*log(9)
-+            2*x*log(3)
-             sage: (x*log(9)).simplify_log('all')
--            log(9^x)
-+            log(3^(2*x))
- 
-         TESTS:
- 
-@@ -10550,7 +10547,7 @@ cdef class Expression(CommutativeRingElement):
-         To expand also log(3/4) use ``algorithm='all'``::
- 
-             sage: (log(3/4*x^pi)).log_expand('all')
--            pi*log(x) - log(4) + log(3)
-+            pi*log(x) + log(3) - 2*log(2)
- 
-         To expand only the power use ``algorithm='powers'``.::
- 
-@@ -10573,7 +10570,7 @@ cdef class Expression(CommutativeRingElement):
-             pi*log(x) + log(3/4)
- 
-             sage: (log(3/4*x^pi)).log_expand('all')
--            pi*log(x) - log(4) + log(3)
-+            pi*log(x) + log(3) - 2*log(2)
- 
-             sage: (log(3/4*x^pi)).log_expand()
-             pi*log(x) + log(3/4)
-diff --git a/src/sage/tests/french_book/calculus_doctest.py b/src/sage/tests/french_book/calculus_doctest.py
-index 0d40cae..ffe5d4b 100644
---- a/src/sage/tests/french_book/calculus_doctest.py
-+++ b/src/sage/tests/french_book/calculus_doctest.py
-@@ -331,7 +331,7 @@ Sage example in ./calculus.tex, line 914::
- Sage example in ./calculus.tex, line 929::
- 
-     sage: v(x) = diff(u(x), x); sol = solve(v(x) == 0, x); sol
--    [x == 100/log(100), x == 0]
-+    [x == 50/log(10), x == 0]
-     sage: floor(sol[0].rhs())
-     21
- 

Copied: sagemath/repos/community-i686/sagemath-pynac-0.7.12.patch (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.12.patch)
===================================================================
--- community-i686/sagemath-pynac-0.7.12.patch	                        (rev 0)
+++ community-i686/sagemath-pynac-0.7.12.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,390 @@
+diff --git a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
+index 5a150a0..f9ede06 100644
+--- a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
++++ b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
+@@ -716,7 +716,7 @@ die ähnliche Funktion ``canonicalize_radical``::
+ Diese Gesetze können auch umgekehrt verwendet werden, wie in diesem Beispiel::
+ 
+     sage: (5*log(2) + 5*log(5)).simplify_log()
+-    log(100000)
++    5*log(10)
+ 
+ Es geben weitere mögliche Vereinfachungen, die wir hier nicht weiter erwähnen.
+ 
+diff --git a/src/sage/coding/code_bounds.py b/src/sage/coding/code_bounds.py
+index 7935bbf..64ac455 100644
+--- a/src/sage/coding/code_bounds.py
++++ b/src/sage/coding/code_bounds.py
+@@ -577,8 +577,8 @@ def entropy(x, q=2):
+ 
+         sage: codes.bounds.entropy(0, 2)
+         0
+-        sage: codes.bounds.entropy(1/5,4)
+-        1/5*log(3)/log(4) - 4/5*log(4/5)/log(4) - 1/5*log(1/5)/log(4)
++        sage: codes.bounds.entropy(1/5,4).factor()
++        1/10*(log(3) - 4*log(4/5) - log(1/5))/log(2)
+         sage: codes.bounds.entropy(1, 3)
+         log(2)/log(3)
+ 
+diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py
+index 15e3dbf..64d898c 100644
+--- a/src/sage/functions/log.py
++++ b/src/sage/functions/log.py
+@@ -121,12 +121,12 @@ class Function_exp(GinacFunction):
+             sage: model_exp = exp(II)**a*(b)
+             sage: sol1_l={b: 5.0, a: 1.1}
+             sage: model_exp.subs(sol1_l)
+-            5.00000000000000*(e^II)^1.10000000000000
++            5.00000000000000*e^(1.10000000000000*II)
+ 
+         ::
+ 
+             sage: exp(3)^II*exp(x)
+-            (e^3)^II*e^x
++            e^(3*II + x)
+             sage: exp(x)*exp(x)
+             e^(2*x)
+             sage: exp(x)*exp(a)
+@@ -137,7 +137,7 @@ class Function_exp(GinacFunction):
+         Another instance of the same problem (:trac:`7394`)::
+ 
+             sage: 2*sqrt(e)
+-            2*sqrt(e)
++            2*e^(1/2)
+ 
+         Check that :trac:`19918` is fixed::
+ 
+@@ -271,7 +271,7 @@ class Function_log(GinacFunction):
+             sage: RDF(log(1024, 2))
+             10.0
+             sage: log(10, 4)
+-            log(10)/log(4)
++            1/2*log(10)/log(2)
+             sage: RDF(log(10, 4))
+             1.6609640474436813
+             sage: log(10, 2)
+diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
+index 5db9871..c877454 100644
+--- a/src/sage/functions/orthogonal_polys.py
++++ b/src/sage/functions/orthogonal_polys.py
+@@ -1666,7 +1666,7 @@ class Func_assoc_legendre_Q(BuiltinFunction):
+         EXAMPLES::
+ 
+             sage: gen_legendre_Q(2,1,3)
+-            -1/4*sqrt(-2)*(-36*I*pi + 36*log(4) - 36*log(2) - 25)
++            -1/4*sqrt(-2)*(-36*I*pi + 36*log(2) - 25)
+         """
+         ret = self._eval_special_values_(n, m, x)
+         if ret is not None:
+diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
+index 9e37f08..1d19fdd 100644
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -97,6 +97,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
+ 
+     cdef cppclass GEx "ex":
+         GEx()
++        GEx(GNumeric o)
+         GEx(GSymbol m)
+         GEx(GEx m)
+         GEx(long n)
+@@ -127,8 +128,8 @@ cdef extern from "sage/libs/pynac/wrap.h":
+         GEx numer()                   except +
+         GEx denom()                   except +
+         GEx numer_denom()             except +
+-        int degree(GEx expr)          except +
+-        int ldegree(GEx expr)         except +
++        GNumeric degree(GEx expr)          except +
++        GNumeric ldegree(GEx expr)         except +
+         GEx unit(GEx expr)            except +
+         GEx content(GEx expr)         except +
+         GEx primpart(GEx expr)        except +
+@@ -161,6 +162,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
+ 
+     # Algorithms
+     GEx g_gcd "gcd"(GEx a, GEx b) except +
++    bint g_factor "factor"(GEx expr, GEx res) except +
+     GEx g_gosper_term "gosper_term"(GEx the_ex, GEx n) except +
+     GEx g_gosper_sum_definite "gosper_sum_definite"(GEx the_ex,
+             GEx n, GEx a, GEx b, int* p) except +
+diff --git a/src/sage/rings/asymptotic/asymptotic_ring.py b/src/sage/rings/asymptotic/asymptotic_ring.py
+index 0b03a4a..9de56a6 100644
+--- a/src/sage/rings/asymptotic/asymptotic_ring.py
++++ b/src/sage/rings/asymptotic/asymptotic_ring.py
+@@ -2485,7 +2485,7 @@ class AsymptoticExpansion(CommutativeAlgebraElement):
+         ::
+ 
+             sage: (x^2 + log(x)).subs(x=4*x+2).truncate(5)
+-            16*x^2 + 16*x + log(x) + log(4) + 4 + 1/2*x^(-1) + O(x^(-2))
++            16*x^2 + 16*x + log(x) + 2*log(2) + 4 + 1/2*x^(-1) + O(x^(-2))
+             sage: _.parent()
+             Asymptotic Ring <(e^x)^QQ * x^ZZ * log(x)^ZZ> over Symbolic Ring
+ 
+diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py 
+b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
+index 9a6f67a..de61ed3 100644
+--- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
++++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
+@@ -60,9 +60,15 @@ A univariate smooth point example::
+     sage: decomp = F.asymptotic_decomposition(alpha)
+     sage: decomp
+     (0, []) +
+-    (-1/2*(x^2 + 6*x + 9)*r^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
+-     - 1/2*(5*x^2 + 24*x + 27)*r/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
+-     - 3*(x^2 + 3*x + 3)/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
++    (-1/2*r^2*(x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 6*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
++     - 1/2*r*(5*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 24*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 27/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
++     - 3*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     - 9*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     - 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
+      [(x - 1/2, 1)])
+     sage: F1 = decomp[1]
+     sage: p = {x: 1/2}
+@@ -139,9 +145,9 @@ A multiple point example (Example 6.5 of [RaWi2012]_)::
+     sage: alpha = (var('a'), var('b'))
+     sage: decomp =  F.asymptotic_decomposition(alpha); decomp
+     (0, []) +
+-    (-1/9*(2*b^2*x^2 - 5*a*b*x*y + 2*a^2*y^2)*r^2/(x^2*y^2)
+-      - 1/9*(6*b*x^2 - 5*(a + b)*x*y + 6*a*y^2)*r/(x^2*y^2)
+-      - 1/9*(4*x^2 - 5*x*y + 4*y^2)/(x^2*y^2),
++    (-1/9*r^2*(2*a^2/x^2 + 2*b^2/y^2 - 5*a*b/(x*y))
++     - 1/9*r*(6*a/x^2 + 6*b/y^2 - 5*a/(x*y) - 5*b/(x*y))
++     - 4/9/x^2 - 4/9/y^2 + 5/9/(x*y),
+      [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
+     sage: F1 = decomp[1]
+     sage: F1.asymptotics(p, alpha, 2)
+@@ -1480,9 +1486,9 @@ class FractionWithFactoredDenominator(RingElement):
+             sage: alpha = [var('a')]
+             sage: F.asymptotic_decomposition(alpha)
+             (0, []) +
+-            (1/54*(5*a^2*x^2 + 2*a^2*x + 11*a^2)*r^2/x^2
+-             - 1/54*(5*a*x^2 - 2*a*x - 33*a)*r/x^2 + 11/27/x^2, [(x - 1, 1)]) +
+-            (-5/27, [(x + 2, 1)])
++            (1/54*(5*a^2 + 2*a^2/x + 11*a^2/x^2)*r^2
++             - 1/54*(5*a - 2*a/x - 33*a/x^2)*r + 11/27/x^2,
++            [(x - 1, 1)]) + (-5/27, [(x + 2, 1)])
+ 
+         ::
+ 
+@@ -1495,7 +1501,7 @@ class FractionWithFactoredDenominator(RingElement):
+             sage: alpha = var('a, b')
+             sage: F.asymptotic_decomposition(alpha)
+             (0, []) +
+-            (1/3*(2*b*x - a*y)*r/(x*y) + 1/3*(2*x - y)/(x*y),
++            (-1/3*r*(a/x - 2*b/y) - 1/3/x + 2/3/y,
+              [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
+         """
+         R = self.denominator_ring
+@@ -1600,7 +1606,7 @@ class FractionWithFactoredDenominator(RingElement):
+             (1, [(x*y + x + y - 1, 2)])
+             sage: alpha = [4, 3]
+             sage: decomp = F.asymptotic_decomposition(alpha); decomp
+-            (0, []) + (-3/2*r*(y + 1)/y - 1/2*(y + 1)/y, [(x*y + x + y - 1, 1)])
++            (0, []) + (-3/2*r*(1/y + 1) - 1/2/y - 1/2, [(x*y + x + y - 1, 1)])
+             sage: F1 = decomp[1]
+             sage: p = {y: 1/3, x: 1/2}
+             sage: asy = F1.asymptotics(p, alpha, 2, verbose=True)
+@@ -1634,7 +1640,7 @@ class FractionWithFactoredDenominator(RingElement):
+             sage: alpha = [3, 3, 2]
+             sage: decomp = F.asymptotic_decomposition(alpha); decomp
+             (0, []) +
+-            (16*r*(4*y - 3*z)/(y*z) + 16*(2*y - z)/(y*z),
++            (-16*r*(3/y - 4/z) - 16/y + 32/z,
+              [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 1)])
+             sage: F1 = decomp[1]
+             sage: p = {x: 1, y: 1, z: 1}
+diff --git a/src/sage/rings/asymptotic/term_monoid.py b/src/sage/rings/asymptotic/term_monoid.py
+index b879639..ded7f02 100644
+--- a/src/sage/rings/asymptotic/term_monoid.py
++++ b/src/sage/rings/asymptotic/term_monoid.py
+@@ -3339,7 +3339,7 @@ class ExactTerm(TermWithCoefficient):
+             sage: T(x^1234).log_term()
+             (1234*log(x),)
+             sage: T(49*x^7).log_term(base=7)
+-            (log(49)/log(7), 7/log(7)*log(x))
++            (2, 7/log(7)*log(x))
+ 
+         ::
+ 
+@@ -3347,7 +3347,7 @@ class ExactTerm(TermWithCoefficient):
+             sage: T('x * y').log_term()
+             (log(x), log(y))
+             sage: T('4 * x * y').log_term(base=2)
+-            (log(4)/log(2), 1/log(2)*log(x), 1/log(2)*log(y))
++            (2, 1/log(2)*log(x), 1/log(2)*log(y))
+ 
+         .. SEEALSO::
+ 
+diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx
+index 0b8a3bd..cdc34a2 100644
+--- a/src/sage/rings/integer.pyx
++++ b/src/sage/rings/integer.pyx
+@@ -2532,7 +2532,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
+             sage: Integer(125).log(5,prec=53)
+             3.00000000000000
+             sage: log(Integer(125))
+-            log(125)
++            3*log(5)
+ 
+         For extremely large numbers, this works::
+ 
+diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
+index 36af3a5..857081b 100644
+--- a/src/sage/rings/rational.pyx
++++ b/src/sage/rings/rational.pyx
+@@ -3075,11 +3075,11 @@ cdef class Rational(sage.structure.element.FieldElement):
+             sage: (124/345).log(5,100)
+             -0.63578895682825611710391773754
+             sage: log(QQ(125))
+-            log(125)
++            3*log(5)
+             sage: log(QQ(125), 5)
+             3
+             sage: log(QQ(125), 3)
+-            log(125)/log(3)
++            3*log(5)/log(3)
+             sage: QQ(8).log(1/2)
+             -3
+             sage: (1/8).log(1/2)
+diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py
+index 8009421..9ec892e 100644
+--- a/src/sage/schemes/elliptic_curves/ell_point.py
++++ b/src/sage/schemes/elliptic_curves/ell_point.py
+@@ -2886,7 +2886,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field):
+             sage: Q.non_archimedean_local_height(K.ideal(1-2*i))
+             0
+             sage: Q.non_archimedean_local_height()
+-            1/2*log(16)
++            2*log(2)
+ 
+         An example over the rational numbers::
+ 
+diff --git a/src/sage/symbolic/constants_c.pyx b/src/sage/symbolic/constants_c.pyx
+index 8eb61f5..38e8db6 100644
+--- a/src/sage/symbolic/constants_c.pyx
++++ b/src/sage/symbolic/constants_c.pyx
+@@ -145,14 +145,14 @@ cdef class E(Expression):
+             sage: t.operands()
+             [a]
+ 
+-        As opposed to::
++        This applies to the unit argument as well::
+ 
+             sage: u = SR(1).exp()^a; u
+             e^a
+             sage: u.operator()
+-            <built-in function pow>
++            exp
+             sage: u.operands()
+-            [e, a]
++            [a]
+ 
+         It also works with matrices (see :trac:`4735`)::
+ 
+diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
+index 94252ea..3e06201 100644
+--- a/src/sage/symbolic/expression.pyx
++++ b/src/sage/symbolic/expression.pyx
+@@ -3247,11 +3247,8 @@ cdef class Expression(CommutativeRingElement):
+             -1
+             sage: b = -x*A; c = b*b; c
+             1/4*x^2*(sqrt(5) + I*sqrt(2*sqrt(5) + 10) - 1)
+-
+-        Products of non integer powers of exp are not simplified::
+-
+             sage: exp(x)^I*exp(z)^(2.5)
+-            (e^x)^I*(e^z)^2.50000000000000
++            e^(I*x + 2.50000000000000*z)
+ 
+         ::
+ 
+@@ -3925,7 +3922,7 @@ cdef class Expression(CommutativeRingElement):
+             sage: 0^1.0
+             0.000000000000000
+             sage: exp(x)^1.0
+-            (e^x)^1.00000000000000
++            e^(1.00000000000000*x)
+         """
+         cdef Expression base, nexp
+ 
+@@ -6311,7 +6308,7 @@ cdef class Expression(CommutativeRingElement):
+             0
+         """
+         cdef Expression ss = self.coerce_in(s)
+-        return self._gobj.ldegree(ss._gobj)
++        return new_Expression_from_GEx(self._parent, GEx(self._gobj.ldegree(ss._gobj)))
+ 
+     def degree(self, s):
+         """
+@@ -6337,7 +6334,7 @@ cdef class Expression(CommutativeRingElement):
+             0
+         """
+         cdef Expression ss = self.coerce_in(s)
+-        return self._gobj.degree(ss._gobj)
++        return new_Expression_from_GEx(self._parent, GEx(self._gobj.degree(ss._gobj)))
+ 
+     def unit(self, s):
+         """
+@@ -7185,12 +7182,12 @@ cdef class Expression(CommutativeRingElement):
+             sage: f.collect(z)
+             (x^2*y^2 + 4)*z^2 + 4*x*y + 20*y^2 + (x + 21*y)*z
+ 
+-        Sometimes, we do have to call :meth:`expand()` on the
+-        expression first to achieve the desired result::
++        The terms are collected, whether the expression
++        is expanded or not::
+ 
+             sage: f = (x + y)*(x - z)
+             sage: f.collect(x)
+-            x^2 + x*y - x*z - y*z
++            x^2 + x*(y - z) - y*z
+             sage: f.expand().collect(x)
+             x^2 + x*(y - z) - y*z
+ 
+@@ -10433,9 +10430,9 @@ cdef class Expression(CommutativeRingElement):
+         ``x*log(9)`` is contracted only if ``algorithm`` is ``'all'``::
+ 
+             sage: (x*log(9)).simplify_log()
+-            x*log(9)
++            2*x*log(3)
+             sage: (x*log(9)).simplify_log('all')
+-            log(9^x)
++            log(3^(2*x))
+ 
+         TESTS:
+ 
+@@ -10550,7 +10547,7 @@ cdef class Expression(CommutativeRingElement):
+         To expand also log(3/4) use ``algorithm='all'``::
+ 
+             sage: (log(3/4*x^pi)).log_expand('all')
+-            pi*log(x) - log(4) + log(3)
++            pi*log(x) + log(3) - 2*log(2)
+ 
+         To expand only the power use ``algorithm='powers'``.::
+ 
+@@ -10573,7 +10570,7 @@ cdef class Expression(CommutativeRingElement):
+             pi*log(x) + log(3/4)
+ 
+             sage: (log(3/4*x^pi)).log_expand('all')
+-            pi*log(x) - log(4) + log(3)
++            pi*log(x) + log(3) - 2*log(2)
+ 
+             sage: (log(3/4*x^pi)).log_expand()
+             pi*log(x) + log(3/4)
+diff --git a/src/sage/tests/french_book/calculus_doctest.py b/src/sage/tests/french_book/calculus_doctest.py
+index 0d40cae..ffe5d4b 100644
+--- a/src/sage/tests/french_book/calculus_doctest.py
++++ b/src/sage/tests/french_book/calculus_doctest.py
+@@ -331,7 +331,7 @@ Sage example in ./calculus.tex, line 914::
+ Sage example in ./calculus.tex, line 929::
+ 
+     sage: v(x) = diff(u(x), x); sol = solve(v(x) == 0, x); sol
+-    [x == 100/log(100), x == 0]
++    [x == 50/log(10), x == 0]
+     sage: floor(sol[0].rhs())
+     21
+ 

Deleted: community-i686/sagemath-python3-notebook.patch
===================================================================
--- community-i686/sagemath-python3-notebook.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/sagemath-python3-notebook.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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 SageNBExport(NotebookJupyter):
-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
-@@ -281,7 +281,6 @@ def have_prerequisites(debug=True):
-         True
-     """
-     try:
--        from notebook.notebookapp import NotebookApp
-         return True
-     except ImportError:
-         if debug:
-

Copied: sagemath/repos/community-i686/sagemath-python3-notebook.patch (from rev 261407, sagemath/trunk/sagemath-python3-notebook.patch)
===================================================================
--- community-i686/sagemath-python3-notebook.patch	                        (rev 0)
+++ community-i686/sagemath-python3-notebook.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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 SageNBExport(NotebookJupyter):
+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
+@@ -281,7 +281,6 @@ def have_prerequisites(debug=True):
+         True
+     """
+     try:
+-        from notebook.notebookapp import NotebookApp
+         return True
+     except ImportError:
+         if debug:
+

Deleted: community-i686/sagemath-threejs.patch
===================================================================
--- community-i686/sagemath-threejs.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/sagemath-threejs.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,11 +0,0 @@
---- a/src/sage/repl/rich_output/display_manager.py
-+++ b/src/sage/repl/rich_output/display_manager.py
-@@ -744,7 +744,7 @@ class DisplayManager(SageObject):
-         """
-         if online:
-             from sage.misc.package import installed_packages
--            version = installed_packages()['threejs']
-+            version = 'r80'
-             return """
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>

Copied: sagemath/repos/community-i686/sagemath-threejs.patch (from rev 261407, sagemath/trunk/sagemath-threejs.patch)
===================================================================
--- community-i686/sagemath-threejs.patch	                        (rev 0)
+++ community-i686/sagemath-threejs.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,11 @@
+--- a/src/sage/repl/rich_output/display_manager.py
++++ b/src/sage/repl/rich_output/display_manager.py
+@@ -744,7 +744,7 @@ class DisplayManager(SageObject):
+         """
+         if online:
+             from sage.misc.package import installed_packages
+-            version = installed_packages()['threejs']
++            version = 'r80'
+             return """
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>

Deleted: community-i686/test-optional.patch
===================================================================
--- community-i686/test-optional.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-i686/test-optional.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,25 +0,0 @@
---- src/sage/doctest/control.py.orig       2016-10-20 19:39:53.714618246 +0200
-+++ src/sage/doctest/control.py    2016-10-20 19:40:15.158049920 +0200
-@@ -307,22 +307,6 @@
-             if "all" in options.optional:
-                 # Special case to run all optional tests
-                 options.optional = True
--            else:
--                # We replace the 'optional' tag by all optional
--                # packages for which the installed version matches the
--                # latest available version (this implies in particular
--                # that the package is actually installed).
--                if 'optional' in options.optional:
--                    options.optional.discard('optional')
--                    from sage.misc.package import list_packages
--                    for pkg in list_packages('optional', local=True).values():
--                        if pkg['installed_version'] == pkg['remote_version']:
--                            options.optional.add(pkg['name'])
--
--                # Check that all tags are valid
--                for o in options.optional:
--                    if not optionaltag_regex.search(o):
--                        raise ValueError('invalid optional tag {!r}'.format(o))
- 
-         self.options = options
-         self.files = args

Copied: sagemath/repos/community-i686/test-optional.patch (from rev 261407, sagemath/trunk/test-optional.patch)
===================================================================
--- community-i686/test-optional.patch	                        (rev 0)
+++ community-i686/test-optional.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,25 @@
+--- src/sage/doctest/control.py.orig       2016-10-20 19:39:53.714618246 +0200
++++ src/sage/doctest/control.py    2016-10-20 19:40:15.158049920 +0200
+@@ -307,22 +307,6 @@
+             if "all" in options.optional:
+                 # Special case to run all optional tests
+                 options.optional = True
+-            else:
+-                # We replace the 'optional' tag by all optional
+-                # packages for which the installed version matches the
+-                # latest available version (this implies in particular
+-                # that the package is actually installed).
+-                if 'optional' in options.optional:
+-                    options.optional.discard('optional')
+-                    from sage.misc.package import list_packages
+-                    for pkg in list_packages('optional', local=True).values():
+-                        if pkg['installed_version'] == pkg['remote_version']:
+-                            options.optional.add(pkg['name'])
+-
+-                # Check that all tags are valid
+-                for o in options.optional:
+-                    if not optionaltag_regex.search(o):
+-                        raise ValueError('invalid optional tag {!r}'.format(o))
+ 
+         self.options = options
+         self.files = args

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/PKGBUILD	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,171 +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.0
-pkgrel=7
-pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
-arch=(i686 x86_64)
-url="http://www.sagemath.org"
-license=(GPL)
-depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
-  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
-  eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth
-  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
-optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
-  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
-  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
-  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
-  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
-  'modular_decomposition: modular decomposition of graphs' 'ffmpeg: to export animations to video' 'imagemagick: to show animations'
-  'coxeter3: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-data: for computing Galois groups'
-  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
-  'libhomfly: for computing the homfly polynomial of links' 'libbraiding: for computing in braid groups'
-  'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
-  'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations'
-  'meataxe: faster matrix arithmetic over finite fields'
-  'sirocco: for computing the fundamental group of the complement of a plane curve'
-  'three.js: alternative 3D plots engine' 'tachyon: alternative 3D plots engine')
-makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco
-  mcqd coxeter3 modular_decomposition bliss-graphs tdlib python2-pkgconfig meataxe libfes)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
-        env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch
-        r-no-readline.patch fes02.patch sagemath-ecl-no-sigfpe.patch sagemath-cython-0.26.patch sagemath-threejs.patch
-        sagemath-pynac-0.7.11.patch sagemath-pynac-0.7.12.patch sagemath-detect-igraph.patch sagemath-networkx2.patch)
-sha256sums=('91df3e303add71616e24b38c04789f66d57ada7b1017e5369e850c42d5e8753d'
-            'e0b5b8673300857fde823209a7e90faecf9e754ab812cc5e54297eddc0c79571'
-            '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212'
-            'c6836783251d94c00f0229c1e671de86c58c6c6fb0f6959725317817abc64ca8'
-            '775051aa9076ebf631c8a291af38b6ec4a13c904740dc9da831641d592d8bcd8'
-            '27aa73d427d92aeb2c181a233aa3a574a4158cd7dee33832808f69edaec55ea2'
-            '81d08c6a760f171f3381455b66a6c84789c9f0eefddbe6ca5794075514ad8c3a'
-            'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf'
-            'a39da083c038ada797ffc5bedc9ba47455a3f77057d42f86484ae877ef9172ea'
-            'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
-            '2953ef15d957a2f3304a5584c154bf4777bcb4b461414d3a2178423257539755'
-            '514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830'
-            '3e23ff449a5a3a032684287722455633762636b93ecfc35fb00e875c69eff240'
-            '719bb39c9c2cd1c6e75be0969000ba5ffcd2875bb5190fce6bb6a6feaa76b96f'
-            '90be1d1a90120bd5bd3620769480106ba809dd23e896bc4a3f8931e5340f3cda'
-            'a1a0ab5b794136b518f5f66fe9f1689411fabb3b81560b159eae81f6f69000e3')
-
-prepare(){
-  cd sage-$pkgver
-
-# Arch-specific patches
-# assume all optional packages are installed
-  patch -p0 -i ../package.patch
-# set env variables
-  patch -p0 -i ../env.patch
-# don't list optional packages when running tests
-  patch -p0 -i ../test-optional.patch
-# set jupyter path
-  patch -p0 -i ../jupyter-path.patch
-# fix freezes in R interface with readline 7 (Debian)
-  patch -p1 -i ../r-no-readline.patch
-# use correct latte-count binary name
-  patch -p1 -i ../latte-count.patch
-# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
-  patch -p1 -i ../sagemath-python3-notebook.patch
-# fix Cremona database detection
-  sed -e "s|is_package_installed('database_cremona_ellcurve')|os.path.exists('/usr/share/cremona/cremona.db')|" \
-   -i src/sage/databases/cremona.py
-# fix python-igraph detection
-  patch -p1 -i ../sagemath-detect-igraph.patch
-# adapt to networkx 2 changes
-  patch -p1 -i ../sagemath-networkx2.patch
-# fix three.js plotting backend
-  patch -p1 -i ../sagemath-threejs.patch
-
-# Upstream patches  
-# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
-  patch -p1 -i ../fes02.patch
-# disable SIGFPE for ecl https://trac.sagemath.org/ticket/22191
-  patch -p1 -i ../sagemath-ecl-no-sigfpe.patch
-# disable auto_picke for cython 0.26 https://trac.sagemath.org/ticket/23360
-  patch -p1 -i ../sagemath-cython-0.26.patch
-# fix build with pynac 0.7.11 https://trac.sagemath.org/ticket/23820
-  patch -p1 -i ../sagemath-pynac-0.7.11.patch
-# fix build with pynac 0.7.12 https://trac.sagemath.org/ticket/23950
-  patch -p1 -i ../sagemath-pynac-0.7.12.patch
-
-# use python2
-  sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*
-  sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
-  sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
-  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
-  sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env
-}
-
-
-build() {
-  cd sage-$pkgver
-  autoreconf -vi
-  ./configure --prefix=/usr || true
-
-  cd src
-  export SAGE_LOCAL="/usr"
-  export SAGE_ROOT="$PWD"
-  export SAGE_SRC="$PWD"
-  export CC=gcc
-
-  python2 setup.py build
-}
-
-package_sagemath() {
-  optdepends+=('sagemath-jupyter: Jupyter kernel')
-  conflicts=(sage-mathematics)
-  replaces=(sage-mathematics) 
-  provides=(sage-mathematics)
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD"
-  export SAGE_LOCAL="/usr"
-  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
-
-  python2 setup.py install --root="$pkgdir" --optimize=1
-
-  mkdir -p "$pkgdir"/usr/bin
-  cp bin/sage "$pkgdir"/usr/bin
-  for _i in arch-env banner cachegrind callgrind cleaner coverage coverageall cython env env-config eval grep grepdoc inline-fortran \
-    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2ipynb rst2sws rst2txt run \
-    run-cython runtests startuptime.py sws2rst valgrind version.sh
-  do
-    cp bin/sage-$_i "$pkgdir"/usr/bin
-  done
-  cp bin/math-readline "$pkgdir"/usr/bin
-  
-  mkdir -p "$pkgdir"/usr/share/sage
-  cp -r ext "$pkgdir"/usr/share/sage
-  
-# Create SAGE_SRC, needed for the notebook and help
-  mkdir "$pkgdir"/usr/share/sage/source
-  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc
-
-# Remove sage_setup
-  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
-
-# Split jupyter kernel
-  rm -r "$pkgdir"/usr/share/jupyter
-}
-
-package_sagemath-jupyter() {
-  pkgdesc='Jupyter kernel for SageMath'
-  depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax)
-  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
-
-  cd sage-$pkgver/src
-
-  export SAGE_ROOT="$PWD"
-  export SAGE_LOCAL="/usr"
-  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
-
-  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update()"
-}

Copied: sagemath/repos/community-x86_64/PKGBUILD (from rev 261407, sagemath/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,171 @@
+# 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.0
+pkgrel=7
+pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
+arch=(i686 x86_64)
+url="http://www.sagemath.org"
+license=(GPL)
+depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
+  python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
+  eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth
+  sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials)
+optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
+  'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
+  'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
+  'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
+  'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
+  'modular_decomposition: modular decomposition of graphs' 'ffmpeg: to export animations to video' 'imagemagick: to show animations'
+  'coxeter3: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-data: for computing Galois groups'
+  'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
+  'libhomfly: for computing the homfly polynomial of links' 'libbraiding: for computing in braid groups'
+  'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
+  'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations'
+  'meataxe: faster matrix arithmetic over finite fields'
+  'sirocco: for computing the fundamental group of the complement of a plane curve'
+  'three.js: alternative 3D plots engine' 'tachyon: alternative 3D plots engine')
+makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding sirocco
+  mcqd coxeter3 modular_decomposition bliss-graphs tdlib python2-pkgconfig meataxe libfes)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
+        env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch
+        r-no-readline.patch fes02.patch sagemath-ecl-no-sigfpe.patch sagemath-cython-0.26.patch sagemath-threejs.patch
+        sagemath-pynac-0.7.11.patch sagemath-pynac-0.7.12.patch sagemath-detect-igraph.patch sagemath-networkx2.patch)
+sha256sums=('91df3e303add71616e24b38c04789f66d57ada7b1017e5369e850c42d5e8753d'
+            'e0b5b8673300857fde823209a7e90faecf9e754ab812cc5e54297eddc0c79571'
+            '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212'
+            'c6836783251d94c00f0229c1e671de86c58c6c6fb0f6959725317817abc64ca8'
+            '775051aa9076ebf631c8a291af38b6ec4a13c904740dc9da831641d592d8bcd8'
+            '27aa73d427d92aeb2c181a233aa3a574a4158cd7dee33832808f69edaec55ea2'
+            '81d08c6a760f171f3381455b66a6c84789c9f0eefddbe6ca5794075514ad8c3a'
+            'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf'
+            'a39da083c038ada797ffc5bedc9ba47455a3f77057d42f86484ae877ef9172ea'
+            'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
+            '2953ef15d957a2f3304a5584c154bf4777bcb4b461414d3a2178423257539755'
+            '514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830'
+            '3e23ff449a5a3a032684287722455633762636b93ecfc35fb00e875c69eff240'
+            '719bb39c9c2cd1c6e75be0969000ba5ffcd2875bb5190fce6bb6a6feaa76b96f'
+            '90be1d1a90120bd5bd3620769480106ba809dd23e896bc4a3f8931e5340f3cda'
+            'a1a0ab5b794136b518f5f66fe9f1689411fabb3b81560b159eae81f6f69000e3')
+
+prepare(){
+  cd sage-$pkgver
+
+# Arch-specific patches
+# assume all optional packages are installed
+  patch -p0 -i ../package.patch
+# set env variables
+  patch -p0 -i ../env.patch
+# don't list optional packages when running tests
+  patch -p0 -i ../test-optional.patch
+# set jupyter path
+  patch -p0 -i ../jupyter-path.patch
+# fix freezes in R interface with readline 7 (Debian)
+  patch -p1 -i ../r-no-readline.patch
+# use correct latte-count binary name
+  patch -p1 -i ../latte-count.patch
+# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
+  patch -p1 -i ../sagemath-python3-notebook.patch
+# fix Cremona database detection
+  sed -e "s|is_package_installed('database_cremona_ellcurve')|os.path.exists('/usr/share/cremona/cremona.db')|" \
+   -i src/sage/databases/cremona.py
+# fix python-igraph detection
+  patch -p1 -i ../sagemath-detect-igraph.patch
+# adapt to networkx 2 changes
+  patch -p1 -i ../sagemath-networkx2.patch
+# fix three.js plotting backend
+  patch -p1 -i ../sagemath-threejs.patch
+
+# Upstream patches  
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+  patch -p1 -i ../fes02.patch
+# disable SIGFPE for ecl https://trac.sagemath.org/ticket/22191
+  patch -p1 -i ../sagemath-ecl-no-sigfpe.patch
+# disable auto_picke for cython 0.26 https://trac.sagemath.org/ticket/23360
+  patch -p1 -i ../sagemath-cython-0.26.patch
+# fix build with pynac 0.7.11 https://trac.sagemath.org/ticket/23820
+  patch -p1 -i ../sagemath-pynac-0.7.11.patch
+# fix build with pynac 0.7.12 https://trac.sagemath.org/ticket/23950
+  patch -p1 -i ../sagemath-pynac-0.7.12.patch
+
+# use python2
+  sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/*
+  sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+  sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
+  sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
+  sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env
+}
+
+
+build() {
+  cd sage-$pkgver
+  autoreconf -vi
+  ./configure --prefix=/usr || true
+
+  cd src
+  export SAGE_LOCAL="/usr"
+  export SAGE_ROOT="$PWD"
+  export SAGE_SRC="$PWD"
+  export CC=gcc
+
+  python2 setup.py build
+}
+
+package_sagemath() {
+  optdepends+=('sagemath-jupyter: Jupyter kernel')
+  conflicts=(sage-mathematics)
+  replaces=(sage-mathematics) 
+  provides=(sage-mathematics)
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD"
+  export SAGE_LOCAL="/usr"
+  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
+
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  mkdir -p "$pkgdir"/usr/bin
+  cp bin/sage "$pkgdir"/usr/bin
+  for _i in arch-env banner cachegrind callgrind cleaner coverage coverageall cython env env-config eval grep grepdoc inline-fortran \
+    ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2ipynb rst2sws rst2txt run \
+    run-cython runtests startuptime.py sws2rst valgrind version.sh
+  do
+    cp bin/sage-$_i "$pkgdir"/usr/bin
+  done
+  cp bin/math-readline "$pkgdir"/usr/bin
+  
+  mkdir -p "$pkgdir"/usr/share/sage
+  cp -r ext "$pkgdir"/usr/share/sage
+  
+# Create SAGE_SRC, needed for the notebook and help
+  mkdir "$pkgdir"/usr/share/sage/source
+  ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc
+
+# Remove sage_setup
+  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
+
+# Split jupyter kernel
+  rm -r "$pkgdir"/usr/share/jupyter
+}
+
+package_sagemath-jupyter() {
+  pkgdesc='Jupyter kernel for SageMath'
+  depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax)
+  optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
+
+  cd sage-$pkgver/src
+
+  export SAGE_ROOT="$PWD"
+  export SAGE_LOCAL="/usr"
+  export JUPYTER_PATH="$pkgdir"/usr/share/jupyter
+
+  python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update()"
+}

Deleted: community-x86_64/env.patch
===================================================================
--- community-x86_64/env.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/env.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,93 +0,0 @@
---- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
-+++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
-@@ -111,41 +111,7 @@
- }
- 
- 
--# New value for SAGE_ROOT: either SAGE_ROOT (if given)
--# or a guessed value based on pwd.
--if [ -n "$SAGE_ROOT" ]; then
--    NEW_SAGE_ROOT="$SAGE_ROOT"
--elif [ -f sage -a -d build ]; then
--    NEW_SAGE_ROOT="."
--elif [ -f ../../sage -a -d ../../build ]; then
--    NEW_SAGE_ROOT="../.."
--else
--    # No idea what SAGE_ROOT should be...
--    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
--    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Make NEW_SAGE_ROOT absolute
--NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
--
--# Sanity check NEW_SAGE_ROOT
--if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
--    :
--else
--    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
--    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
--    echo >&2 "or SAGE_ROOT/local/bin/ directory."
--    return 1
--fi
--
--# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
--if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
--    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
--    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
--    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
--fi
-+NEW_SAGE_ROOT="/usr"
- 
- # Display the Sage startup banner, used in src/bin/sage
- sage_banner() {
-@@ -151,6 +151,7 @@
- export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
- 
- export SAGE_ROOT="$NEW_SAGE_ROOT"
-+export SAGE_LOCAL='/usr'
- 
- # sage-env must know where the Sage's script files are.
- 
-@@ -233,8 +233,9 @@
- export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
- export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
- export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
--export SAGE_SRC="$SAGE_ROOT/src"
--export SAGE_DOC_SRC="$SAGE_SRC/doc"
-+export GAP_ROOT_DIR="/usr/lib/gap"
-+export SAGE_SRC="$SAGE_SHARE/sage/source"
-+export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
- export SAGE_DOC="$SAGE_SHARE/doc/sage"
- 
- if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
-@@ -374,6 +337,9 @@
-     export SAGE_STARTUP_FILE
- fi
- 
-+export LIBMTX="$DOT_SAGE/meataxe"
-+[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
-+
- if [ -z "$IPYTHONDIR" ]; then
-     # We hardcode a version number in the directory name. The idea is
-     # that we keep using the same version number as long as that is
-@@ -468,7 +400,6 @@
-         fi
-     fi
- fi
--export MAXIMA_PREFIX="$SAGE_LOCAL"
- 
- PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
- 
-@@ -629,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

Copied: sagemath/repos/community-x86_64/env.patch (from rev 261407, sagemath/trunk/env.patch)
===================================================================
--- community-x86_64/env.patch	                        (rev 0)
+++ community-x86_64/env.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,93 @@
+--- src/bin/sage-env.orig	2015-01-06 10:46:04.469687605 +0100
++++ src/bin/sage-env	2015-01-06 10:49:59.547762019 +0100
+@@ -111,41 +111,7 @@
+ }
+ 
+ 
+-# New value for SAGE_ROOT: either SAGE_ROOT (if given)
+-# or a guessed value based on pwd.
+-if [ -n "$SAGE_ROOT" ]; then
+-    NEW_SAGE_ROOT="$SAGE_ROOT"
+-elif [ -f sage -a -d build ]; then
+-    NEW_SAGE_ROOT="."
+-elif [ -f ../../sage -a -d ../../build ]; then
+-    NEW_SAGE_ROOT="../.."
+-else
+-    # No idea what SAGE_ROOT should be...
+-    echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
+-    echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Make NEW_SAGE_ROOT absolute
+-NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
+-
+-# Sanity check NEW_SAGE_ROOT
+-if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
+-    :
+-else
+-    echo >&2 "Error: SAGE_ROOT is set to a bad value:"
+-    echo >&2 "SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
+-    echo >&2 "or SAGE_ROOT/local/bin/ directory."
+-    return 1
+-fi
+-
+-# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
+-if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
+-    echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
+-    echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
+-    echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
+-fi
++NEW_SAGE_ROOT="/usr"
+ 
+ # Display the Sage startup banner, used in src/bin/sage
+ sage_banner() {
+@@ -151,6 +151,7 @@
+ export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
+ 
+ export SAGE_ROOT="$NEW_SAGE_ROOT"
++export SAGE_LOCAL='/usr'
+ 
+ # sage-env must know where the Sage's script files are.
+ 
+@@ -233,8 +233,9 @@
+ export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
+ export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
+ export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
+-export SAGE_SRC="$SAGE_ROOT/src"
+-export SAGE_DOC_SRC="$SAGE_SRC/doc"
++export GAP_ROOT_DIR="/usr/lib/gap"
++export SAGE_SRC="$SAGE_SHARE/sage/source"
++export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
+ export SAGE_DOC="$SAGE_SHARE/doc/sage"
+ 
+ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
+@@ -374,6 +337,9 @@
+     export SAGE_STARTUP_FILE
+ fi
+ 
++export LIBMTX="$DOT_SAGE/meataxe"
++[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
++
+ if [ -z "$IPYTHONDIR" ]; then
+     # We hardcode a version number in the directory name. The idea is
+     # that we keep using the same version number as long as that is
+@@ -468,7 +400,6 @@
+         fi
+     fi
+ fi
+-export MAXIMA_PREFIX="$SAGE_LOCAL"
+ 
+ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
+ 
+@@ -629,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

Deleted: community-x86_64/fes02.patch
===================================================================
--- community-x86_64/fes02.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/fes02.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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)
- 
- 
- include 'sage/ext/interrupt.pxi'  #sig_on(), sig_off()
-@@ -219,7 +221,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 261407, sagemath/trunk/fes02.patch)
===================================================================
--- community-x86_64/fes02.patch	                        (rev 0)
+++ community-x86_64/fes02.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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)
+ 
+ 
+ include 'sage/ext/interrupt.pxi'  #sig_on(), sig_off()
+@@ -219,7 +221,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: community-x86_64/jupyter-path.patch
===================================================================
--- community-x86_64/jupyter-path.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/jupyter-path.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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_ROOT, 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):
-
-@@ -208,7 +208,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 261407, sagemath/trunk/jupyter-path.patch)
===================================================================
--- community-x86_64/jupyter-path.patch	                        (rev 0)
+++ community-x86_64/jupyter-path.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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_ROOT, 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):
+
+@@ -208,7 +208,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: community-x86_64/latte-count.patch
===================================================================
--- community-x86_64/latte-count.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/latte-count.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
-@@ -228,7 +228,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
-@@ -236,7 +236,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
-@@ -244,7 +244,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
-@@ -252,7 +252,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
-@@ -264,7 +264,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
-@@ -86,7 +86,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: ...
-@@ -106,7 +106,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 261407, sagemath/trunk/latte-count.patch)
===================================================================
--- community-x86_64/latte-count.patch	                        (rev 0)
+++ community-x86_64/latte-count.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
+@@ -228,7 +228,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
+@@ -236,7 +236,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
+@@ -244,7 +244,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
+@@ -252,7 +252,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
+@@ -264,7 +264,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
+@@ -86,7 +86,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: ...
+@@ -106,7 +106,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: community-x86_64/package.patch
===================================================================
--- community-x86_64/package.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/package.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
-@@ -343,7 +343,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 261407, sagemath/trunk/package.patch)
===================================================================
--- community-x86_64/package.patch	                        (rev 0)
+++ community-x86_64/package.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
+@@ -343,7 +343,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: community-x86_64/r-no-readline.patch
===================================================================
--- community-x86_64/r-no-readline.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/r-no-readline.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,11 +0,0 @@
---- a/src/sage/interfaces/r.py
-+++ b/src/sage/interfaces/r.py
-@@ -331,7 +331,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 261407, sagemath/trunk/r-no-readline.patch)
===================================================================
--- community-x86_64/r-no-readline.patch	                        (rev 0)
+++ community-x86_64/r-no-readline.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,11 @@
+--- a/src/sage/interfaces/r.py
++++ b/src/sage/interfaces/r.py
+@@ -331,7 +331,7 @@
+                   prompt = '> ', #default, later comes the change
+ 
+                   # This is the command that starts up your program
+-                  command = "R --vanilla --quiet",
++                  command = "R --no-readline --vanilla --quiet",
+ 
+                   server=server,
+                   server_tmpdir=server_tmpdir,

Deleted: community-x86_64/sagemath-cython-0.26.patch
===================================================================
--- community-x86_64/sagemath-cython-0.26.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/sagemath-cython-0.26.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,26 +0,0 @@
-diff --git a/src/setup.py b/src/setup.py
-index 2215379..ddca1eb 100755
---- a/src/setup.py
-+++ b/src/setup.py
-@@ -95,7 +95,12 @@ library_dirs = [os.path.join(SAGE_LOCAL, "lib")]
- 
- # Manually add -fno-strict-aliasing, which is needed to compile Cython
- # and disappears from the default flags if the user has set CFLAGS.
--extra_compile_args = [ "-fno-strict-aliasing" ]
-+#
-+# Add -DCYTHON_CLINE_IN_TRACEBACK=1 which causes the .c line number to
-+# always appear in exception tracebacks (by default, this is a runtime
-+# setting in Cython which causes some overhead every time an exception
-+# is raised).
-+extra_compile_args = ["-fno-strict-aliasing", "-DCYTHON_CLINE_IN_TRACEBACK=1"]
- extra_link_args = [ ]
- 
- DEVEL = False
-@@ -336,6 +341,7 @@ class sage_build_cython(Command):
- 
-         # Cython compiler directives
-         self.cython_directives = dict(
-+            auto_pickle=False,
-             autotestdict=False,
-             cdivision=True,
-             embedsignature=True,

Copied: sagemath/repos/community-x86_64/sagemath-cython-0.26.patch (from rev 261407, sagemath/trunk/sagemath-cython-0.26.patch)
===================================================================
--- community-x86_64/sagemath-cython-0.26.patch	                        (rev 0)
+++ community-x86_64/sagemath-cython-0.26.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,26 @@
+diff --git a/src/setup.py b/src/setup.py
+index 2215379..ddca1eb 100755
+--- a/src/setup.py
++++ b/src/setup.py
+@@ -95,7 +95,12 @@ library_dirs = [os.path.join(SAGE_LOCAL, "lib")]
+ 
+ # Manually add -fno-strict-aliasing, which is needed to compile Cython
+ # and disappears from the default flags if the user has set CFLAGS.
+-extra_compile_args = [ "-fno-strict-aliasing" ]
++#
++# Add -DCYTHON_CLINE_IN_TRACEBACK=1 which causes the .c line number to
++# always appear in exception tracebacks (by default, this is a runtime
++# setting in Cython which causes some overhead every time an exception
++# is raised).
++extra_compile_args = ["-fno-strict-aliasing", "-DCYTHON_CLINE_IN_TRACEBACK=1"]
+ extra_link_args = [ ]
+ 
+ DEVEL = False
+@@ -336,6 +341,7 @@ class sage_build_cython(Command):
+ 
+         # Cython compiler directives
+         self.cython_directives = dict(
++            auto_pickle=False,
+             autotestdict=False,
+             cdivision=True,
+             embedsignature=True,

Deleted: community-x86_64/sagemath-detect-igraph.patch
===================================================================
--- community-x86_64/sagemath-detect-igraph.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/sagemath-detect-igraph.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
-@@ -7876,10 +7875,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 261407, sagemath/trunk/sagemath-detect-igraph.patch)
===================================================================
--- community-x86_64/sagemath-detect-igraph.patch	                        (rev 0)
+++ community-x86_64/sagemath-detect-igraph.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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
+@@ -7876,10 +7875,12 @@ class GenericGraph(GenericGraph_pyx):
+         if algorithm is None:
+             if vertex_bound:
+                 algorithm = "LP"
+-            elif is_package_installed("python_igraph"):
+-                algorithm = "igraph"
+             else:
+-                algorithm = "FF"
++                algorithm = "igraph"
++                try:
++                    import igraph
++                except ImportError:
++                    algorithm = "FF"
+ 
+         if (algorithm == "FF"):
+             return self._ford_fulkerson(x,y, value_only=value_only, integer=integer, use_edge_labels=use_edge_labels)
+

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

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

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

Copied: sagemath/repos/community-x86_64/sagemath-networkx2.patch (from rev 261407, sagemath/trunk/sagemath-networkx2.patch)
===================================================================
--- community-x86_64/sagemath-networkx2.patch	                        (rev 0)
+++ community-x86_64/sagemath-networkx2.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,26 @@
+diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py
+index 8c29602da6..e7a185d586 100644
+--- a/src/sage/graphs/digraph.py
++++ b/src/sage/graphs/digraph.py
+@@ -751,7 +751,7 @@ class DiGraph(GenericGraph):
+             self.allow_multiple_edges(multiedges,check=False)
+             self.allow_loops(loops,check=False)
+             self.add_vertices(data.nodes())
+-            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
++            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
+         elif format == 'igraph':
+             if not data.is_directed():
+                 raise ValueError("A *directed* igraph graph was expected. To "+
+diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py
+index b63135d8e6..5775042976 100644
+--- a/src/sage/graphs/graph.py
++++ b/src/sage/graphs/graph.py
+@@ -1199,7 +1199,7 @@ class Graph(GenericGraph):
+             self.allow_loops(loops, check=False)
+             self.allow_multiple_edges(multiedges, check=False)
+             self.add_vertices(data.nodes())
+-            self.add_edges((u,v,r(l)) for u,v,l in data.edges_iter(data=True))
++            self.add_edges((u,v,r(l)) for u,v,l in data.edges(data=True))
+         elif format == 'igraph':
+             if data.is_directed():
+                 raise ValueError("An *undirected* igraph graph was expected. "+

Deleted: community-x86_64/sagemath-pynac-0.7.11.patch
===================================================================
--- community-x86_64/sagemath-pynac-0.7.11.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/sagemath-pynac-0.7.11.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,21 +0,0 @@
---- a/src/sage/libs/pynac/pynac.pxd
-+++ b/src/sage/libs/pynac/pynac.pxd
-@@ -302,7 +302,6 @@ cdef extern from "sage/libs/pynac/wrap.h":
-     bint is_a_fderivative "is_a<GiNaC::fderivative>" (GEx e)
-     bint is_a_function "is_a<GiNaC::function>" (GEx e)
-     bint is_exactly_a_function "is_exactly_a<GiNaC::function>" (GEx e)
--    bint is_a_ncmul "is_a<GiNaC::ncmul>" (GEx e)
- 
-     # Arithmetic
-     int ginac_error()
---- a/src/sage/symbolic/expression.pyx
-+++ b/src/sage/symbolic/expression.pyx
-@@ -5536,7 +5536,7 @@ cdef class Expression(CommutativeRingElement):
-         cdef unsigned serial
-         if is_a_add(self._gobj):
-             return add_vararg
--        elif is_a_mul(self._gobj) or is_a_ncmul(self._gobj):
-+        elif is_a_mul(self._gobj):
-             return mul_vararg
-         elif is_a_power(self._gobj):
-             return operator.pow

Copied: sagemath/repos/community-x86_64/sagemath-pynac-0.7.11.patch (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.11.patch)
===================================================================
--- community-x86_64/sagemath-pynac-0.7.11.patch	                        (rev 0)
+++ community-x86_64/sagemath-pynac-0.7.11.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,21 @@
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -302,7 +302,6 @@ cdef extern from "sage/libs/pynac/wrap.h":
+     bint is_a_fderivative "is_a<GiNaC::fderivative>" (GEx e)
+     bint is_a_function "is_a<GiNaC::function>" (GEx e)
+     bint is_exactly_a_function "is_exactly_a<GiNaC::function>" (GEx e)
+-    bint is_a_ncmul "is_a<GiNaC::ncmul>" (GEx e)
+ 
+     # Arithmetic
+     int ginac_error()
+--- a/src/sage/symbolic/expression.pyx
++++ b/src/sage/symbolic/expression.pyx
+@@ -5536,7 +5536,7 @@ cdef class Expression(CommutativeRingElement):
+         cdef unsigned serial
+         if is_a_add(self._gobj):
+             return add_vararg
+-        elif is_a_mul(self._gobj) or is_a_ncmul(self._gobj):
++        elif is_a_mul(self._gobj):
+             return mul_vararg
+         elif is_a_power(self._gobj):
+             return operator.pow

Deleted: community-x86_64/sagemath-pynac-0.7.12.patch
===================================================================
--- community-x86_64/sagemath-pynac-0.7.12.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/sagemath-pynac-0.7.12.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,390 +0,0 @@
-diff --git a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
-index 5a150a0..f9ede06 100644
---- a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
-+++ b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
-@@ -716,7 +716,7 @@ die ähnliche Funktion ``canonicalize_radical``::
- Diese Gesetze können auch umgekehrt verwendet werden, wie in diesem Beispiel::
- 
-     sage: (5*log(2) + 5*log(5)).simplify_log()
--    log(100000)
-+    5*log(10)
- 
- Es geben weitere mögliche Vereinfachungen, die wir hier nicht weiter erwähnen.
- 
-diff --git a/src/sage/coding/code_bounds.py b/src/sage/coding/code_bounds.py
-index 7935bbf..64ac455 100644
---- a/src/sage/coding/code_bounds.py
-+++ b/src/sage/coding/code_bounds.py
-@@ -577,8 +577,8 @@ def entropy(x, q=2):
- 
-         sage: codes.bounds.entropy(0, 2)
-         0
--        sage: codes.bounds.entropy(1/5,4)
--        1/5*log(3)/log(4) - 4/5*log(4/5)/log(4) - 1/5*log(1/5)/log(4)
-+        sage: codes.bounds.entropy(1/5,4).factor()
-+        1/10*(log(3) - 4*log(4/5) - log(1/5))/log(2)
-         sage: codes.bounds.entropy(1, 3)
-         log(2)/log(3)
- 
-diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py
-index 15e3dbf..64d898c 100644
---- a/src/sage/functions/log.py
-+++ b/src/sage/functions/log.py
-@@ -121,12 +121,12 @@ class Function_exp(GinacFunction):
-             sage: model_exp = exp(II)**a*(b)
-             sage: sol1_l={b: 5.0, a: 1.1}
-             sage: model_exp.subs(sol1_l)
--            5.00000000000000*(e^II)^1.10000000000000
-+            5.00000000000000*e^(1.10000000000000*II)
- 
-         ::
- 
-             sage: exp(3)^II*exp(x)
--            (e^3)^II*e^x
-+            e^(3*II + x)
-             sage: exp(x)*exp(x)
-             e^(2*x)
-             sage: exp(x)*exp(a)
-@@ -137,7 +137,7 @@ class Function_exp(GinacFunction):
-         Another instance of the same problem (:trac:`7394`)::
- 
-             sage: 2*sqrt(e)
--            2*sqrt(e)
-+            2*e^(1/2)
- 
-         Check that :trac:`19918` is fixed::
- 
-@@ -271,7 +271,7 @@ class Function_log(GinacFunction):
-             sage: RDF(log(1024, 2))
-             10.0
-             sage: log(10, 4)
--            log(10)/log(4)
-+            1/2*log(10)/log(2)
-             sage: RDF(log(10, 4))
-             1.6609640474436813
-             sage: log(10, 2)
-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
-index 5db9871..c877454 100644
---- a/src/sage/functions/orthogonal_polys.py
-+++ b/src/sage/functions/orthogonal_polys.py
-@@ -1666,7 +1666,7 @@ class Func_assoc_legendre_Q(BuiltinFunction):
-         EXAMPLES::
- 
-             sage: gen_legendre_Q(2,1,3)
--            -1/4*sqrt(-2)*(-36*I*pi + 36*log(4) - 36*log(2) - 25)
-+            -1/4*sqrt(-2)*(-36*I*pi + 36*log(2) - 25)
-         """
-         ret = self._eval_special_values_(n, m, x)
-         if ret is not None:
-diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
-index 9e37f08..1d19fdd 100644
---- a/src/sage/libs/pynac/pynac.pxd
-+++ b/src/sage/libs/pynac/pynac.pxd
-@@ -97,6 +97,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
- 
-     cdef cppclass GEx "ex":
-         GEx()
-+        GEx(GNumeric o)
-         GEx(GSymbol m)
-         GEx(GEx m)
-         GEx(long n)
-@@ -127,8 +128,8 @@ cdef extern from "sage/libs/pynac/wrap.h":
-         GEx numer()                   except +
-         GEx denom()                   except +
-         GEx numer_denom()             except +
--        int degree(GEx expr)          except +
--        int ldegree(GEx expr)         except +
-+        GNumeric degree(GEx expr)          except +
-+        GNumeric ldegree(GEx expr)         except +
-         GEx unit(GEx expr)            except +
-         GEx content(GEx expr)         except +
-         GEx primpart(GEx expr)        except +
-@@ -161,6 +162,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
- 
-     # Algorithms
-     GEx g_gcd "gcd"(GEx a, GEx b) except +
-+    bint g_factor "factor"(GEx expr, GEx res) except +
-     GEx g_gosper_term "gosper_term"(GEx the_ex, GEx n) except +
-     GEx g_gosper_sum_definite "gosper_sum_definite"(GEx the_ex,
-             GEx n, GEx a, GEx b, int* p) except +
-diff --git a/src/sage/rings/asymptotic/asymptotic_ring.py b/src/sage/rings/asymptotic/asymptotic_ring.py
-index 0b03a4a..9de56a6 100644
---- a/src/sage/rings/asymptotic/asymptotic_ring.py
-+++ b/src/sage/rings/asymptotic/asymptotic_ring.py
-@@ -2485,7 +2485,7 @@ class AsymptoticExpansion(CommutativeAlgebraElement):
-         ::
- 
-             sage: (x^2 + log(x)).subs(x=4*x+2).truncate(5)
--            16*x^2 + 16*x + log(x) + log(4) + 4 + 1/2*x^(-1) + O(x^(-2))
-+            16*x^2 + 16*x + log(x) + 2*log(2) + 4 + 1/2*x^(-1) + O(x^(-2))
-             sage: _.parent()
-             Asymptotic Ring <(e^x)^QQ * x^ZZ * log(x)^ZZ> over Symbolic Ring
- 
-diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py 
-b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
-index 9a6f67a..de61ed3 100644
---- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
-+++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
-@@ -60,9 +60,15 @@ A univariate smooth point example::
-     sage: decomp = F.asymptotic_decomposition(alpha)
-     sage: decomp
-     (0, []) +
--    (-1/2*(x^2 + 6*x + 9)*r^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
--     - 1/2*(5*x^2 + 24*x + 27)*r/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
--     - 3*(x^2 + 3*x + 3)/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
-+    (-1/2*r^2*(x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 6*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
-+     - 1/2*r*(5*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 24*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     + 27/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
-+     - 3*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     - 9*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
-+     - 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
-      [(x - 1/2, 1)])
-     sage: F1 = decomp[1]
-     sage: p = {x: 1/2}
-@@ -139,9 +145,9 @@ A multiple point example (Example 6.5 of [RaWi2012]_)::
-     sage: alpha = (var('a'), var('b'))
-     sage: decomp =  F.asymptotic_decomposition(alpha); decomp
-     (0, []) +
--    (-1/9*(2*b^2*x^2 - 5*a*b*x*y + 2*a^2*y^2)*r^2/(x^2*y^2)
--      - 1/9*(6*b*x^2 - 5*(a + b)*x*y + 6*a*y^2)*r/(x^2*y^2)
--      - 1/9*(4*x^2 - 5*x*y + 4*y^2)/(x^2*y^2),
-+    (-1/9*r^2*(2*a^2/x^2 + 2*b^2/y^2 - 5*a*b/(x*y))
-+     - 1/9*r*(6*a/x^2 + 6*b/y^2 - 5*a/(x*y) - 5*b/(x*y))
-+     - 4/9/x^2 - 4/9/y^2 + 5/9/(x*y),
-      [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
-     sage: F1 = decomp[1]
-     sage: F1.asymptotics(p, alpha, 2)
-@@ -1480,9 +1486,9 @@ class FractionWithFactoredDenominator(RingElement):
-             sage: alpha = [var('a')]
-             sage: F.asymptotic_decomposition(alpha)
-             (0, []) +
--            (1/54*(5*a^2*x^2 + 2*a^2*x + 11*a^2)*r^2/x^2
--             - 1/54*(5*a*x^2 - 2*a*x - 33*a)*r/x^2 + 11/27/x^2, [(x - 1, 1)]) +
--            (-5/27, [(x + 2, 1)])
-+            (1/54*(5*a^2 + 2*a^2/x + 11*a^2/x^2)*r^2
-+             - 1/54*(5*a - 2*a/x - 33*a/x^2)*r + 11/27/x^2,
-+            [(x - 1, 1)]) + (-5/27, [(x + 2, 1)])
- 
-         ::
- 
-@@ -1495,7 +1501,7 @@ class FractionWithFactoredDenominator(RingElement):
-             sage: alpha = var('a, b')
-             sage: F.asymptotic_decomposition(alpha)
-             (0, []) +
--            (1/3*(2*b*x - a*y)*r/(x*y) + 1/3*(2*x - y)/(x*y),
-+            (-1/3*r*(a/x - 2*b/y) - 1/3/x + 2/3/y,
-              [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
-         """
-         R = self.denominator_ring
-@@ -1600,7 +1606,7 @@ class FractionWithFactoredDenominator(RingElement):
-             (1, [(x*y + x + y - 1, 2)])
-             sage: alpha = [4, 3]
-             sage: decomp = F.asymptotic_decomposition(alpha); decomp
--            (0, []) + (-3/2*r*(y + 1)/y - 1/2*(y + 1)/y, [(x*y + x + y - 1, 1)])
-+            (0, []) + (-3/2*r*(1/y + 1) - 1/2/y - 1/2, [(x*y + x + y - 1, 1)])
-             sage: F1 = decomp[1]
-             sage: p = {y: 1/3, x: 1/2}
-             sage: asy = F1.asymptotics(p, alpha, 2, verbose=True)
-@@ -1634,7 +1640,7 @@ class FractionWithFactoredDenominator(RingElement):
-             sage: alpha = [3, 3, 2]
-             sage: decomp = F.asymptotic_decomposition(alpha); decomp
-             (0, []) +
--            (16*r*(4*y - 3*z)/(y*z) + 16*(2*y - z)/(y*z),
-+            (-16*r*(3/y - 4/z) - 16/y + 32/z,
-              [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 1)])
-             sage: F1 = decomp[1]
-             sage: p = {x: 1, y: 1, z: 1}
-diff --git a/src/sage/rings/asymptotic/term_monoid.py b/src/sage/rings/asymptotic/term_monoid.py
-index b879639..ded7f02 100644
---- a/src/sage/rings/asymptotic/term_monoid.py
-+++ b/src/sage/rings/asymptotic/term_monoid.py
-@@ -3339,7 +3339,7 @@ class ExactTerm(TermWithCoefficient):
-             sage: T(x^1234).log_term()
-             (1234*log(x),)
-             sage: T(49*x^7).log_term(base=7)
--            (log(49)/log(7), 7/log(7)*log(x))
-+            (2, 7/log(7)*log(x))
- 
-         ::
- 
-@@ -3347,7 +3347,7 @@ class ExactTerm(TermWithCoefficient):
-             sage: T('x * y').log_term()
-             (log(x), log(y))
-             sage: T('4 * x * y').log_term(base=2)
--            (log(4)/log(2), 1/log(2)*log(x), 1/log(2)*log(y))
-+            (2, 1/log(2)*log(x), 1/log(2)*log(y))
- 
-         .. SEEALSO::
- 
-diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx
-index 0b8a3bd..cdc34a2 100644
---- a/src/sage/rings/integer.pyx
-+++ b/src/sage/rings/integer.pyx
-@@ -2532,7 +2532,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
-             sage: Integer(125).log(5,prec=53)
-             3.00000000000000
-             sage: log(Integer(125))
--            log(125)
-+            3*log(5)
- 
-         For extremely large numbers, this works::
- 
-diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
-index 36af3a5..857081b 100644
---- a/src/sage/rings/rational.pyx
-+++ b/src/sage/rings/rational.pyx
-@@ -3075,11 +3075,11 @@ cdef class Rational(sage.structure.element.FieldElement):
-             sage: (124/345).log(5,100)
-             -0.63578895682825611710391773754
-             sage: log(QQ(125))
--            log(125)
-+            3*log(5)
-             sage: log(QQ(125), 5)
-             3
-             sage: log(QQ(125), 3)
--            log(125)/log(3)
-+            3*log(5)/log(3)
-             sage: QQ(8).log(1/2)
-             -3
-             sage: (1/8).log(1/2)
-diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py
-index 8009421..9ec892e 100644
---- a/src/sage/schemes/elliptic_curves/ell_point.py
-+++ b/src/sage/schemes/elliptic_curves/ell_point.py
-@@ -2886,7 +2886,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field):
-             sage: Q.non_archimedean_local_height(K.ideal(1-2*i))
-             0
-             sage: Q.non_archimedean_local_height()
--            1/2*log(16)
-+            2*log(2)
- 
-         An example over the rational numbers::
- 
-diff --git a/src/sage/symbolic/constants_c.pyx b/src/sage/symbolic/constants_c.pyx
-index 8eb61f5..38e8db6 100644
---- a/src/sage/symbolic/constants_c.pyx
-+++ b/src/sage/symbolic/constants_c.pyx
-@@ -145,14 +145,14 @@ cdef class E(Expression):
-             sage: t.operands()
-             [a]
- 
--        As opposed to::
-+        This applies to the unit argument as well::
- 
-             sage: u = SR(1).exp()^a; u
-             e^a
-             sage: u.operator()
--            <built-in function pow>
-+            exp
-             sage: u.operands()
--            [e, a]
-+            [a]
- 
-         It also works with matrices (see :trac:`4735`)::
- 
-diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
-index 94252ea..3e06201 100644
---- a/src/sage/symbolic/expression.pyx
-+++ b/src/sage/symbolic/expression.pyx
-@@ -3247,11 +3247,8 @@ cdef class Expression(CommutativeRingElement):
-             -1
-             sage: b = -x*A; c = b*b; c
-             1/4*x^2*(sqrt(5) + I*sqrt(2*sqrt(5) + 10) - 1)
--
--        Products of non integer powers of exp are not simplified::
--
-             sage: exp(x)^I*exp(z)^(2.5)
--            (e^x)^I*(e^z)^2.50000000000000
-+            e^(I*x + 2.50000000000000*z)
- 
-         ::
- 
-@@ -3925,7 +3922,7 @@ cdef class Expression(CommutativeRingElement):
-             sage: 0^1.0
-             0.000000000000000
-             sage: exp(x)^1.0
--            (e^x)^1.00000000000000
-+            e^(1.00000000000000*x)
-         """
-         cdef Expression base, nexp
- 
-@@ -6311,7 +6308,7 @@ cdef class Expression(CommutativeRingElement):
-             0
-         """
-         cdef Expression ss = self.coerce_in(s)
--        return self._gobj.ldegree(ss._gobj)
-+        return new_Expression_from_GEx(self._parent, GEx(self._gobj.ldegree(ss._gobj)))
- 
-     def degree(self, s):
-         """
-@@ -6337,7 +6334,7 @@ cdef class Expression(CommutativeRingElement):
-             0
-         """
-         cdef Expression ss = self.coerce_in(s)
--        return self._gobj.degree(ss._gobj)
-+        return new_Expression_from_GEx(self._parent, GEx(self._gobj.degree(ss._gobj)))
- 
-     def unit(self, s):
-         """
-@@ -7185,12 +7182,12 @@ cdef class Expression(CommutativeRingElement):
-             sage: f.collect(z)
-             (x^2*y^2 + 4)*z^2 + 4*x*y + 20*y^2 + (x + 21*y)*z
- 
--        Sometimes, we do have to call :meth:`expand()` on the
--        expression first to achieve the desired result::
-+        The terms are collected, whether the expression
-+        is expanded or not::
- 
-             sage: f = (x + y)*(x - z)
-             sage: f.collect(x)
--            x^2 + x*y - x*z - y*z
-+            x^2 + x*(y - z) - y*z
-             sage: f.expand().collect(x)
-             x^2 + x*(y - z) - y*z
- 
-@@ -10433,9 +10430,9 @@ cdef class Expression(CommutativeRingElement):
-         ``x*log(9)`` is contracted only if ``algorithm`` is ``'all'``::
- 
-             sage: (x*log(9)).simplify_log()
--            x*log(9)
-+            2*x*log(3)
-             sage: (x*log(9)).simplify_log('all')
--            log(9^x)
-+            log(3^(2*x))
- 
-         TESTS:
- 
-@@ -10550,7 +10547,7 @@ cdef class Expression(CommutativeRingElement):
-         To expand also log(3/4) use ``algorithm='all'``::
- 
-             sage: (log(3/4*x^pi)).log_expand('all')
--            pi*log(x) - log(4) + log(3)
-+            pi*log(x) + log(3) - 2*log(2)
- 
-         To expand only the power use ``algorithm='powers'``.::
- 
-@@ -10573,7 +10570,7 @@ cdef class Expression(CommutativeRingElement):
-             pi*log(x) + log(3/4)
- 
-             sage: (log(3/4*x^pi)).log_expand('all')
--            pi*log(x) - log(4) + log(3)
-+            pi*log(x) + log(3) - 2*log(2)
- 
-             sage: (log(3/4*x^pi)).log_expand()
-             pi*log(x) + log(3/4)
-diff --git a/src/sage/tests/french_book/calculus_doctest.py b/src/sage/tests/french_book/calculus_doctest.py
-index 0d40cae..ffe5d4b 100644
---- a/src/sage/tests/french_book/calculus_doctest.py
-+++ b/src/sage/tests/french_book/calculus_doctest.py
-@@ -331,7 +331,7 @@ Sage example in ./calculus.tex, line 914::
- Sage example in ./calculus.tex, line 929::
- 
-     sage: v(x) = diff(u(x), x); sol = solve(v(x) == 0, x); sol
--    [x == 100/log(100), x == 0]
-+    [x == 50/log(10), x == 0]
-     sage: floor(sol[0].rhs())
-     21
- 

Copied: sagemath/repos/community-x86_64/sagemath-pynac-0.7.12.patch (from rev 261407, sagemath/trunk/sagemath-pynac-0.7.12.patch)
===================================================================
--- community-x86_64/sagemath-pynac-0.7.12.patch	                        (rev 0)
+++ community-x86_64/sagemath-pynac-0.7.12.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,390 @@
+diff --git a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
+index 5a150a0..f9ede06 100644
+--- a/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
++++ b/src/doc/de/thematische_anleitungen/sage_gymnasium.rst
+@@ -716,7 +716,7 @@ die ähnliche Funktion ``canonicalize_radical``::
+ Diese Gesetze können auch umgekehrt verwendet werden, wie in diesem Beispiel::
+ 
+     sage: (5*log(2) + 5*log(5)).simplify_log()
+-    log(100000)
++    5*log(10)
+ 
+ Es geben weitere mögliche Vereinfachungen, die wir hier nicht weiter erwähnen.
+ 
+diff --git a/src/sage/coding/code_bounds.py b/src/sage/coding/code_bounds.py
+index 7935bbf..64ac455 100644
+--- a/src/sage/coding/code_bounds.py
++++ b/src/sage/coding/code_bounds.py
+@@ -577,8 +577,8 @@ def entropy(x, q=2):
+ 
+         sage: codes.bounds.entropy(0, 2)
+         0
+-        sage: codes.bounds.entropy(1/5,4)
+-        1/5*log(3)/log(4) - 4/5*log(4/5)/log(4) - 1/5*log(1/5)/log(4)
++        sage: codes.bounds.entropy(1/5,4).factor()
++        1/10*(log(3) - 4*log(4/5) - log(1/5))/log(2)
+         sage: codes.bounds.entropy(1, 3)
+         log(2)/log(3)
+ 
+diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py
+index 15e3dbf..64d898c 100644
+--- a/src/sage/functions/log.py
++++ b/src/sage/functions/log.py
+@@ -121,12 +121,12 @@ class Function_exp(GinacFunction):
+             sage: model_exp = exp(II)**a*(b)
+             sage: sol1_l={b: 5.0, a: 1.1}
+             sage: model_exp.subs(sol1_l)
+-            5.00000000000000*(e^II)^1.10000000000000
++            5.00000000000000*e^(1.10000000000000*II)
+ 
+         ::
+ 
+             sage: exp(3)^II*exp(x)
+-            (e^3)^II*e^x
++            e^(3*II + x)
+             sage: exp(x)*exp(x)
+             e^(2*x)
+             sage: exp(x)*exp(a)
+@@ -137,7 +137,7 @@ class Function_exp(GinacFunction):
+         Another instance of the same problem (:trac:`7394`)::
+ 
+             sage: 2*sqrt(e)
+-            2*sqrt(e)
++            2*e^(1/2)
+ 
+         Check that :trac:`19918` is fixed::
+ 
+@@ -271,7 +271,7 @@ class Function_log(GinacFunction):
+             sage: RDF(log(1024, 2))
+             10.0
+             sage: log(10, 4)
+-            log(10)/log(4)
++            1/2*log(10)/log(2)
+             sage: RDF(log(10, 4))
+             1.6609640474436813
+             sage: log(10, 2)
+diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
+index 5db9871..c877454 100644
+--- a/src/sage/functions/orthogonal_polys.py
++++ b/src/sage/functions/orthogonal_polys.py
+@@ -1666,7 +1666,7 @@ class Func_assoc_legendre_Q(BuiltinFunction):
+         EXAMPLES::
+ 
+             sage: gen_legendre_Q(2,1,3)
+-            -1/4*sqrt(-2)*(-36*I*pi + 36*log(4) - 36*log(2) - 25)
++            -1/4*sqrt(-2)*(-36*I*pi + 36*log(2) - 25)
+         """
+         ret = self._eval_special_values_(n, m, x)
+         if ret is not None:
+diff --git a/src/sage/libs/pynac/pynac.pxd b/src/sage/libs/pynac/pynac.pxd
+index 9e37f08..1d19fdd 100644
+--- a/src/sage/libs/pynac/pynac.pxd
++++ b/src/sage/libs/pynac/pynac.pxd
+@@ -97,6 +97,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
+ 
+     cdef cppclass GEx "ex":
+         GEx()
++        GEx(GNumeric o)
+         GEx(GSymbol m)
+         GEx(GEx m)
+         GEx(long n)
+@@ -127,8 +128,8 @@ cdef extern from "sage/libs/pynac/wrap.h":
+         GEx numer()                   except +
+         GEx denom()                   except +
+         GEx numer_denom()             except +
+-        int degree(GEx expr)          except +
+-        int ldegree(GEx expr)         except +
++        GNumeric degree(GEx expr)          except +
++        GNumeric ldegree(GEx expr)         except +
+         GEx unit(GEx expr)            except +
+         GEx content(GEx expr)         except +
+         GEx primpart(GEx expr)        except +
+@@ -161,6 +162,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
+ 
+     # Algorithms
+     GEx g_gcd "gcd"(GEx a, GEx b) except +
++    bint g_factor "factor"(GEx expr, GEx res) except +
+     GEx g_gosper_term "gosper_term"(GEx the_ex, GEx n) except +
+     GEx g_gosper_sum_definite "gosper_sum_definite"(GEx the_ex,
+             GEx n, GEx a, GEx b, int* p) except +
+diff --git a/src/sage/rings/asymptotic/asymptotic_ring.py b/src/sage/rings/asymptotic/asymptotic_ring.py
+index 0b03a4a..9de56a6 100644
+--- a/src/sage/rings/asymptotic/asymptotic_ring.py
++++ b/src/sage/rings/asymptotic/asymptotic_ring.py
+@@ -2485,7 +2485,7 @@ class AsymptoticExpansion(CommutativeAlgebraElement):
+         ::
+ 
+             sage: (x^2 + log(x)).subs(x=4*x+2).truncate(5)
+-            16*x^2 + 16*x + log(x) + log(4) + 4 + 1/2*x^(-1) + O(x^(-2))
++            16*x^2 + 16*x + log(x) + 2*log(2) + 4 + 1/2*x^(-1) + O(x^(-2))
+             sage: _.parent()
+             Asymptotic Ring <(e^x)^QQ * x^ZZ * log(x)^ZZ> over Symbolic Ring
+ 
+diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py 
+b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
+index 9a6f67a..de61ed3 100644
+--- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
++++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
+@@ -60,9 +60,15 @@ A univariate smooth point example::
+     sage: decomp = F.asymptotic_decomposition(alpha)
+     sage: decomp
+     (0, []) +
+-    (-1/2*(x^2 + 6*x + 9)*r^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
+-     - 1/2*(5*x^2 + 24*x + 27)*r/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
+-     - 3*(x^2 + 3*x + 3)/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
++    (-1/2*r^2*(x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 6*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
++     - 1/2*r*(5*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 24*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     + 27/(x^5 + 9*x^4 + 27*x^3 + 27*x^2))
++     - 3*x^2/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     - 9*x/(x^5 + 9*x^4 + 27*x^3 + 27*x^2)
++     - 9/(x^5 + 9*x^4 + 27*x^3 + 27*x^2),
+      [(x - 1/2, 1)])
+     sage: F1 = decomp[1]
+     sage: p = {x: 1/2}
+@@ -139,9 +145,9 @@ A multiple point example (Example 6.5 of [RaWi2012]_)::
+     sage: alpha = (var('a'), var('b'))
+     sage: decomp =  F.asymptotic_decomposition(alpha); decomp
+     (0, []) +
+-    (-1/9*(2*b^2*x^2 - 5*a*b*x*y + 2*a^2*y^2)*r^2/(x^2*y^2)
+-      - 1/9*(6*b*x^2 - 5*(a + b)*x*y + 6*a*y^2)*r/(x^2*y^2)
+-      - 1/9*(4*x^2 - 5*x*y + 4*y^2)/(x^2*y^2),
++    (-1/9*r^2*(2*a^2/x^2 + 2*b^2/y^2 - 5*a*b/(x*y))
++     - 1/9*r*(6*a/x^2 + 6*b/y^2 - 5*a/(x*y) - 5*b/(x*y))
++     - 4/9/x^2 - 4/9/y^2 + 5/9/(x*y),
+      [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
+     sage: F1 = decomp[1]
+     sage: F1.asymptotics(p, alpha, 2)
+@@ -1480,9 +1486,9 @@ class FractionWithFactoredDenominator(RingElement):
+             sage: alpha = [var('a')]
+             sage: F.asymptotic_decomposition(alpha)
+             (0, []) +
+-            (1/54*(5*a^2*x^2 + 2*a^2*x + 11*a^2)*r^2/x^2
+-             - 1/54*(5*a*x^2 - 2*a*x - 33*a)*r/x^2 + 11/27/x^2, [(x - 1, 1)]) +
+-            (-5/27, [(x + 2, 1)])
++            (1/54*(5*a^2 + 2*a^2/x + 11*a^2/x^2)*r^2
++             - 1/54*(5*a - 2*a/x - 33*a/x^2)*r + 11/27/x^2,
++            [(x - 1, 1)]) + (-5/27, [(x + 2, 1)])
+ 
+         ::
+ 
+@@ -1495,7 +1501,7 @@ class FractionWithFactoredDenominator(RingElement):
+             sage: alpha = var('a, b')
+             sage: F.asymptotic_decomposition(alpha)
+             (0, []) +
+-            (1/3*(2*b*x - a*y)*r/(x*y) + 1/3*(2*x - y)/(x*y),
++            (-1/3*r*(a/x - 2*b/y) - 1/3/x + 2/3/y,
+              [(x + 2*y - 1, 1), (2*x + y - 1, 1)])
+         """
+         R = self.denominator_ring
+@@ -1600,7 +1606,7 @@ class FractionWithFactoredDenominator(RingElement):
+             (1, [(x*y + x + y - 1, 2)])
+             sage: alpha = [4, 3]
+             sage: decomp = F.asymptotic_decomposition(alpha); decomp
+-            (0, []) + (-3/2*r*(y + 1)/y - 1/2*(y + 1)/y, [(x*y + x + y - 1, 1)])
++            (0, []) + (-3/2*r*(1/y + 1) - 1/2/y - 1/2, [(x*y + x + y - 1, 1)])
+             sage: F1 = decomp[1]
+             sage: p = {y: 1/3, x: 1/2}
+             sage: asy = F1.asymptotics(p, alpha, 2, verbose=True)
+@@ -1634,7 +1640,7 @@ class FractionWithFactoredDenominator(RingElement):
+             sage: alpha = [3, 3, 2]
+             sage: decomp = F.asymptotic_decomposition(alpha); decomp
+             (0, []) +
+-            (16*r*(4*y - 3*z)/(y*z) + 16*(2*y - z)/(y*z),
++            (-16*r*(3/y - 4/z) - 16/y + 32/z,
+              [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 1)])
+             sage: F1 = decomp[1]
+             sage: p = {x: 1, y: 1, z: 1}
+diff --git a/src/sage/rings/asymptotic/term_monoid.py b/src/sage/rings/asymptotic/term_monoid.py
+index b879639..ded7f02 100644
+--- a/src/sage/rings/asymptotic/term_monoid.py
++++ b/src/sage/rings/asymptotic/term_monoid.py
+@@ -3339,7 +3339,7 @@ class ExactTerm(TermWithCoefficient):
+             sage: T(x^1234).log_term()
+             (1234*log(x),)
+             sage: T(49*x^7).log_term(base=7)
+-            (log(49)/log(7), 7/log(7)*log(x))
++            (2, 7/log(7)*log(x))
+ 
+         ::
+ 
+@@ -3347,7 +3347,7 @@ class ExactTerm(TermWithCoefficient):
+             sage: T('x * y').log_term()
+             (log(x), log(y))
+             sage: T('4 * x * y').log_term(base=2)
+-            (log(4)/log(2), 1/log(2)*log(x), 1/log(2)*log(y))
++            (2, 1/log(2)*log(x), 1/log(2)*log(y))
+ 
+         .. SEEALSO::
+ 
+diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx
+index 0b8a3bd..cdc34a2 100644
+--- a/src/sage/rings/integer.pyx
++++ b/src/sage/rings/integer.pyx
+@@ -2532,7 +2532,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
+             sage: Integer(125).log(5,prec=53)
+             3.00000000000000
+             sage: log(Integer(125))
+-            log(125)
++            3*log(5)
+ 
+         For extremely large numbers, this works::
+ 
+diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
+index 36af3a5..857081b 100644
+--- a/src/sage/rings/rational.pyx
++++ b/src/sage/rings/rational.pyx
+@@ -3075,11 +3075,11 @@ cdef class Rational(sage.structure.element.FieldElement):
+             sage: (124/345).log(5,100)
+             -0.63578895682825611710391773754
+             sage: log(QQ(125))
+-            log(125)
++            3*log(5)
+             sage: log(QQ(125), 5)
+             3
+             sage: log(QQ(125), 3)
+-            log(125)/log(3)
++            3*log(5)/log(3)
+             sage: QQ(8).log(1/2)
+             -3
+             sage: (1/8).log(1/2)
+diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py
+index 8009421..9ec892e 100644
+--- a/src/sage/schemes/elliptic_curves/ell_point.py
++++ b/src/sage/schemes/elliptic_curves/ell_point.py
+@@ -2886,7 +2886,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field):
+             sage: Q.non_archimedean_local_height(K.ideal(1-2*i))
+             0
+             sage: Q.non_archimedean_local_height()
+-            1/2*log(16)
++            2*log(2)
+ 
+         An example over the rational numbers::
+ 
+diff --git a/src/sage/symbolic/constants_c.pyx b/src/sage/symbolic/constants_c.pyx
+index 8eb61f5..38e8db6 100644
+--- a/src/sage/symbolic/constants_c.pyx
++++ b/src/sage/symbolic/constants_c.pyx
+@@ -145,14 +145,14 @@ cdef class E(Expression):
+             sage: t.operands()
+             [a]
+ 
+-        As opposed to::
++        This applies to the unit argument as well::
+ 
+             sage: u = SR(1).exp()^a; u
+             e^a
+             sage: u.operator()
+-            <built-in function pow>
++            exp
+             sage: u.operands()
+-            [e, a]
++            [a]
+ 
+         It also works with matrices (see :trac:`4735`)::
+ 
+diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
+index 94252ea..3e06201 100644
+--- a/src/sage/symbolic/expression.pyx
++++ b/src/sage/symbolic/expression.pyx
+@@ -3247,11 +3247,8 @@ cdef class Expression(CommutativeRingElement):
+             -1
+             sage: b = -x*A; c = b*b; c
+             1/4*x^2*(sqrt(5) + I*sqrt(2*sqrt(5) + 10) - 1)
+-
+-        Products of non integer powers of exp are not simplified::
+-
+             sage: exp(x)^I*exp(z)^(2.5)
+-            (e^x)^I*(e^z)^2.50000000000000
++            e^(I*x + 2.50000000000000*z)
+ 
+         ::
+ 
+@@ -3925,7 +3922,7 @@ cdef class Expression(CommutativeRingElement):
+             sage: 0^1.0
+             0.000000000000000
+             sage: exp(x)^1.0
+-            (e^x)^1.00000000000000
++            e^(1.00000000000000*x)
+         """
+         cdef Expression base, nexp
+ 
+@@ -6311,7 +6308,7 @@ cdef class Expression(CommutativeRingElement):
+             0
+         """
+         cdef Expression ss = self.coerce_in(s)
+-        return self._gobj.ldegree(ss._gobj)
++        return new_Expression_from_GEx(self._parent, GEx(self._gobj.ldegree(ss._gobj)))
+ 
+     def degree(self, s):
+         """
+@@ -6337,7 +6334,7 @@ cdef class Expression(CommutativeRingElement):
+             0
+         """
+         cdef Expression ss = self.coerce_in(s)
+-        return self._gobj.degree(ss._gobj)
++        return new_Expression_from_GEx(self._parent, GEx(self._gobj.degree(ss._gobj)))
+ 
+     def unit(self, s):
+         """
+@@ -7185,12 +7182,12 @@ cdef class Expression(CommutativeRingElement):
+             sage: f.collect(z)
+             (x^2*y^2 + 4)*z^2 + 4*x*y + 20*y^2 + (x + 21*y)*z
+ 
+-        Sometimes, we do have to call :meth:`expand()` on the
+-        expression first to achieve the desired result::
++        The terms are collected, whether the expression
++        is expanded or not::
+ 
+             sage: f = (x + y)*(x - z)
+             sage: f.collect(x)
+-            x^2 + x*y - x*z - y*z
++            x^2 + x*(y - z) - y*z
+             sage: f.expand().collect(x)
+             x^2 + x*(y - z) - y*z
+ 
+@@ -10433,9 +10430,9 @@ cdef class Expression(CommutativeRingElement):
+         ``x*log(9)`` is contracted only if ``algorithm`` is ``'all'``::
+ 
+             sage: (x*log(9)).simplify_log()
+-            x*log(9)
++            2*x*log(3)
+             sage: (x*log(9)).simplify_log('all')
+-            log(9^x)
++            log(3^(2*x))
+ 
+         TESTS:
+ 
+@@ -10550,7 +10547,7 @@ cdef class Expression(CommutativeRingElement):
+         To expand also log(3/4) use ``algorithm='all'``::
+ 
+             sage: (log(3/4*x^pi)).log_expand('all')
+-            pi*log(x) - log(4) + log(3)
++            pi*log(x) + log(3) - 2*log(2)
+ 
+         To expand only the power use ``algorithm='powers'``.::
+ 
+@@ -10573,7 +10570,7 @@ cdef class Expression(CommutativeRingElement):
+             pi*log(x) + log(3/4)
+ 
+             sage: (log(3/4*x^pi)).log_expand('all')
+-            pi*log(x) - log(4) + log(3)
++            pi*log(x) + log(3) - 2*log(2)
+ 
+             sage: (log(3/4*x^pi)).log_expand()
+             pi*log(x) + log(3/4)
+diff --git a/src/sage/tests/french_book/calculus_doctest.py b/src/sage/tests/french_book/calculus_doctest.py
+index 0d40cae..ffe5d4b 100644
+--- a/src/sage/tests/french_book/calculus_doctest.py
++++ b/src/sage/tests/french_book/calculus_doctest.py
+@@ -331,7 +331,7 @@ Sage example in ./calculus.tex, line 914::
+ Sage example in ./calculus.tex, line 929::
+ 
+     sage: v(x) = diff(u(x), x); sol = solve(v(x) == 0, x); sol
+-    [x == 100/log(100), x == 0]
++    [x == 50/log(10), x == 0]
+     sage: floor(sol[0].rhs())
+     21
+ 

Deleted: community-x86_64/sagemath-python3-notebook.patch
===================================================================
--- community-x86_64/sagemath-python3-notebook.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/sagemath-python3-notebook.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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 SageNBExport(NotebookJupyter):
-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
-@@ -281,7 +281,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 261407, sagemath/trunk/sagemath-python3-notebook.patch)
===================================================================
--- community-x86_64/sagemath-python3-notebook.patch	                        (rev 0)
+++ community-x86_64/sagemath-python3-notebook.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -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 SageNBExport(NotebookJupyter):
+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
+@@ -281,7 +281,6 @@ def have_prerequisites(debug=True):
+         True
+     """
+     try:
+-        from notebook.notebookapp import NotebookApp
+         return True
+     except ImportError:
+         if debug:
+

Deleted: community-x86_64/sagemath-threejs.patch
===================================================================
--- community-x86_64/sagemath-threejs.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/sagemath-threejs.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,11 +0,0 @@
---- a/src/sage/repl/rich_output/display_manager.py
-+++ b/src/sage/repl/rich_output/display_manager.py
-@@ -744,7 +744,7 @@ class DisplayManager(SageObject):
-         """
-         if online:
-             from sage.misc.package import installed_packages
--            version = installed_packages()['threejs']
-+            version = 'r80'
-             return """
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>

Copied: sagemath/repos/community-x86_64/sagemath-threejs.patch (from rev 261407, sagemath/trunk/sagemath-threejs.patch)
===================================================================
--- community-x86_64/sagemath-threejs.patch	                        (rev 0)
+++ community-x86_64/sagemath-threejs.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,11 @@
+--- a/src/sage/repl/rich_output/display_manager.py
++++ b/src/sage/repl/rich_output/display_manager.py
+@@ -744,7 +744,7 @@ class DisplayManager(SageObject):
+         """
+         if online:
+             from sage.misc.package import installed_packages
+-            version = installed_packages()['threejs']
++            version = 'r80'
+             return """
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>

Deleted: community-x86_64/test-optional.patch
===================================================================
--- community-x86_64/test-optional.patch	2017-10-03 21:19:14 UTC (rev 261407)
+++ community-x86_64/test-optional.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -1,25 +0,0 @@
---- src/sage/doctest/control.py.orig       2016-10-20 19:39:53.714618246 +0200
-+++ src/sage/doctest/control.py    2016-10-20 19:40:15.158049920 +0200
-@@ -307,22 +307,6 @@
-             if "all" in options.optional:
-                 # Special case to run all optional tests
-                 options.optional = True
--            else:
--                # We replace the 'optional' tag by all optional
--                # packages for which the installed version matches the
--                # latest available version (this implies in particular
--                # that the package is actually installed).
--                if 'optional' in options.optional:
--                    options.optional.discard('optional')
--                    from sage.misc.package import list_packages
--                    for pkg in list_packages('optional', local=True).values():
--                        if pkg['installed_version'] == pkg['remote_version']:
--                            options.optional.add(pkg['name'])
--
--                # Check that all tags are valid
--                for o in options.optional:
--                    if not optionaltag_regex.search(o):
--                        raise ValueError('invalid optional tag {!r}'.format(o))
- 
-         self.options = options
-         self.files = args

Copied: sagemath/repos/community-x86_64/test-optional.patch (from rev 261407, sagemath/trunk/test-optional.patch)
===================================================================
--- community-x86_64/test-optional.patch	                        (rev 0)
+++ community-x86_64/test-optional.patch	2017-10-03 21:21:11 UTC (rev 261408)
@@ -0,0 +1,25 @@
+--- src/sage/doctest/control.py.orig       2016-10-20 19:39:53.714618246 +0200
++++ src/sage/doctest/control.py    2016-10-20 19:40:15.158049920 +0200
+@@ -307,22 +307,6 @@
+             if "all" in options.optional:
+                 # Special case to run all optional tests
+                 options.optional = True
+-            else:
+-                # We replace the 'optional' tag by all optional
+-                # packages for which the installed version matches the
+-                # latest available version (this implies in particular
+-                # that the package is actually installed).
+-                if 'optional' in options.optional:
+-                    options.optional.discard('optional')
+-                    from sage.misc.package import list_packages
+-                    for pkg in list_packages('optional', local=True).values():
+-                        if pkg['installed_version'] == pkg['remote_version']:
+-                            options.optional.add(pkg['name'])
+-
+-                # Check that all tags are valid
+-                for o in options.optional:
+-                    if not optionaltag_regex.search(o):
+-                        raise ValueError('invalid optional tag {!r}'.format(o))
+ 
+         self.options = options
+         self.files = args



More information about the arch-commits mailing list