[arch-commits] Commit in sagemath-doc/trunk (12 files)

Antonio Rojas arojas at archlinux.org
Sat Jul 22 13:58:56 UTC 2017


    Date: Saturday, July 22, 2017 @ 13:58:55
  Author: arojas
Revision: 245974

Update to 8.0

Added:
  sagemath-doc/trunk/fes02.patch
  sagemath-doc/trunk/latte-count.patch
  sagemath-doc/trunk/sagemath-ecl-no-sigfpe.patch
  sagemath-doc/trunk/sagemath-sphinx-1.6.patch
Modified:
  sagemath-doc/trunk/PKGBUILD
Deleted:
  sagemath-doc/trunk/disable-fes.patch
  sagemath-doc/trunk/ecm-7.patch
  sagemath-doc/trunk/increase-rtol.patch
  sagemath-doc/trunk/is-package-installed.patch
  sagemath-doc/trunk/sagemath-planarity3.patch
  sagemath-doc/trunk/sagemath-singular-4.1.0.p2.patch
  sagemath-doc/trunk/sagemath-sphinx-1.5.patch

----------------------------------+
 PKGBUILD                         |   44 ++--
 disable-fes.patch                |   19 --
 ecm-7.patch                      |   79 --------
 fes02.patch                      |   57 ++++++
 increase-rtol.patch              |   37 ----
 is-package-installed.patch       |  328 -------------------------------------
 latte-count.patch                |   71 ++++++++
 sagemath-ecl-no-sigfpe.patch     |   12 +
 sagemath-planarity3.patch        |  113 ------------
 sagemath-singular-4.1.0.p2.patch |   33 ---
 sagemath-sphinx-1.5.patch        |  149 ----------------
 sagemath-sphinx-1.6.patch        |   69 +++++++
 12 files changed, 227 insertions(+), 784 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-07-22 13:25:46 UTC (rev 245973)
+++ PKGBUILD	2017-07-22 13:58:55 UTC (rev 245974)
@@ -3,7 +3,7 @@
 
 pkgbase=sagemath-doc
 pkgname=(sagemath-doc sagemath-src)
-pkgver=7.6
+pkgver=8.0
 pkgrel=1
 arch=(any)
 url="http://www.sagemath.org"
@@ -11,19 +11,16 @@
 makedepends=(sagemath sage-notebook python2-pyzmq python2-pillow python2-docutils tachyon
              python2-jupyter_client python2-pkgconfig cython2 thebe python2-sphinx python2-ipywidgets)
 source=("$pkgbase-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
-	package.patch disable-fes.patch docbuild_main.patch is-package-installed.patch ecm-7.patch increase-rtol.patch
-        r-no-readline.patch sagemath-planarity3.patch sagemath-singular-4.1.0.p2.patch sagemath-sphinx-1.5.patch)
-sha256sums=('e6e0729ab25446e7c922058db0eee4b0b294b32c196e34842e843ea9fae41423'
+	package.patch fes02.patch docbuild_main.patch r-no-readline.patch latte-count.patch sagemath-ecl-no-sigfpe.patch
+        sagemath-sphinx-1.6.patch)
+sha256sums=('91df3e303add71616e24b38c04789f66d57ada7b1017e5369e850c42d5e8753d'
             '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212'
-            '7ab53d30b877dabb6835fbe67a208bef65fa0aaf40221b4d0b58e4b7086bc47a'
+            'a39da083c038ada797ffc5bedc9ba47455a3f77057d42f86484ae877ef9172ea'
             '187b75d3ce202126012ff20b6316277b0a003ffdd7f15b820d3b88459d2753c8'
-            'd60fb0fbd27991ce9496ca035a54b03334b5b53f244227a8d6e13f3327ce75d2'
-            '65ad84c83d5f956fde8eab961f2caad56d64044324c4abc0e56bcd9f44061cb6'
-            'be925eefeac3f28e639794ddc20d64e6faafd7181804e29417a510224d19ccc7'
             'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf'
-            'a1c562ebe4538d672404ca3ac2e954a3c955afeb7463f7b4fe6eaa6fa74fe5c7'
-            'e1912afec58b834fac3b9161c2d5a1794bb618126c6bd7a4be85c834231360e7'
-            '0ffbccdd65ba8dfe84222e62d9e43663735d4f33276f7ec7b2e44ed53d1f24d0')
+            'c6836783251d94c00f0229c1e671de86c58c6c6fb0f6959725317817abc64ca8'
+            'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
+            '5358b4604dfab126a02bba6c9e436a5c41c66d5bc241ae3299e76ac1e9ae593d')
 
 prepare() {
   cd sage-$pkgver
@@ -31,26 +28,21 @@
 # Arch-specific patches
 # assume all optional packages are installed
   patch -p0 -i ../package.patch
-# fix regressions with ECM 7
-  patch -p1 -i ../ecm-7.patch
-# increase numerical tolerance, needed by scipy 0.18
-  patch -p1 -i ../increase-rtol.patch
 # fix freezes in R interface with readline 7 (Debian)
   patch -p1 -i ../r-no-readline.patch
-# fix build with planarity 3 (Debian)
-  patch -p2 -i ../sagemath-planarity3.patch
-# fix build with Singular 4.1.0-p2
-  patch -p0 -i ../sagemath-singular-4.1.0.p2.patch
+# use correct latte-count binary name
+  patch -p1 -i ../latte-count.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
 
 # Upstream patches
 # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
-#  patch -p0 -i ../fes02.patch
-# disable fes module, fails to build
-  patch -p0 -i ../disable-fes.patch
-# replace is_package_installed usage http://trac.sagemath.org/ticket/20377
-  patch -p1 -i ../is-package-installed.patch
-# fix doc build with sphinx 1.5 https://trac.sagemath.org/ticket/22252
-  patch -p1 -i ../sagemath-sphinx-1.5.patch
+  patch -p1 -i ../fes02.patch
+# disable SIGFPE for ecl https://trac.sagemath.org/ticket/22191
+  patch -p1 -i ../sagemath-ecl-no-sigfpe.patch
+# fix doc build with Sphinx 1.6 https://trac.sagemath.org/ticket/23023
+  patch -p1 -i ../sagemath-sphinx-1.6.patch
 
 # fix relative imports
   patch -p0 -i ../docbuild_main.patch

Deleted: disable-fes.patch
===================================================================
--- disable-fes.patch	2017-07-22 13:25:46 UTC (rev 245973)
+++ disable-fes.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -1,19 +0,0 @@
---- src/module_list.py.orig	2015-06-07 11:29:30.710612146 +0200
-+++ src/module_list.py	2015-06-07 11:30:21.877506106 +0200
-@@ -564,11 +564,11 @@
-               sources = ["sage/libs/ecl.pyx"],
-               libraries = ["ecl"]),
- 
--    OptionalExtension("sage.libs.fes",
--             ["sage/libs/fes.pyx"],
--             language = "c",
--             libraries = ['fes'],
--             package = 'fes'),
-+#    OptionalExtension("sage.libs.fes",
-+#             ["sage/libs/fes.pyx"],
-+#             language = "c",
-+#             libraries = ['fes'],
-+#             package = 'fes'),
- 
-     Extension('sage.libs.flint.flint',
-               sources = ["sage/libs/flint/flint.pyx"],

Deleted: ecm-7.patch
===================================================================
--- ecm-7.patch	2017-07-22 13:25:46 UTC (rev 245973)
+++ ecm-7.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -1,79 +0,0 @@
---- a/src/sage/interfaces/ecm.py.orig	2016-05-16 22:18:03.894827738 +0200
-+++ b/src/sage/interfaces/ecm.py	2016-05-16 22:19:14.674904932 +0200
-@@ -140,9 +140,6 @@
-         - ``ve`` -- integer `n`. Verbosely show short (`< n`
-           character) expressions on each loop
- 
--        - ``cofdec`` -- boolean. Force cofactor output in decimal
--          (even if expressions are used )
--
-         - ``B2scale`` -- integer. Multiplies the default B2 value
- 
-         - ``go`` -- integer. Preload with group order val, which can
-@@ -395,15 +392,15 @@
-             if m is not None:
-                 factor = m.group('factor')
-                 primality = m.group('primality')
--                assert primality in ['probable prime', 'composite']
--                result += [(ZZ(factor), primality == 'probable prime')]
-+                assert primality in ['prime', 'composite']
-+                result += [(ZZ(factor), primality == 'prime')]
-                 continue  # cofactor on the next line
-             m = self._found_cofactor_re.match(line)
-             if m is not None:
-                 cofactor = m.group('cofactor')
-                 primality = m.group('primality')
--                assert primality in ['Probable prime', 'Composite']
--                result += [(ZZ(cofactor), primality == 'Probable prime')]
-+                assert primality in ['Prime', 'Composite']
-+                result += [(ZZ(cofactor), primality == 'Prime')]
-                 # assert len(result) == 2
-                 return result
-         raise ValueError('failed to parse ECM output')
-@@ -501,7 +498,6 @@
-         if factor_digits is not None:
-             B1 = self.recommended_B1(factor_digits)
-         kwds['one'] = True
--        kwds['cofdec'] = True
-         cmd = self._make_cmd(B1, None, kwds)
-         out = self._run_ecm(cmd, n)
-         return self._parse_output(n, out)
-@@ -828,8 +828,8 @@
- Step 1 took 12ms
- Step 2 took 17ms
- ********** Factor found in step 2: 79792266297612017
--Found probable prime factor of 17 digits: 79792266297612017
--Probable prime cofactor 6366805760909027985741435139224233 has 34 digits
-+Found prime factor of 17 digits: 79792266297612017
-+Prime cofactor 6366805760909027985741435139224233 has 34 digits
- """
- 
- TEST_ECM_OUTPUT_2 = """
-@@ -839,8 +839,8 @@
- Step 1 took 2ms
- Step 2 took 3ms
- ********** Factor found in step 2: 179424673
--Found probable prime factor of  9 digits: 179424673
--Probable prime cofactor 179424673 has 9 digits
-+Found prime factor of  9 digits: 179424673
-+Prime cofactor 179424673 has 9 digits
- """
- 
- TEST_ECM_OUTPUT_3 = """
-@@ -858,7 +858,7 @@
- Step 1 took 5ms
- Step 2 took 4ms
- ********** Factor found in step 2: 197002597249
--Found probable prime factor of 12 digits: 197002597249
-+Found prime factor of 12 digits: 197002597249
- Composite cofactor 339872432034468861533158743041639097889948066859 has 48 digits
- """
- 
-@@ -870,5 +870,5 @@
- Step 2 took 2ms
- ********** Factor found in step 2: 265748496095531068869578877937
- Found composite factor of 30 digits: 265748496095531068869578877937
--Probable prime cofactor 251951573867253012259144010843 has 30 digits
-+Prime cofactor 251951573867253012259144010843 has 30 digits
- """
-

Added: fes02.patch
===================================================================
--- fes02.patch	                        (rev 0)
+++ fes02.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -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: increase-rtol.patch
===================================================================
--- increase-rtol.patch	2017-07-22 13:25:46 UTC (rev 245973)
+++ increase-rtol.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -1,37 +0,0 @@
-diff -ru sage-7.3.orig/src/sage/coding/code_bounds.py sage-7.3/src/sage/coding/code_bounds.py
---- sage-7.3.orig/src/sage/coding/code_bounds.py        2016-08-05 20:26:10.033204091 +0200
-+++ sage-7.3/src/sage/coding/code_bounds.py     2016-08-05 20:32:27.276579565 +0200
-@@ -554,7 +554,7 @@
-     if q < 2:   # Here we check that q is actually at least 2
-         raise ValueError("The value q must be an integer greater than 1")
- 
--    eps  = 4.5e-16 # find_root has about this as the default xtol
-+    eps  = 4.5e-15 # find_root has about this as the default xtol
-     ymax = 1 - 1/q
-     if x <= eps:
-         return 0
-diff -ru sage-7.3.orig/src/sage/numerical/optimize.py sage-7.3/src/sage/numerical/optimize.py
---- sage-7.3.orig/src/sage/numerical/optimize.py        2016-08-05 20:26:10.816536625 +0200
-+++ sage-7.3/src/sage/numerical/optimize.py     2016-08-05 20:32:21.449907130 +0200
-@@ -15,7 +15,7 @@
- from sage.rings.real_double import RDF
- 
- 
--def find_root(f, a, b, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False):
-+def find_root(f, a, b, xtol=10e-13, rtol=4.5e-15, maxiter=100, full_output=False):
-     """
-     Numerically find a root of ``f`` on the closed interval `[a,b]`
-     (or `[b,a]`) if possible, where ``f`` is a function in the one variable.
-diff -ru sage-7.3.orig/src/sage/symbolic/expression.pyx sage-7.3/src/sage/symbolic/expression.pyx
---- sage-7.3.orig/src/sage/symbolic/expression.pyx      2016-08-05 20:26:11.333202767 +0200
-+++ sage-7.3/src/sage/symbolic/expression.pyx   2016-08-05 20:32:14.236566826 +0200
-@@ -10884,7 +10884,7 @@
-             ret = ret[0]
-         return ret
- 
--    def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False):
-+    def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-15, maxiter=100, full_output=False):
-         """
-         Numerically find a root of self on the closed interval [a,b] (or
-         [b,a]) if possible, where self is a function in the one variable.
-

Deleted: is-package-installed.patch
===================================================================
--- is-package-installed.patch	2017-07-22 13:25:46 UTC (rev 245973)
+++ is-package-installed.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -1,328 +0,0 @@
-diff --git a/src/sage/databases/cremona.py b/src/sage/databases/cremona.py
-index 0a5f794..2969d92 100644
---- a/src/sage/databases/cremona.py
-+++ b/src/sage/databases/cremona.py
-@@ -53,7 +53,6 @@ from sage.misc.prandom import randint
- 
- import sage.schemes.elliptic_curves.constructor as elliptic
- from .sql_db import SQLDatabase, verify_column
--from sage.misc.package import is_package_installed
- from sage.env import SAGE_SHARE
- from sage.misc.all import walltime
- 
-@@ -824,7 +823,7 @@ class MiniCremonaDatabase(SQLDatabase):
-             if N < self.largest_conductor():
-                 message = "There is no elliptic curve with label " + label \
-                     + " in the database"
--            elif is_package_installed('database_cremona_ellcurve'):
-+            elif os.path.isfile(os.path.join(SAGE_SHARE, "cremona", "cremona.db")):
-                 message = "There is no elliptic curve with label " + label \
-                     + " in the currently available databases"
-             else:
-@@ -1673,7 +1672,7 @@ def CremonaDatabase(name=None,mini=None,set_global=None):
-     if name is None and not set_global:
-         return _db
-     if set_global and name is None:
--        if is_package_installed('database_cremona_ellcurve'):
-+        if os.path.isfile(os.path.join(SAGE_SHARE, "cremona", "cremona.db")):
-             name = 'cremona'
-         else:
-             name = 'cremona mini'
-diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py
-index b917d2a..80fb20c 100644
---- a/src/sage/game_theory/normal_form_game.py
-+++ b/src/sage/game_theory/normal_form_game.py
-@@ -614,8 +614,9 @@ from sage.rings.all import QQ
- from sage.structure.sage_object import SageObject
- from sage.matrix.constructor import matrix
- from sage.matrix.constructor import vector
--from sage.misc.package import is_package_installed
- from sage.misc.temporary_file import tmp_filename
-+import os
-+from sage.env import SAGE_LOCAL
- 
- try:
-     from gambit import Game
-@@ -1317,13 +1318,13 @@ class NormalFormGame(SageObject, MutableMapping):
-             raise ValueError("utilities have not been populated")
- 
-         if not algorithm:
--            if is_package_installed('lrslib'):
-+            if os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'lrs')):
-                 algorithm = "lrs"
-             else:
-                 algorithm = "enumeration"
- 
-         if algorithm == "lrs":
--            if not is_package_installed('lrslib'):
-+            if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'lrs')):
-                 raise NotImplementedError("lrslib is not installed")
- 
-             return self._solve_lrs(maximization)
-diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py
-index 2f58d8b..eb519a2 100644
---- a/src/sage/geometry/polyhedron/base.py
-+++ b/src/sage/geometry/polyhedron/base.py
-@@ -21,7 +21,6 @@ import six
- from sage.structure.element import Element, coerce_binop, is_Vector
- 
- from sage.misc.all import cached_method, prod
--from sage.misc.package import is_package_installed
- 
- from sage.rings.all import QQ, ZZ
- from sage.rings.real_double import RDF
-@@ -3691,7 +3690,9 @@ class Polyhedron_base(Element):
- 
-              David Avis's lrs program.
-         """
--        if not is_package_installed('lrslib'):
-+        import os
-+        from sage.env import SAGE_LOCAL
-+        if os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'lrs')) != True:
-             raise NotImplementedError('You must install the optional lrslib package '
-                                        'for this function to work')
- 
-diff --git a/src/sage/graphs/generators/classical_geometries.py b/src/sage/graphs/generators/classical_geometries.py
-index e80f2a5..04cd9ce 100644
---- a/src/sage/graphs/generators/classical_geometries.py
-+++ b/src/sage/graphs/generators/classical_geometries.py
-@@ -1287,10 +1287,9 @@ def CossidentePenttilaGraph(q):
-         raise ValueError('q(={}) must be an odd prime power'.format(q))
- 
-     from sage.libs.gap.libgap import libgap
--    from sage.misc.package import is_package_installed, PackageNotFoundError
-+    from sage.interfaces.gap import gap
- 
--    if not is_package_installed('gap_packages'):
--        raise PackageNotFoundError('gap_packages')
-+    gap.load_package("grape")
- 
-     adj_list=libgap.function_factory("""function(q)
-         local z, e, so, G, nu, G1, G0, B, T, s, O1, O2, x;
-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
-@@ -7858,7 +7858,6 @@ class GenericGraph(GenericGraph_pyx):
-            sage: abs(flow_ff-flow_igraph) < 0.00001         # optional python_igraph
-            True
-         """
--        from sage.misc.package import is_package_installed
-         self._scream_if_not_simple(allow_loops=True)
-         if vertex_bound and algorithm in ["FF", "igraph"]:
-             raise ValueError("This method does not support both " +
-@@ -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)
-diff --git a/src/sage/graphs/graph_generators.py b/src/sage/graphs/graph_generators.py
-index 5919ab3..1766796 100644
---- a/src/sage/graphs/graph_generators.py
-+++ b/src/sage/graphs/graph_generators.py
-@@ -1195,8 +1195,9 @@ class GraphGenerators():
-         .. [buckygen] \G. Brinkmann, J. Goedgebeur and B.D. McKay, Generation of Fullerenes,
-           Journal of Chemical Information and Modeling, 52(11):2910-2918, 2012.
-         """
--        from sage.misc.package import is_package_installed
--        if not is_package_installed("buckygen"):
-+        import os
-+        from sage.env import SAGE_LOCAL
-+        if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'buckygen')):
-             raise TypeError("the optional buckygen package is not installed")
- 
-         # number of vertices should be positive
-@@ -1280,8 +1281,9 @@ class GraphGenerators():
-         .. [benzene] \G. Brinkmann, G. Caporossi and P. Hansen, A Constructive Enumeration of Fusenes and Benzenoids,
-           Journal of Algorithms, 45:155-166, 2002.
-         """
--        from sage.misc.package import is_package_installed
--        if not is_package_installed("benzene"):
-+        import os
-+        from sage.env import SAGE_LOCAL
-+        if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'benzene')):
-             raise TypeError("the optional benzene package is not installed")
- 
-         # number of hexagons should be positive
-@@ -1433,8 +1435,9 @@ class GraphGenerators():
-         .. [plantri] \G. Brinkmann and B.D. McKay, Fast generation of planar graphs,
-            MATCH-Communications in Mathematical and in Computer Chemistry, 58(2):323-357, 2007.
-         """
--        from sage.misc.package import is_package_installed
--        if not is_package_installed("plantri"):
-+        import os
-+        from sage.env import SAGE_LOCAL
-+        if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'plantri')):
-             raise TypeError("the optional plantri package is not installed")
- 
-         # number of vertices should be positive
-@@ -1632,8 +1635,9 @@ class GraphGenerators():
-             sage: [g.size() for g in graphs.triangulations(6, minimum_connectivity=3)] # optional plantri
-             [12, 12]
-         """
--        from sage.misc.package import is_package_installed
--        if not is_package_installed("plantri"):
-+        import os
-+        from sage.env import SAGE_LOCAL
-+        if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'plantri')):
-             raise TypeError("the optional plantri package is not installed")
- 
-         # number of vertices should be positive
-@@ -1786,8 +1790,9 @@ class GraphGenerators():
-             sage: [len(g) for g in graphs.quadrangulations(12, no_nonfacial_quadrangles=True, dual=True)]  # optional plantri
-             [10, 10]
-         """
--        from sage.misc.package import is_package_installed
--        if not is_package_installed("plantri"):
-+        import os
-+        from sage.env import SAGE_LOCAL
-+        if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'plantri')):
-             raise TypeError("the optional plantri package is not installed")
- 
-         # number of vertices should be positive
-diff --git a/src/sage/graphs/lovasz_theta.py b/src/sage/graphs/lovasz_theta.py
-index 0d345c9..60948d2 100644
---- a/src/sage/graphs/lovasz_theta.py
-+++ b/src/sage/graphs/lovasz_theta.py
-@@ -65,10 +65,9 @@ def lovasz_theta(graph):
-     from sage.misc.temporary_file import tmp_filename
-     import os, subprocess
-     from sage.env import SAGE_LOCAL
--    from sage.misc.package import is_package_installed, PackageNotFoundError
- 
--    if not is_package_installed('csdp'):
--        raise PackageNotFoundError("csdp")
-+    if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'theta')):
-+        raise NotImplementedError("You must install csdp before using this function")
- 
-     g = graph.relabel(inplace=False, perm=range(1,n+1)).networkx_graph()
-     tf_name = tmp_filename()
-diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py
-index c801636..f43e6d9 100644
---- a/src/sage/groups/generic.py
-+++ b/src/sage/groups/generic.py
-@@ -1400,15 +1400,15 @@ def structure_description(G, latex=False):
-         sage: groups.matrix.GL(4,2).structure_description() # optional - database_gap
-         'A8'
-     """
--    import re
--    from sage.misc.package import is_package_installed
-+    import re, os
-+    from sage.env import SAGE_LOCAL
-     def correct_dihedral_degree(match):
-         return "%sD%d" % (match.group(1), int(match.group(2))/2)
- 
-     try:
-         description = str(G._gap_().StructureDescription())
-     except RuntimeError:
--        if not is_package_installed('database_gap'):
-+	if not os.path.isfile(os.path.join(SAGE_LOCAL, "lib", "gap", "small", "readsml.g")):
-             raise RuntimeError("You must install the optional database_gap package first.")
-         raise
- 
-diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py
-index e42db61..d4d5684 100644
---- a/src/sage/groups/perm_gps/permgroup.py
-+++ b/src/sage/groups/perm_gps/permgroup.py
-@@ -145,7 +145,6 @@ from sage.groups.perm_gps.permgroup_element import PermutationGroupElement, stan
- from sage.groups.abelian_gps.abelian_group import AbelianGroup
- from sage.misc.cachefunc import cached_method
- from sage.groups.class_function import ClassFunction
--from sage.misc.package import is_package_installed
- from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
- from sage.categories.all import FiniteEnumeratedSets
- from sage.groups.conjugacy_classes import ConjugacyClassGAP
-@@ -190,8 +189,6 @@ def hap_decorator(f):
-     """
-     @wraps(f)
-     def wrapped(self, n, p=0):
--        if not is_package_installed('gap_packages'):
--            raise RuntimeError("You must install the optional gap_packages package.")
-         load_hap()
-         from sage.arith.all import is_prime
-         if not (p == 0 or is_prime(p)):
-@@ -1682,9 +1679,7 @@ class PermutationGroup_generic(group.FiniteGroup):
-         try:
-             return [Integer(n) for n in self._gap_().IdGroup()]
-         except RuntimeError:
--            if not is_package_installed('database_gap'):
--                raise RuntimeError("You must install the optional database_gap package first.")
--            raise
-+            raise RuntimeError("You must install the optional gap_packages package.")
- 
-     def id(self):
-         """
-@@ -1735,9 +1730,7 @@ class PermutationGroup_generic(group.FiniteGroup):
-         try:
-             return Integer(self._gap_().PrimitiveIdentification())
-         except RuntimeError:
--            if not is_package_installed('database_gap'):
--                raise RuntimeError("You must install the optional database_gap package first.")
--            raise
-+            raise RuntimeError("You must install the optional gap_packages package.")
- 
-     def center(self):
-         """
-@@ -4113,8 +4106,6 @@ class PermutationGroup_generic(group.FiniteGroup):
-         - David Joyner and Graham Ellis
- 
-         """
--        if not is_package_installed('gap_packages'):
--            raise RuntimeError("You must install the optional gap_packages package.")
-         load_hap()
-         from sage.arith.all import is_prime
-         if not (p == 0 or is_prime(p)):
-diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py
-index 90e6985..21daeb0 100644
---- a/src/sage/misc/all.py
-+++ b/src/sage/misc/all.py
-@@ -53,10 +53,6 @@ from fpickle import pickle_function, unpickle_function
- 
- from .dist import install_scripts
- 
--from .package import (installed_packages, is_package_installed,
--        standard_packages, optional_packages, experimental_packages,
--        package_versions)
--
- from .pager import pager
- 
- lazy_import('sage.misc.sagedoc', ['browse_sage_doc',
-diff --git a/src/sage/rings/polynomial/multi_polynomial_sequence.py b/src/sage/rings/polynomial/multi_polynomial_sequence.py
-index da41cb0..49cae0b 100644
---- a/src/sage/rings/polynomial/multi_polynomial_sequence.py
-+++ b/src/sage/rings/polynomial/multi_polynomial_sequence.py
-@@ -163,7 +163,6 @@ from sage.misc.cachefunc import cached_method
- 
- from types import GeneratorType
- from sage.misc.converting_dict import KeyConvertingDict
--from sage.misc.package import is_package_installed
- 
- from sage.structure.sequence import Sequence, Sequence_generic
- 
-@@ -1433,10 +1432,11 @@ class PolynomialSequence_gf2(PolynomialSequence_generic):
- 
-         if S != []:
-             if algorithm == "exhaustive_search":
--                if not is_package_installed('fes'):
--                    from sage.misc.package import PackageNotFoundError
--                    raise PackageNotFoundError("fes")
--                from sage.libs.fes import exhaustive_search
-+                try:
-+                    from sage.libs.fes import exhaustive_search
-+                except ImportError:
-+                    raise RuntimeError("You must install the optional fes package.")
-+
-                 solutions = exhaustive_search(S, max_sols=n, verbose=verbose, **kwds)
- 
-             elif algorithm == "polybori":

Added: latte-count.patch
===================================================================
--- latte-count.patch	                        (rev 0)
+++ latte-count.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -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:

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

Deleted: sagemath-planarity3.patch
===================================================================
--- sagemath-planarity3.patch	2017-07-22 13:25:46 UTC (rev 245973)
+++ sagemath-planarity3.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -1,113 +0,0 @@
-Author: Ximin Luo <infinity0 at debian.org>
-Bug: https://trac.sagemath.org/ticket/21774
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/sage/src/sage/graphs/planarity.pyx
-+++ b/sage/src/sage/graphs/planarity.pyx
-@@ -3,13 +3,19 @@
- """
- 
- cdef extern from "planarity/graph.h":
--    ctypedef struct graphNode:
--        int v
-+    ctypedef struct vertexRec:
-         int link[2]
--    ctypedef graphNode * graphNodeP
-+        int index
-+    ctypedef vertexRec * vertexRecP
-+
-+    ctypedef struct edgeRec:
-+        int link[2]
-+        int neighbor
-+    ctypedef edgeRec * edgeRecP
- 
-     ctypedef struct BM_graph:
--        graphNodeP G
-+        vertexRecP V
-+        edgeRecP E
-         int N
-     ctypedef BM_graph * graphP
- 
-@@ -93,15 +99,16 @@
-             g._pos = { u: [0,0], v: [0,1] }
-         return (True, None) if kuratowski else True
- 
--    # create to and from mappings to relabel vertices to the set {0,...,n-1}
-+    # create to and from mappings to relabel vertices to the set {1,...,n}
-+    # (planarity 3 uses 1-based array indexing, with 0 representing NIL)
-     cdef int i
-     listto = g.vertices()
-     ffrom = {}
-     for vvv in listto:
--        ffrom[vvv] = listto.index(vvv)
-+        ffrom[vvv] = listto.index(vvv) + 1
-     to = {}
-     for i from 0 <= i < len(listto):
--        to[i] = listto[i]
-+        to[i + 1] = listto[i]
-     g.relabel(ffrom)
- 
-     cdef graphP theGraph
-@@ -125,7 +132,7 @@
-     status = gp_Embed(theGraph, EMBEDFLAGS_PLANAR)
-     gp_SortVertices(theGraph)
- 
--    # use to and from mappings to relabel vertices back from the set {0,...,n-1}
-+    # use to and from mappings to relabel vertices back from the set {1,...,n}
-     g.relabel(to)
- 
-     if status == NOTOK:
-@@ -134,12 +141,12 @@
-         # Kuratowski subgraph isolator
-         g_dict = {}
-         from sage.graphs.graph import Graph
--        for i from 0 <= i < theGraph.N:
-+        for i from 0 < i <= theGraph.N:
-             linked_list = []
--            j = theGraph.G[i].link[1]
--            while j >= theGraph.N:
--                linked_list.append(to[theGraph.G[j].v])
--                j = theGraph.G[j].link[1]
-+            j = theGraph.V[i].link[1]
-+            while j:
-+                linked_list.append(to[theGraph.E[j].neighbor])
-+                j = theGraph.E[j].link[1]
-             if len(linked_list) > 0:
-                 g_dict[to[i]] = linked_list
-         G = Graph(g_dict)
-@@ -153,12 +160,12 @@
-             if set_embedding:
-                 emb_dict = {}
-                 #for i in range(theGraph.N):
--                for i from 0 <= i < theGraph.N:
-+                for i from 0 < i <= theGraph.N:
-                     linked_list = []
--                    j = theGraph.G[i].link[1]
--                    while j >= theGraph.N:
--                        linked_list.append(to[theGraph.G[j].v])
--                        j = theGraph.G[j].link[1]
-+                    j = theGraph.V[i].link[1]
-+                    while j:
-+                        linked_list.append(to[theGraph.E[j].neighbor])
-+                        j = theGraph.E[j].link[1]
-                     emb_dict[to[i]] = linked_list
-                 g._embedding = emb_dict
-             if set_pos:
-@@ -174,12 +181,12 @@
- 
-                 emb_dict = {}
-                 #for i in range(theGraph.N):
--                for i from 0 <= i < theGraph.N:
-+                for i from 0 < i <= theGraph.N:
-                     linked_list = []
--                    j = theGraph.G[i].link[0]
--                    while j >= theGraph.N:
--                        linked_list.append(to[theGraph.G[j].v])
--                        j = theGraph.G[j].link[0]
-+                    j = theGraph.V[i].link[0]
-+                    while j:
-+                        linked_list.append(to[theGraph.E[j].neighbor])
-+                        j = theGraph.E[j].link[0]
-                     emb_dict[to[i]] = linked_list
-                 g._embedding = emb_dict
-         gp_Free(&theGraph)

Deleted: sagemath-singular-4.1.0.p2.patch
===================================================================
--- sagemath-singular-4.1.0.p2.patch	2017-07-22 13:25:46 UTC (rev 245973)
+++ sagemath-singular-4.1.0.p2.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -1,33 +0,0 @@
---- src/sage/libs/singular/decl.pxd.orig	2017-02-21 07:58:27.088118954 +0000
-+++ src/sage/libs/singular/decl.pxd	2017-02-21 07:59:01.794846500 +0000
-@@ -484,8 +484,8 @@
- 
-     ring *rDefault(int char , int nvars, char **names)
-     ring *rDefault(const n_Procs_s* cf, int nvars, char **names)
--    ring *rDefault(int ch             , int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl)
--    ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl)
-+    ring *rDefault(int ch             , int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl)
-+    ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl)
- 
- 
- 
---- src/sage/libs/singular/ring.pyx.orig	2017-02-21 07:24:23.197906897 +0000
-+++ src/sage/libs/singular/ring.pyx	2017-02-21 07:29:23.731763098 +0000
-@@ -21,7 +21,7 @@
- from sage.libs.singular.decl cimport number, poly, ring, currRing
- from sage.libs.singular.decl cimport rChangeCurrRing, rCopy0, rComplete, rDelete, idInit
- from sage.libs.singular.decl cimport omAlloc0, omStrDup, omAlloc, omAlloc0Bin,  sip_sring_bin, rnumber_bin
--from sage.libs.singular.decl cimport ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a
-+from sage.libs.singular.decl cimport ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a, rRingOrder_t
- from sage.libs.singular.decl cimport p_Copy, prCopyR
- from sage.libs.singular.decl cimport n_unknown,  n_Zp,  n_Q,   n_R,   n_GF,  n_long_R,  n_algExt,n_transExt,n_long_C,   n_Z,   n_Zn,  n_Znm,  n_Z2m,  n_CF
- from sage.libs.singular.decl cimport n_coeffType, cfInitCharProc
-@@ -165,7 +165,7 @@
-     ##         q    q : GF(q=p^n)       *names         TRUE              (todo)
- 
-     _wvhdl  = <int **>omAlloc0((nblcks + 2) * sizeof(int *))
--    _order  = <int *>omAlloc0((nblcks + 2) * sizeof(int))
-+    _order  = <rRingOrder_t *>omAlloc0((nblcks + 2) * sizeof(int))
-     _block0 = <int *>omAlloc0((nblcks + 2) * sizeof(int))
-     _block1 = <int *>omAlloc0((nblcks + 2) * sizeof(int))
- 

Deleted: sagemath-sphinx-1.5.patch
===================================================================
--- sagemath-sphinx-1.5.patch	2017-07-22 13:25:46 UTC (rev 245973)
+++ sagemath-sphinx-1.5.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -1,149 +0,0 @@
-diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py
-index 564407b..7ec52df 100644
---- a/src/doc/common/conf.py
-+++ b/src/doc/common/conf.py
-@@ -308,6 +308,7 @@ latex_elements['preamble'] = r"""
- \usepackage{amssymb}
- \usepackage{textcomp}
- \usepackage{mathrsfs}
-+\usepackage{iftex}
- 
- % Only declare unicode characters when compiling with pdftex; E.g. japanese
- % tutorial does not use pdftex
-diff --git a/src/sage/homology/simplicial_complex.py b/src/sage/homology/simplicial_complex.py
-index c110648..462d0bf 100644
---- a/src/sage/homology/simplicial_complex.py
-+++ b/src/sage/homology/simplicial_complex.py
-@@ -195,8 +195,8 @@ def lattice_paths(t1, t2, length=None):
-     :param length: if not ``None``, then an integer, the length of the desired
-         path.
-     :type length: integer or ``None``; optional, default ``None``
--    :type t1: tuple, list, other iterable
--    :type t2: tuple, list, other iterable
-+    :type t1: list, other iterable
-+    :type t2: list, other iterable
-     :return: list of lists of vertices making up the paths as described above
-     :rtype: list of lists
- 
-@@ -333,7 +333,7 @@ class Simplex(SageObject):
-     tuple of the vertices.
- 
-     :param X: set of vertices
--    :type X: integer or list, tuple, or other iterable
-+    :type X: integer, list, other iterable
-     :return: simplex with those vertices
- 
-     ``X`` may be a non-negative integer `n`, in which case the
-diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
-index c155b4e..b93e743 100644
---- a/src/sage_setup/docbuild/__init__.py
-+++ b/src/sage_setup/docbuild/__init__.py
-@@ -1578,32 +1578,6 @@ class IntersphinxCache:
-             return i
- 
- 
--def patch_domain_init():
--    """
--    Applies a monkey-patch to the __init__ method of the Domain class in
--    Sphinx, in order to work around a bug.
--
--    See https://trac.sagemath.org/ticket/21044 as well as
--    https://github.com/sphinx-doc/sphinx/pull/2816 for details about that
--    bug.
--    """
--
--    from sphinx.domains import Domain
--    import copy
--
--    orig_init = Domain.__init__
--
--    def __init__(self, *args, **kwargs):
--        orig_init(self, *args, **kwargs)
--
--        # Replace the original initial_data class attribute with a new
--        # deep-copy of itself, since the bug will cause the original
--        # initial_data to be modified in-place
--        self.__class__.initial_data = copy.deepcopy(self.initial_data)
--
--    Domain.__init__ = __init__
--
--
- def main():
-     # Parse the command-line.
-     parser = setup_parser()
-@@ -1653,8 +1627,6 @@ def main():
- 
-     ABORT_ON_ERROR = not options.keep_going
- 
--    patch_domain_init()
--
-     # Delete empty directories. This is needed in particular for empty
-     # directories due to "git checkout" which never deletes empty
-     # directories it leaves behind. See Trac #20010.
-diff --git a/src/sage_setup/docbuild/ext/multidocs.py b/src/sage_setup/docbuild/ext/multidocs.py
-index 63dbb71..47b2321 100644
---- a/src/sage_setup/docbuild/ext/multidocs.py
-+++ b/src/sage_setup/docbuild/ext/multidocs.py
-@@ -3,8 +3,6 @@
-     multi documentation in Sphinx
-     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 
--    This is a slightly hacked-up version of the Sphinx-multidoc plugin
--
-     The goal of this extension is to manage a multi documentation in Sphinx.
-     To be able to compile Sage's huge documentation in parallel, the
-     documentation is cut into a bunch of independent documentations called
-@@ -57,7 +55,7 @@ def merge_environment(app, env):
-             app.info(" %s todos, %s index, %s citations"%(
-                     len(docenv.todo_all_todos),
-                     len(docenv.indexentries),
--                    len(docenv.citations)
-+                    len(docenv.domaindata["std"]["citations"])
-                     ), nonl=1)
- 
-             # merge titles
-@@ -88,10 +86,10 @@ def merge_environment(app, env):
-                 env.metadata[ind] = md
-             # merge the citations
-             newcite = {}
--            for ind, (path, tag) in six.iteritems(docenv.citations):
-+            for ind, (path, tag) in six.iteritems(docenv.domaindata["std"]["citations"]):
-                 # TODO: Warn on conflicts
-                 newcite[ind] = (fixpath(path), tag)
--            env.citations.update(newcite)
-+            env.domaindata["std"]["citations"].update(newcite)
-             # merge the py:module indexes
-             newmodules = {}
-             for ind,(modpath,v1,v2,v3) in (
-@@ -102,9 +100,9 @@ def merge_environment(app, env):
-     app.info('... done (%s todos, %s index, %s citations, %s modules)'%(
-             len(env.todo_all_todos),
-             len(env.indexentries),
--            len(env.citations),
-+            len(env.domaindata["std"]["citations"]),
-             len(env.domaindata['py']['modules'])))
--    write_citations(app, env.citations)
-+    write_citations(app, env.domaindata["std"]["citations"])
- 
- def get_env(app, curdoc):
-     """
-@@ -146,6 +144,10 @@ def merge_js_index(app):
-             titles = app.builder.indexer._titles
-             for (res, title) in six.iteritems(index._titles):
-                 titles[fixpath(res)] = title
-+            # merge the filenames
-+            filenames = app.builder.indexer._filenames
-+            for (res, filename) in six.iteritems(index._filenames):
-+                filenames[fixpath(res)] = filename
-             # TODO: merge indexer._objtypes, indexer._objnames as well
- 
-             # Setup source symbolic links
-@@ -244,7 +246,7 @@ def fetch_citation(app, env):
-     with open(filename, 'rb') as f:
-         cache = cPickle.load(f)
-     app.builder.info("done (%s citations)."%len(cache))
--    cite = env.citations
-+    cite = env.domaindata["std"]["citations"]
-     for ind, (path, tag) in six.iteritems(cache):
-         if ind not in cite: # don't override local citation
-             cite[ind]=(os.path.join("..", path), tag)

Added: sagemath-sphinx-1.6.patch
===================================================================
--- sagemath-sphinx-1.6.patch	                        (rev 0)
+++ sagemath-sphinx-1.6.patch	2017-07-22 13:58:55 UTC (rev 245974)
@@ -0,0 +1,69 @@
+diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
+index 4315663..8618b86 100644
+--- a/src/sage_setup/docbuild/__init__.py
++++ b/src/sage_setup/docbuild/__init__.py
+@@ -770,14 +770,16 @@ class ReferenceSubBuilder(DocBuilder):
+         Returns the Sphinx environment for this project.
+         """
+         from sphinx.environment import BuildEnvironment
+-        class Foo(object):
+-            pass
+-        config = Foo()
+-        config.values = []
++        class FakeConfig(object):
++            values = tuple()
++        class FakeApp(object):
++            def __init__(self, dir):
++                self.srcdir = dir
++                self.config = FakeConfig()
+ 
+         env_pickle = os.path.join(self._doctrees_dir(), 'environment.pickle')
+         try:
+-            env = BuildEnvironment.frompickle(self.dir, config, env_pickle)
++            env = BuildEnvironment.frompickle(env_pickle, FakeApp(self.dir))
+             logger.debug("Opened Sphinx environment: %s", env_pickle)
+             return env
+         except IOError as err:
+diff --git a/src/sage_setup/docbuild/ext/multidocs.py b/src/sage_setup/docbuild/ext/multidocs.py
+index 0a5457a..371546d 100644
+--- a/src/sage_setup/docbuild/ext/multidocs.py
++++ b/src/sage_setup/docbuild/ext/multidocs.py
+@@ -86,9 +86,10 @@ def merge_environment(app, env):
+                 env.metadata[ind] = md
+             # merge the citations
+             newcite = {}
+-            for ind, (path, tag) in six.iteritems(docenv.domaindata["std"]["citations"]):
++            citations = docenv.domaindata["std"]["citations"]
++            for ind, (path, tag, lineno) in six.iteritems(docenv.domaindata["std"]["citations"]):
+                 # TODO: Warn on conflicts
+-                newcite[ind] = (fixpath(path), tag)
++                newcite[ind] = (fixpath(path), tag, lineno)
+             env.domaindata["std"]["citations"].update(newcite)
+             # merge the py:module indexes
+             newmodules = {}
+@@ -247,9 +248,10 @@ def fetch_citation(app, env):
+         cache = cPickle.load(f)
+     app.builder.info("done (%s citations)."%len(cache))
+     cite = env.domaindata["std"]["citations"]
+-    for ind, (path, tag) in six.iteritems(cache):
++    for ind, (path, tag, lineno) in six.iteritems(cache):
+         if ind not in cite: # don't override local citation
+-            cite[ind]=(os.path.join("..", path), tag)
++            cite[ind] = (os.path.join("..", path), tag, lineno)
++
+ 
+ def init_subdoc(app):
+     """
+diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py
+index c68292c..1deac3d 100644
+--- a/src/sage_setup/docbuild/sphinxbuild.py
++++ b/src/sage_setup/docbuild/sphinxbuild.py
+@@ -55,6 +55,8 @@ class SageSphinxLogger(object):
+             re.compile('WARNING: html_static_path entry .* does not exist'),
+             re.compile('WARNING: while setting up extension'),
+             re.compile('WARNING: Any IDs not assiend for figure node'),
++            re.compile('WARNING: .* is not referenced'),
++            re.compile('language "hu" not supported'),
+             )
+ 
+         # replacements: pairs of regular expressions and their replacements,



More information about the arch-commits mailing list