[arch-commits] Commit in sagemath/trunk (3 files)
Antonio Rojas
arojas at archlinux.org
Fri Sep 14 20:05:31 UTC 2018
Date: Friday, September 14, 2018 @ 20:05:30
Author: arojas
Revision: 380994
Fix introspection with sphinx 1.8, fix search_doc
Added:
sagemath/trunk/sagemath-no-doc-check.patch
sagemath/trunk/sagemath-sphinx-1.8.patch
Modified:
sagemath/trunk/PKGBUILD
-----------------------------+
PKGBUILD | 14 +++++++--
sagemath-no-doc-check.patch | 61 ++++++++++++++++++++++++++++++++++++++++++
sagemath-sphinx-1.8.patch | 28 +++++++++++++++++++
3 files changed, 100 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-09-14 19:27:14 UTC (rev 380993)
+++ PKGBUILD 2018-09-14 20:05:30 UTC (rev 380994)
@@ -8,7 +8,7 @@
pkgbase=sagemath
pkgname=(sagemath sagemath-jupyter)
pkgver=8.3
-pkgrel=1
+pkgrel=2
pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
arch=(x86_64)
url="http://www.sagemath.org"
@@ -50,7 +50,9 @@
sagemath-gap-4.8.patch
sagemath-cypari2.patch
sagemath-cddlib-0.94j.patch
- sagemath-eclib-20180710.patch)
+ sagemath-eclib-20180710.patch
+ sagemath-no-doc-check.patch
+ sagemath-sphinx-1.8.patch)
sha256sums=('41fd0b4eb820f7a1274e12294b6fbdbbf60d0027bff98c22fdc84da140964929'
'f483a448c045aeff186bec4b402da8109fa12547ff36219a9aa427c2561ec8e5'
'960afe4fcbffe2762b66119b8f14355386ced0d8ee52b535d0dac1dba90d365b'
@@ -67,7 +69,9 @@
'b2c9b9695c358f868c3868790382cf7d112092184ce08f5733524d406ec20cac'
'94847fc033fd36bc59217c8484d4cf48d0640ff35bb5ca5ffba88a8158c6dd44'
'9a690bda83c280c0801f6d04353e8a909da80ccfee92e06d200ae6eb9be9a5a8'
- '182b0765d58494978bf27628bada8b42c95ef7eb2671b91ddf9c67608560c662')
+ '182b0765d58494978bf27628bada8b42c95ef7eb2671b91ddf9c67608560c662'
+ 'a10079bc1994ac99acf527f666513d7dd135615d6d9c29705f24570aa22f6852'
+ '7dd2ab94fddda8e7c2cdd5250642c4cdd00b7702815d88762fbcd68416bacaee')
prepare(){
cd sage-$pkgver
@@ -97,6 +101,10 @@
patch -p1 -i ../sagemath-gap-4.8.patch
# Fix build with eclib 20180710
patch -p1 -i ../sagemath-eclib-20180710.patch
+# don't check for doc presence in doc_search (Gentoo)
+ patch -p1 -i ../sagemath-no-doc-check.patch
+# fix introspection with sphinx 1.8
+ patch -p1 -i ../sagemath-sphinx-1.8.patch
# Upstream patches
# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
Added: sagemath-no-doc-check.patch
===================================================================
--- sagemath-no-doc-check.patch (rev 0)
+++ sagemath-no-doc-check.patch 2018-09-14 20:05:30 UTC (rev 380994)
@@ -0,0 +1,61 @@
+diff -Naur src.orig/sage/misc/sagedoc.py src/sage/misc/sagedoc.py
+--- a/src/sage/misc/sagedoc.py 2016-02-26 13:15:40.649917083 +1300
++++ b/src/sage/misc/sagedoc.py 2016-02-26 13:16:59.173122116 +1300
+@@ -838,57 +838,6 @@
+ exts = ['html']
+ title = 'Documentation'
+ base_path = SAGE_DOC
+- doc_path = SAGE_DOC_SRC
+-
+- from sage_setup.docbuild.build_options import LANGUAGES, OMIT
+- # List of languages
+- lang = LANGUAGES
+- # Documents in SAGE_DOC_SRC/LANG/ to omit
+- omit = OMIT
+-
+- # List of documents, minus the omitted ones
+- documents = []
+- for L in lang:
+- documents += [os.path.join(L, dir) for dir
+- in os.listdir(os.path.join(doc_path, L))
+- if dir not in omit]
+-
+- # Check to see if any documents are missing. This just
+- # checks to see if the appropriate output directory exists,
+- # not that it contains a complete build of the docs.
+- missing = [os.path.join(SAGE_DOC, 'html', doc)
+- for doc in documents if not
+- os.path.exists(os.path.join(SAGE_DOC, 'html', doc))]
+- num_missing = len(missing)
+- if num_missing > 0:
+- print("""Warning, the following Sage documentation hasn't been built,
+-so documentation search results may be incomplete:
+-""")
+- for s in missing:
+- print(s)
+- if num_missing > 1:
+- print("""
+-You can build these with 'sage -docbuild DOCUMENT html',
+-where DOCUMENT is one of""", end=' ')
+- for s in missing:
+- if s.find('en') != -1:
+- print("'{}',".format(os.path.split(s)[-1]), end=' ')
+- else:
+- print("'{}',".format(os.path.join(
+- os.path.split(os.path.split(s)[0])[-1],
+- os.path.split(s)[-1])), end=' ')
+- print("""
+-or you can use 'sage -docbuild all html' to build all of the missing documentation.""")
+- else:
+- s = missing[0]
+- if s.find('en') != -1:
+- s = os.path.split(s)[-1]
+- else:
+- s = os.path.join(
+- os.path.split(os.path.split(s)[0])[-1],
+- os.path.split(s)[-1])
+- print("""
+-You can build this with 'sage -docbuild {} html'.""".format(s))
+
+ strip = len(base_path)
+ results = ''
Added: sagemath-sphinx-1.8.patch
===================================================================
--- sagemath-sphinx-1.8.patch (rev 0)
+++ sagemath-sphinx-1.8.patch 2018-09-14 20:05:30 UTC (rev 380994)
@@ -0,0 +1,28 @@
+--- a/src/sage/misc/sphinxify.py 2018-09-14 20:13:32.788831484 +0200
++++ b/src/sage/misc/sphinxify.py 2018-09-14 20:14:07.142478667 +0200
+@@ -64,6 +64,7 @@
+ sage: assert n == len(sys.path)
+ """
+ srcdir = mkdtemp()
++ outdir = mkdtemp()
+ base_name = os.path.join(srcdir, 'docstring')
+ rst_name = base_name + '.rst'
+
+@@ -71,7 +72,7 @@
+ suffix = '.html'
+ else:
+ suffix = '.txt'
+- output_name = base_name + suffix
++ output_name = os.path.join(outdir, 'docstring') + suffix
+
+ with open(rst_name, 'w') as filed:
+ filed.write(docstring)
+@@ -89,7 +90,7 @@
+
+ import sys
+ old_sys_path = list(sys.path) # Sphinx modifies sys.path
+- sphinx_app = Sphinx(srcdir, confdir, srcdir, doctreedir, format,
++ sphinx_app = Sphinx(srcdir, confdir, outdir, doctreedir, format,
+ confoverrides, None, None, True)
+ sphinx_app.build(None, [rst_name])
+ sys.path = old_sys_path
More information about the arch-commits
mailing list