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

Antonio Rojas arojas at archlinux.org
Sat Mar 25 17:49:36 UTC 2017


    Date: Saturday, March 25, 2017 @ 17:49:35
  Author: arojas
Revision: 218969

archrelease: copy trunk to community-testing-any

Added:
  sagemath-doc/repos/community-testing-any/
  sagemath-doc/repos/community-testing-any/PKGBUILD
    (from rev 218968, sagemath-doc/trunk/PKGBUILD)
  sagemath-doc/repos/community-testing-any/disable-fes.patch
    (from rev 218968, sagemath-doc/trunk/disable-fes.patch)
  sagemath-doc/repos/community-testing-any/docbuild_main.patch
    (from rev 218968, sagemath-doc/trunk/docbuild_main.patch)
  sagemath-doc/repos/community-testing-any/ecm-7.patch
    (from rev 218968, sagemath-doc/trunk/ecm-7.patch)
  sagemath-doc/repos/community-testing-any/increase-rtol.patch
    (from rev 218968, sagemath-doc/trunk/increase-rtol.patch)
  sagemath-doc/repos/community-testing-any/is-package-installed.patch
    (from rev 218968, sagemath-doc/trunk/is-package-installed.patch)
  sagemath-doc/repos/community-testing-any/package.patch
    (from rev 218968, sagemath-doc/trunk/package.patch)
  sagemath-doc/repos/community-testing-any/r-no-readline.patch
    (from rev 218968, sagemath-doc/trunk/r-no-readline.patch)
  sagemath-doc/repos/community-testing-any/sagemath-planarity3.patch
    (from rev 218968, sagemath-doc/trunk/sagemath-planarity3.patch)
  sagemath-doc/repos/community-testing-any/sagemath-singular-4.1.0.p2.patch
    (from rev 218968, sagemath-doc/trunk/sagemath-singular-4.1.0.p2.patch)
  sagemath-doc/repos/community-testing-any/sagemath-sphinx-1.5.patch
    (from rev 218968, sagemath-doc/trunk/sagemath-sphinx-1.5.patch)

----------------------------------+
 PKGBUILD                         |  107 ++++++++++++
 disable-fes.patch                |   19 ++
 docbuild_main.patch              |    8 
 ecm-7.patch                      |   79 ++++++++
 increase-rtol.patch              |   37 ++++
 is-package-installed.patch       |  328 +++++++++++++++++++++++++++++++++++++
 package.patch                    |   38 ++++
 r-no-readline.patch              |   11 +
 sagemath-planarity3.patch        |  113 ++++++++++++
 sagemath-singular-4.1.0.p2.patch |   33 +++
 sagemath-sphinx-1.5.patch        |  149 ++++++++++++++++
 11 files changed, 922 insertions(+)

Copied: sagemath-doc/repos/community-testing-any/PKGBUILD (from rev 218968, sagemath-doc/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,107 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgbase=sagemath-doc
+pkgname=(sagemath-doc sagemath-src)
+pkgver=7.6
+pkgrel=1
+arch=(any)
+url="http://www.sagemath.org"
+license=(GPL)
+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'
+            '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212'
+            '7ab53d30b877dabb6835fbe67a208bef65fa0aaf40221b4d0b58e4b7086bc47a'
+            '187b75d3ce202126012ff20b6316277b0a003ffdd7f15b820d3b88459d2753c8'
+            'd60fb0fbd27991ce9496ca035a54b03334b5b53f244227a8d6e13f3327ce75d2'
+            '65ad84c83d5f956fde8eab961f2caad56d64044324c4abc0e56bcd9f44061cb6'
+            'be925eefeac3f28e639794ddc20d64e6faafd7181804e29417a510224d19ccc7'
+            'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf'
+            'a1c562ebe4538d672404ca3ac2e954a3c955afeb7463f7b4fe6eaa6fa74fe5c7'
+            'e1912afec58b834fac3b9161c2d5a1794bb618126c6bd7a4be85c834231360e7'
+            '0ffbccdd65ba8dfe84222e62d9e43663735d4f33276f7ec7b2e44ed53d1f24d0')
+
+prepare() {
+  cd sage-$pkgver
+
+# 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
+
+# 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
+
+# fix relative imports
+  patch -p0 -i ../docbuild_main.patch
+
+# use python2
+  sed -e 's|cython %s %s|cython2 %s %s|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+
+  mkdir -p local-python
+  ln -sr src/sage_setup local-python
+}
+
+build() {
+  cd sage-$pkgver/src
+
+  export SAGE_LOCAL="/usr"
+  export SAGE_SRC="$PWD"
+  export SAGE_DOC_SRC="$SAGE_SRC"/doc
+  export SAGE_DOC="$SAGE_SRC"/doc
+  export SAGE_DOC_MATHJAX=yes
+  export PYTHONPATH="/usr/lib/sage/site-packages:$srcdir/sage-$pkgver/local-python"
+  python2 sage_setup/docbuild --no-pdf-links -k all html
+}
+
+package_sagemath-doc() {
+  pkgdesc="HTML documentation and inline help for SageMath"
+  depends=(sage-notebook python2-sphinx gap-doc thebe)
+  conflicts=(sage-mathematics-doc)
+  replaces=(sage-mathematics-doc)
+
+  cd sage-$pkgver/src/doc
+ 
+  mkdir -p "$pkgdir"/usr/share/doc/sage/en
+  cp -r en/introspect "$pkgdir"/usr/share/doc/sage/en
+  cp -r common "$pkgdir"/usr/share/doc/sage
+  cp -r html "$pkgdir"/usr/share/doc/sage
+
+# Replace duplicated files by symlinks (Gentoo)
+  cd "$pkgdir"/usr/share/doc/sage
+  mv html/en/_static{,.tmp}
+  for _dir in `find -name _static` ; do
+        rm -r $_dir
+        ln -s /usr/share/doc/sage/html/en/_static $_dir
+  done
+  mv html/en/_static{.tmp,}
+}
+
+package_sagemath-src() {
+  pkgdesc="Source files for SageMath"
+  conflicts=(sage-mathematics-src)
+  replaces=(sage-mathematics-src)
+  
+  mkdir -p "$pkgdir"/usr/share/sage/source
+  cp -r sage-$pkgver/src/{sage,sage_setup} "$pkgdir"/usr/share/sage/source
+}

Copied: sagemath-doc/repos/community-testing-any/disable-fes.patch (from rev 218968, sagemath-doc/trunk/disable-fes.patch)
===================================================================
--- community-testing-any/disable-fes.patch	                        (rev 0)
+++ community-testing-any/disable-fes.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,19 @@
+--- 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"],

Copied: sagemath-doc/repos/community-testing-any/docbuild_main.patch (from rev 218968, sagemath-doc/trunk/docbuild_main.patch)
===================================================================
--- community-testing-any/docbuild_main.patch	                        (rev 0)
+++ community-testing-any/docbuild_main.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,8 @@
+--- src/sage_setup/docbuild/__main__.py.orig
++++ src/sage_setup/docbuild/__main__.py
+@@ -1,3 +1,3 @@
+-from . import main
++from sage_setup.docbuild import main
+ main()
+ 
+ # Remove old documentation

Copied: sagemath-doc/repos/community-testing-any/ecm-7.patch (from rev 218968, sagemath-doc/trunk/ecm-7.patch)
===================================================================
--- community-testing-any/ecm-7.patch	                        (rev 0)
+++ community-testing-any/ecm-7.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,79 @@
+--- 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
+ """
+

Copied: sagemath-doc/repos/community-testing-any/increase-rtol.patch (from rev 218968, sagemath-doc/trunk/increase-rtol.patch)
===================================================================
--- community-testing-any/increase-rtol.patch	                        (rev 0)
+++ community-testing-any/increase-rtol.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,37 @@
+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.
+

Copied: sagemath-doc/repos/community-testing-any/is-package-installed.patch (from rev 218968, sagemath-doc/trunk/is-package-installed.patch)
===================================================================
--- community-testing-any/is-package-installed.patch	                        (rev 0)
+++ community-testing-any/is-package-installed.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,328 @@
+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":

Copied: sagemath-doc/repos/community-testing-any/package.patch (from rev 218968, sagemath-doc/trunk/package.patch)
===================================================================
--- community-testing-any/package.patch	                        (rev 0)
+++ community-testing-any/package.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -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:

Copied: sagemath-doc/repos/community-testing-any/r-no-readline.patch (from rev 218968, sagemath-doc/trunk/r-no-readline.patch)
===================================================================
--- community-testing-any/r-no-readline.patch	                        (rev 0)
+++ community-testing-any/r-no-readline.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -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,

Copied: sagemath-doc/repos/community-testing-any/sagemath-planarity3.patch (from rev 218968, sagemath-doc/trunk/sagemath-planarity3.patch)
===================================================================
--- community-testing-any/sagemath-planarity3.patch	                        (rev 0)
+++ community-testing-any/sagemath-planarity3.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,113 @@
+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)

Copied: sagemath-doc/repos/community-testing-any/sagemath-singular-4.1.0.p2.patch (from rev 218968, sagemath-doc/trunk/sagemath-singular-4.1.0.p2.patch)
===================================================================
--- community-testing-any/sagemath-singular-4.1.0.p2.patch	                        (rev 0)
+++ community-testing-any/sagemath-singular-4.1.0.p2.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,33 @@
+--- 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))
+ 

Copied: sagemath-doc/repos/community-testing-any/sagemath-sphinx-1.5.patch (from rev 218968, sagemath-doc/trunk/sagemath-sphinx-1.5.patch)
===================================================================
--- community-testing-any/sagemath-sphinx-1.5.patch	                        (rev 0)
+++ community-testing-any/sagemath-sphinx-1.5.patch	2017-03-25 17:49:35 UTC (rev 218969)
@@ -0,0 +1,149 @@
+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)



More information about the arch-commits mailing list