[arch-commits] Commit in sagemath-doc/trunk (PKGBUILD sagemath-sphinx4.patch)
Antonio Rojas
arojas at gemini.archlinux.org
Mon Aug 30 19:45:37 UTC 2021
Date: Monday, August 30, 2021 @ 19:45:36
Author: arojas
Revision: 1010067
Update to 9.4
Modified:
sagemath-doc/trunk/PKGBUILD
Deleted:
sagemath-doc/trunk/sagemath-sphinx4.patch
------------------------+
PKGBUILD | 14 +---
sagemath-sphinx4.patch | 148 -----------------------------------------------
2 files changed, 5 insertions(+), 157 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-08-30 19:33:51 UTC (rev 1010066)
+++ PKGBUILD 2021-08-30 19:45:36 UTC (rev 1010067)
@@ -1,25 +1,21 @@
# Maintainer: Antonio Rojas <arojas at archlinux.org>
pkgname=sagemath-doc
-pkgver=9.3
+pkgver=9.4
pkgrel=1
-pkgdesc="HTML documentation for SageMath"
+pkgdesc='HTML documentation for SageMath'
arch=(any)
-url="http://www.sagemath.org"
+url='http://www.sagemath.org'
license=(GPL)
depends=(gap-doc python-pplpy)
makedepends=(sagemath python-pyzmq python-docutils python-jupyter_client python-pkgconfig cython python-ipywidgets thebe)
-source=(https://github.com/sagemath/sage/archive/$pkgver/sagemath-$pkgver.tar.gz
- sagemath-sphinx4.patch)
-sha256sums=('d3b104a83e140cda563ae0b44fa3ec2b3545660f120fab78dde6ceb5fb1ed991'
- '5a1b6dff6d855c7e21ec7969809b719988e05e9eab77f230fef370cccff28d45')
+source=(https://github.com/sagemath/sage/archive/$pkgver/sagemath-$pkgver.tar.gz)
+sha256sums=('47190f37e679c2483dadc13112595bacb399dfe4c4a0cde18d3627f5b2db0ea5')
options=(!strip) # nothing to strip, save packaging time
prepare() {
cd sage-$pkgver
- patch -p1 < ../sagemath-sphinx4.patch # Fix build with Sphinx 4
-
SAGE_ROOT="$PWD" PATH="$PWD/build/bin:$PATH" src/doc/bootstrap
rm -r src/sage # Use the installed sage, not the one from the source tree
}
Deleted: sagemath-sphinx4.patch
===================================================================
--- sagemath-sphinx4.patch 2021-08-30 19:33:51 UTC (rev 1010066)
+++ sagemath-sphinx4.patch 2021-08-30 19:45:36 UTC (rev 1010067)
@@ -1,148 +0,0 @@
-diff --git a/src/doc/en/reference/combinat/module_list.rst b/src/doc/en/reference/combinat/module_list.rst
-index a95069590b..f8bfe88c71 100644
---- a/src/doc/en/reference/combinat/module_list.rst
-+++ b/src/doc/en/reference/combinat/module_list.rst
-@@ -364,7 +364,6 @@ Comprehensive Module list
- sage/combinat/superpartition
- sage/combinat/symmetric_group_algebra
- sage/combinat/symmetric_group_representations
-- sage/combinat/super_tableau
- sage/combinat/tableau
- sage/combinat/tableau_residues
- sage/combinat/tableau_tuple
-diff --git a/src/doc/en/reference/modfrm/index.rst b/src/doc/en/reference/modfrm/index.rst
-index e1f8a483a3..3d5e55dfd6 100644
---- a/src/doc/en/reference/modfrm/index.rst
-+++ b/src/doc/en/reference/modfrm/index.rst
-@@ -23,7 +23,6 @@ Module List
- sage/modular/modform/hecke_operator_on_qexp
- sage/modular/modform/numerical
- sage/modular/modform/vm_basis
-- sage/modular/modform/ambient
- sage/modular/modform/half_integral
- sage/modular/modform/find_generators
- sage/modular/modform/j_invariant
-diff --git a/src/sage_docbuild/ext/sage_autodoc.py b/src/sage_docbuild/ext/sage_autodoc.py
-index ac9f8538bc..c4523f2a53 100644
---- a/src/sage_docbuild/ext/sage_autodoc.py
-+++ b/src/sage_docbuild/ext/sage_autodoc.py
-@@ -34,13 +34,12 @@ import sys
- from docutils.statemachine import ViewList
-
- import sphinx
--from sphinx.ext.autodoc import mock
-+from sphinx.ext.autodoc import mock, ObjectMember
- from sphinx.ext.autodoc.importer import import_object, get_object_members, get_module_members
- from sphinx.locale import _, __
- from sphinx.pycode import ModuleAnalyzer
- from sphinx.errors import PycodeError
- from sphinx.util import logging
--from sphinx.util import rpartition, force_decode
- from sphinx.util.docstrings import prepare_docstring
- from sphinx.util.inspect import isdescriptor, \
- safe_getattr, object_description, is_builtin_class_method, \
-@@ -488,10 +487,7 @@ class Documenter(object):
- # make sure we have Unicode docstrings, then sanitize and split
- # into lines
- if isinstance(docstring, str):
-- return [prepare_docstring(docstring, ignore)]
-- elif isinstance(docstring, str): # this will not trigger on Py3
-- return [prepare_docstring(force_decode(docstring, encoding),
-- ignore)]
-+ return [prepare_docstring(docstring)]
- # ... else it is something strange, let's ignore it
- return []
-
-@@ -536,7 +532,7 @@ class Documenter(object):
-
- # add content from docstrings
- if not no_docstring:
-- encoding = self.analyzer and self.analyzer._encoding
-+ encoding = self.analyzer
- docstrings = self.get_doc(encoding)
- if not docstrings:
- # append at least a dummy docstring, so that the event
-@@ -876,13 +872,42 @@ class ModuleDocumenter(Documenter):
- if self.options.deprecated:
- self.add_line(u' :deprecated:', sourcename)
-
-+ def get_module_members(self):
-+ """Get members of target module."""
-+ if self.analyzer:
-+ attr_docs = self.analyzer.attr_docs
-+ else:
-+ attr_docs = {}
-+
-+ members = {} # type: Dict[str, ObjectMember]
-+ for name in dir(self.object):
-+ try:
-+ value = safe_getattr(self.object, name, None)
-+ docstring = attr_docs.get(('', name), [])
-+ members[name] = ObjectMember(name, value, docstring="\n".join(docstring))
-+ except AttributeError:
-+ continue
-+
-+ # annotation only member (ex. attr: int)
-+ try:
-+ for name in inspect.getannotations(self.object):
-+ if name not in members:
-+ docstring = attr_docs.get(('', name), [])
-+ members[name] = ObjectMember(name, INSTANCEATTR,
-+ docstring="\n".join(docstring))
-+ except AttributeError:
-+ pass
-+
-+ return members
-+
- def get_object_members(self, want_all):
- # type: (bool) -> Tuple[bool, List[Tuple[unicode, object]]]
-+ members = self.get_module_members()
- if want_all:
- if not hasattr(self.object, '__all__'):
- # for implicit module members, check __module__ to avoid
- # documenting imported objects
-- return True, get_module_members(self.object)
-+ return True, list(members.values())
- else:
- memberlist = self.object.__all__
- # Sometimes __all__ is broken...
-@@ -893,14 +918,14 @@ class ModuleDocumenter(Documenter):
- '(in module %s) -- ignoring __all__' %
- (memberlist, self.fullname))
- # fall back to all members
-- return True, get_module_members(self.object)
-+ return True, list(members.values())
- else:
- memberlist = self.options.members or []
- ret = []
- for mname in memberlist:
-- try:
-- ret.append((mname, safe_getattr(self.object, mname)))
-- except AttributeError:
-+ if mname in members:
-+ ret.append(members[mname])
-+ else:
- logger.warning(
- 'missing attribute mentioned in :members: or __all__: '
- 'module %s, attribute %s' %
-@@ -951,7 +976,7 @@ class ClassLevelDocumenter(Documenter):
- # ... if still None, there's no way to know
- if mod_cls is None:
- return None, []
-- modname, cls = rpartition(mod_cls, '.') # type: ignore
-+ modname, _, cls = mod_cls.rpartition('.') # type: ignore
- parents = [cls]
- # if the module name is still missing, get it like above
- if not modname:
-@@ -1275,10 +1300,7 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):
- doc = []
- for docstring in docstrings:
- if isinstance(docstring, str):
-- doc.append(prepare_docstring(docstring, ignore))
-- elif isinstance(docstring, str): # this will not trigger on Py3
-- doc.append(prepare_docstring(force_decode(docstring, encoding),
-- ignore))
-+ doc.append(prepare_docstring(docstring))
- return doc
-
- def add_content(self, more_content, no_docstring=False):
More information about the arch-commits
mailing list