[arch-commits] Commit in sagemath-doc/repos (9 files)
Antonio Rojas
arojas at archlinux.org
Sat Jul 22 14:00:03 UTC 2017
Date: Saturday, July 22, 2017 @ 14:00:03
Author: arojas
Revision: 245975
archrelease: copy trunk to community-testing-any
Added:
sagemath-doc/repos/community-testing-any/
sagemath-doc/repos/community-testing-any/PKGBUILD
(from rev 245974, sagemath-doc/trunk/PKGBUILD)
sagemath-doc/repos/community-testing-any/docbuild_main.patch
(from rev 245974, sagemath-doc/trunk/docbuild_main.patch)
sagemath-doc/repos/community-testing-any/fes02.patch
(from rev 245974, sagemath-doc/trunk/fes02.patch)
sagemath-doc/repos/community-testing-any/latte-count.patch
(from rev 245974, sagemath-doc/trunk/latte-count.patch)
sagemath-doc/repos/community-testing-any/package.patch
(from rev 245974, sagemath-doc/trunk/package.patch)
sagemath-doc/repos/community-testing-any/r-no-readline.patch
(from rev 245974, sagemath-doc/trunk/r-no-readline.patch)
sagemath-doc/repos/community-testing-any/sagemath-ecl-no-sigfpe.patch
(from rev 245974, sagemath-doc/trunk/sagemath-ecl-no-sigfpe.patch)
sagemath-doc/repos/community-testing-any/sagemath-sphinx-1.6.patch
(from rev 245974, sagemath-doc/trunk/sagemath-sphinx-1.6.patch)
------------------------------+
PKGBUILD | 99 +++++++++++++++++++++++++++++++++++++++++
docbuild_main.patch | 8 +++
fes02.patch | 57 +++++++++++++++++++++++
latte-count.patch | 71 +++++++++++++++++++++++++++++
package.patch | 38 +++++++++++++++
r-no-readline.patch | 11 ++++
sagemath-ecl-no-sigfpe.patch | 12 ++++
sagemath-sphinx-1.6.patch | 69 ++++++++++++++++++++++++++++
8 files changed, 365 insertions(+)
Copied: sagemath-doc/repos/community-testing-any/PKGBUILD (from rev 245974, sagemath-doc/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2017-07-22 14:00:03 UTC (rev 245975)
@@ -0,0 +1,99 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+
+pkgbase=sagemath-doc
+pkgname=(sagemath-doc sagemath-src)
+pkgver=8.0
+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 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'
+ 'a39da083c038ada797ffc5bedc9ba47455a3f77057d42f86484ae877ef9172ea'
+ '187b75d3ce202126012ff20b6316277b0a003ffdd7f15b820d3b88459d2753c8'
+ 'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf'
+ 'c6836783251d94c00f0229c1e671de86c58c6c6fb0f6959725317817abc64ca8'
+ 'c31809f887bf9acc45c5bd9dd30bb93e73601d3efbf3016594c3c1d241731c8a'
+ '5358b4604dfab126a02bba6c9e436a5c41c66d5bc241ae3299e76ac1e9ae593d')
+
+prepare() {
+ cd sage-$pkgver
+
+# Arch-specific patches
+# assume all optional packages are installed
+ patch -p0 -i ../package.patch
+# fix freezes in R interface with readline 7 (Debian)
+ patch -p1 -i ../r-no-readline.patch
+# use correct latte-count binary name
+ patch -p1 -i ../latte-count.patch
+# 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 -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
+
+# 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/docbuild_main.patch (from rev 245974, sagemath-doc/trunk/docbuild_main.patch)
===================================================================
--- community-testing-any/docbuild_main.patch (rev 0)
+++ community-testing-any/docbuild_main.patch 2017-07-22 14:00:03 UTC (rev 245975)
@@ -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/fes02.patch (from rev 245974, sagemath-doc/trunk/fes02.patch)
===================================================================
--- community-testing-any/fes02.patch (rev 0)
+++ community-testing-any/fes02.patch 2017-07-22 14:00:03 UTC (rev 245975)
@@ -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
+
Copied: sagemath-doc/repos/community-testing-any/latte-count.patch (from rev 245974, sagemath-doc/trunk/latte-count.patch)
===================================================================
--- community-testing-any/latte-count.patch (rev 0)
+++ community-testing-any/latte-count.patch 2017-07-22 14:00:03 UTC (rev 245975)
@@ -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:
Copied: sagemath-doc/repos/community-testing-any/package.patch (from rev 245974, sagemath-doc/trunk/package.patch)
===================================================================
--- community-testing-any/package.patch (rev 0)
+++ community-testing-any/package.patch 2017-07-22 14:00:03 UTC (rev 245975)
@@ -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 245974, sagemath-doc/trunk/r-no-readline.patch)
===================================================================
--- community-testing-any/r-no-readline.patch (rev 0)
+++ community-testing-any/r-no-readline.patch 2017-07-22 14:00:03 UTC (rev 245975)
@@ -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-ecl-no-sigfpe.patch (from rev 245974, sagemath-doc/trunk/sagemath-ecl-no-sigfpe.patch)
===================================================================
--- community-testing-any/sagemath-ecl-no-sigfpe.patch (rev 0)
+++ community-testing-any/sagemath-ecl-no-sigfpe.patch 2017-07-22 14:00:03 UTC (rev 245975)
@@ -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:
Copied: sagemath-doc/repos/community-testing-any/sagemath-sphinx-1.6.patch (from rev 245974, sagemath-doc/trunk/sagemath-sphinx-1.6.patch)
===================================================================
--- community-testing-any/sagemath-sphinx-1.6.patch (rev 0)
+++ community-testing-any/sagemath-sphinx-1.6.patch 2017-07-22 14:00:03 UTC (rev 245975)
@@ -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