Date: Saturday, March 25, 2017 @ 17:42:55 Author: arojas Revision: 218968
Update to 7.6 Added: sagemath-doc/trunk/increase-rtol.patch sagemath-doc/trunk/r-no-readline.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 Modified: sagemath-doc/trunk/PKGBUILD ----------------------------------+ PKGBUILD | 45 ++++++----- increase-rtol.patch | 37 +++++++++ r-no-readline.patch | 11 ++ sagemath-planarity3.patch | 113 ++++++++++++++++++++++++++++ sagemath-singular-4.1.0.p2.patch | 33 ++++++++ sagemath-sphinx-1.5.patch | 149 +++++++++++++++++++++++++++++++++++++ 6 files changed, 370 insertions(+), 18 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-03-25 17:32:00 UTC (rev 218967) +++ PKGBUILD 2017-03-25 17:42:55 UTC (rev 218968) @@ -3,24 +3,27 @@ pkgbase=sagemath-doc pkgname=(sagemath-doc sagemath-src) -pkgver=7.5 -pkgrel=3 +pkgver=7.6 +pkgrel=1 arch=(any) url="http://www.sagemath.org" license=(GPL) -makedepends=(sagemath sage-notebook python2-pyzmq python2-pillow python2-docutils - python2-jupyter_client python2-pkgconfig cython2 thebe) # python2-sphinx -makedepends+=(python2-imagesize python2-sphinx-alabaster-theme) # remove when we can use system sphinx again +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" - "https://pypi.io/packages/source/S/Sphinx/Sphinx-1.4.9.tar.gz" - package.patch disable-fes.patch docbuild_main.patch is-package-installed.patch ecm-7.patch) -md5sums=('bff1fb8793ebc2934d14cf1efdcfbea3' - '6c7472d3630835113ee9cc251cc36c31' - 'ccfd5b1bc4796f414f1531be52504dd7' - '06a67e611d10aa2381efe1f08ea4ffd9' - 'f3bf3fa4e11e5af2bd0573cf2620e1f8' - '409b0a2c520eb33281b5f262afcb6c76' - '0c9a57d35de80c2cd418ebec912efbbb') + 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 @@ -30,6 +33,14 @@ 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 @@ -38,12 +49,11 @@ 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 -# fix thebe.js link - rm src/doc/common/themes/sage/static/thebe.js - ln -s /usr/share/thebe/thebe.js src/doc/common/themes/sage/static/thebe.js # 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 @@ -50,7 +60,6 @@ mkdir -p local-python ln -sr src/sage_setup local-python - cp -r "$srcdir"/Sphinx-1.4.9/* local-python } build() { Added: increase-rtol.patch =================================================================== --- increase-rtol.patch (rev 0) +++ increase-rtol.patch 2017-03-25 17:42:55 UTC (rev 218968) @@ -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. + Added: r-no-readline.patch =================================================================== --- r-no-readline.patch (rev 0) +++ r-no-readline.patch 2017-03-25 17:42:55 UTC (rev 218968) @@ -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, Added: sagemath-planarity3.patch =================================================================== --- sagemath-planarity3.patch (rev 0) +++ sagemath-planarity3.patch 2017-03-25 17:42:55 UTC (rev 218968) @@ -0,0 +1,113 @@ +Author: Ximin Luo <[email protected]> +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) Added: sagemath-singular-4.1.0.p2.patch =================================================================== --- sagemath-singular-4.1.0.p2.patch (rev 0) +++ sagemath-singular-4.1.0.p2.patch 2017-03-25 17:42:55 UTC (rev 218968) @@ -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)) + Added: sagemath-sphinx-1.5.patch =================================================================== --- sagemath-sphinx-1.5.patch (rev 0) +++ sagemath-sphinx-1.5.patch 2017-03-25 17:42:55 UTC (rev 218968) @@ -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)
