Skip to content

Commit

Permalink
Trac #18497: Update Sphinx to 1.4.1
Browse files Browse the repository at this point in the history
Changes: http://sphinx-doc.org/changes.html

Tarballs:
* [https://pypi.python.org/packages/source/i/imagesize/imagesize-0.7.0.t
ar.gz]
* [https://pypi.python.org/packages/source/s/snowballstemmer/snowballste
mmer-1.2.1.tar.gz]
* [https://pypi.python.org/packages/6e/65/3b15c248e4078278a7c9d45ecac2b8
7ae56f03dfb574e6ee31edea360fdd/alabaster-0.7.7.tar.gz]
* [https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.4.1.tar.gz]

URL: http://trac.sagemath.org/18497
Reported by: aapitzsch
Ticket author(s): André Apitzsch, Jeroen Demeyer
Reviewer(s): Steven Trogdon, John Palmieri
  • Loading branch information
Release Manager authored and vbraun committed Apr 27, 2016
2 parents 2e95853 + bdc3f0b commit 8a13856
Show file tree
Hide file tree
Showing 41 changed files with 206 additions and 233 deletions.
13 changes: 13 additions & 0 deletions build/pkgs/alabaster/SPKG.txt
@@ -0,0 +1,13 @@
= alabaster =

== Description ==

Alabaster is a visually (c)lean, responsive, configurable theme for the Sphinx
documentation system. It is Python 2+3 compatible.

It began as a third-party theme, and is still maintained separately, but as of
Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected
as the default theme.

Live examples of this theme can be seen on paramiko.org, fabfile.org and
pyinvoke.org.
4 changes: 4 additions & 0 deletions build/pkgs/alabaster/checksums.ini
@@ -0,0 +1,4 @@
tarball=alabaster-VERSION.tar.gz
sha1=ff3e575ee7eb4ba1721f17d91ec5a54b16283603
md5=957c665d7126dea8121f98038debcba7
cksum=738605178
5 changes: 5 additions & 0 deletions build/pkgs/alabaster/dependencies
@@ -0,0 +1,5 @@
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/alabaster/package-version.txt
@@ -0,0 +1 @@
0.7.7
3 changes: 3 additions & 0 deletions build/pkgs/alabaster/spkg-install
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
1 change: 1 addition & 0 deletions build/pkgs/alabaster/type
@@ -0,0 +1 @@
standard
5 changes: 5 additions & 0 deletions build/pkgs/imagesize/SPKG.txt
@@ -0,0 +1,5 @@
= imagesize =

== Description ==

It parses image files' header and return image size.
4 changes: 4 additions & 0 deletions build/pkgs/imagesize/checksums.ini
@@ -0,0 +1,4 @@
tarball=imagesize-VERSION.tar.gz
sha1=cf95cf234c88d5400acfa922cdc3c1f5b6a7e713
md5=23cb4b0b5ec76fb26942d6cc0b1cf31c
cksum=40173098
5 changes: 5 additions & 0 deletions build/pkgs/imagesize/dependencies
@@ -0,0 +1,5 @@
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/imagesize/package-version.txt
@@ -0,0 +1 @@
0.7.0
3 changes: 3 additions & 0 deletions build/pkgs/imagesize/spkg-install
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
1 change: 1 addition & 0 deletions build/pkgs/imagesize/type
@@ -0,0 +1 @@
standard
25 changes: 25 additions & 0 deletions build/pkgs/snowballstemmer/SPKG.txt
@@ -0,0 +1,25 @@
= snowballstemmer =

== Description ==

This package provides 16 stemmer algorithms (15 + Poerter English stemmer) generated from Snowball algorithms.

It includes following language algorithms:

Danish
Dutch
English (Standard, Porter)
Finnish
French
German
Hungarian
Italian
Norwegian
Portuguese
Romanian
Russian
Spanish
Swedish
Turkish

This is a pure Python stemming library. If PyStemmer is available, this module uses it to accelerate.
4 changes: 4 additions & 0 deletions build/pkgs/snowballstemmer/checksums.ini
@@ -0,0 +1,4 @@
tarball=snowballstemmer-VERSION.tar.gz
sha1=377be08ed935d401a53cba79319d1812cfe46b81
md5=643b019667a708a922172e33a99bf2fa
cksum=4243688392
5 changes: 5 additions & 0 deletions build/pkgs/snowballstemmer/dependencies
@@ -0,0 +1,5 @@
$(PYTHON) | pip

----------
All lines of this file are ignored except the first.
It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
1 change: 1 addition & 0 deletions build/pkgs/snowballstemmer/package-version.txt
@@ -0,0 +1 @@
1.2.1
3 changes: 3 additions & 0 deletions build/pkgs/snowballstemmer/spkg-install
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

cd src && python setup.py install
1 change: 1 addition & 0 deletions build/pkgs/snowballstemmer/type
@@ -0,0 +1 @@
standard
45 changes: 6 additions & 39 deletions build/pkgs/sphinx/SPKG.txt
Expand Up @@ -20,51 +20,18 @@ Home Page: http://sphinx.pocoo.org,
see also http://pypi.python.org/pypi/Sphinx

== Dependencies ==
* Jinja2 >= 2.2
* Pygments >= 0.8
* docutils >= 0.5
* six >= 1.4
* Jinja2 >= 2.3
* Pygments >= 2.0
* docutils >= 0.11
* snowballstemmer >= 1.1
* babel >= 1.3
* setuptools / distribute
* Python
* GNU patch (shipped with Sage)

== Special Update/Build Instructions ==

* Here is a description of patches on top of upstream Sphinx:

- patches/autodoc.patch: This patches
src/sphinx/ext/autodoc.py. This adds an option to Sphinx to
provide a function to get the argspecs of built-in functions.

- patches/environment.patch: This patches the file
src/sphinx/environment.py. Patching it should prevent Sphinx
from rebuilding documentation that is already built.

- patches/highlighting.patch: This patches the file
src/sphinx/highlighting.py. The patch should allow Sphinx to
recognize the Sage prompt "sage:" the same way it recognizes the
">>>" from Python.

- patches/inline-latex.patch: see Trac #16396 and
https://bitbucket.org/birkenfeld/sphinx/issue/1480/latex-math-output-is-broken-for-inline

- patches/pngmath.patch: This replaces \usepackage[utf8x]{inputenc}
by \usepackage[utf8]{inputenc} in the LaTeX preamble for building
images in the HTML documentation. This change is done because
some LaTeX installations have only utf8, not utf8x (utf8x adds
support for much more Unicode characters, but these are not
needed to typeset the mathematics in the Sage documentation).

- patches/Makefile.patch: This patches the file
src/sphinx/texinputs/Makefile to increase the memory sizes for
LaTeX. These increased stack sizes should be sufficient for LaTeX
to handle the huge index of the Sage reference manual when
building the PDF version of that manual.

- patches/nested.patch (submitted upstream: pull request #250, issue #777):
This changes the sphinx's customized Verbatim environment to use
\trivlist instead of \list. This fixes the pdf docbuild for
deeply nested classes/methods revealed in #9107.

* The script create_grammar_pickle.py creates the file
Grammar2.7.pickle in site-packages/Sphinx-.../sphinx/pycode/. This
helps to avoid race conditions when building the documentation in
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/sphinx/checksums.ini
@@ -1,4 +1,4 @@
tarball=Sphinx-VERSION.tar.gz
sha1=9e424b03fe1f68e0326f3905738adcf27782f677
md5=3dc73ccaa8d0bfb2d62fb671b1f7e8a4
cksum=3972992129
sha1=d18b856710b22ae9740147e21754ca5b851af9b2
md5=4c4988e0306a04cef8dccc384281e585
cksum=282370994
2 changes: 1 addition & 1 deletion build/pkgs/sphinx/dependencies
@@ -1,4 +1,4 @@
$(PYTHON) setuptools docutils jinja2 pygments
$(PYTHON) | setuptools docutils jinja2 pygments six snowballstemmer imagesize babel alabaster

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/sphinx/package-version.txt
@@ -1 +1 @@
1.2.2.p0
1.4.1.p0
59 changes: 19 additions & 40 deletions build/pkgs/sphinx/patches/Makefile.patch
@@ -1,42 +1,21 @@
diff -ur src/sphinx/texinputs/Makefile src.patched/sphinx/texinputs/Makefile
--- src/sphinx/texinputs/Makefile 2011-11-01 08:38:44.000000000 +0100
+++ src.patched/sphinx/texinputs/Makefile 2012-02-28 22:04:56.438373064 +0100
@@ -8,6 +8,7 @@
ARCHIVEPRREFIX =
# Additional LaTeX options
LATEXOPTS =
+LATEXENV = pool_size=4000000 save_size=50000 extra_mem_top=2000000
Increase the memory sizes for LaTeX

These increased stack sizes should be sufficient for LaTeX to handle the
huge index of the Sage PDF reference manual.

diff -ru a/sphinx/texinputs/Makefile b/sphinx/texinputs/Makefile
--- a/sphinx/texinputs/Makefile 2016-03-06 06:25:30.000000000 +0100
+++ b/sphinx/texinputs/Makefile 2016-04-06 19:33:07.248103397 +0200
@@ -11,8 +11,10 @@
# format: pdf or dvi
FMT = pdf

all: $(ALLPDF)
all-pdf: $(ALLPDF)
@@ -43,20 +44,20 @@
# The number of LaTeX runs is quite conservative, but I don't expect it
# to get run often, so the little extra time won't hurt.
%.dvi: %.tex
- latex $(LATEXOPTS) '$<'
- latex $(LATEXOPTS) '$<'
- latex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) latex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) latex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) latex $(LATEXOPTS) '$<'
-makeindex -s python.ist '$(basename $<).idx'
- latex $(LATEXOPTS) '$<'
- latex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) latex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) latex $(LATEXOPTS) '$<'

%.pdf: %.tex
- pdflatex $(LATEXOPTS) '$<'
- pdflatex $(LATEXOPTS) '$<'
- pdflatex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) pdflatex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) pdflatex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) pdflatex $(LATEXOPTS) '$<'
-makeindex -s python.ist '$(basename $<).idx'
- pdflatex $(LATEXOPTS) '$<'
- pdflatex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) pdflatex $(LATEXOPTS) '$<'
+ env </dev/null $(LATEXENV) pdflatex $(LATEXOPTS) '$<'
-LATEX = latex
-PDFLATEX = pdflatex
+LATEXENV = env pool_size=4000000 save_size=50000 extra_mem_top=2000000
+
+LATEX = $(LATEXENV) latex
+PDFLATEX = $(LATEXENV) pdflatex
MAKEINDEX = makeindex

clean:
rm -f *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla
all: $(ALLPDF)
44 changes: 0 additions & 44 deletions build/pkgs/sphinx/patches/autodoc.patch

This file was deleted.

6 changes: 4 additions & 2 deletions build/pkgs/sphinx/patches/environment.patch
@@ -1,11 +1,13 @@
Prevent Sphinx from rebuilding documentation that is already built

--- Sphinx-1.2.2/sphinx/environment.py.orig 2014-03-02 20:38:09.000000000 +1300
+++ Sphinx-1.2.2/sphinx/environment.py 2014-10-19 23:31:15.000000000 +1300
@@ -424,10 +424,13 @@
@@ -540,10 +540,13 @@
else:
# check if a config value was changed that affects how
# doctrees are read
+ import inspect
for key, descr in config.values.iteritems():
for key, descr in iteritems(config.values):
if descr[1] != 'env':
continue
if self.config[key] != config[key]:
Expand Down
30 changes: 23 additions & 7 deletions build/pkgs/sphinx/patches/highlighting.patch
@@ -1,11 +1,27 @@
--- Sphinx-1.2.2/sphinx/highlighting.py.orig 2014-03-02 20:38:09.000000000 +1300
+++ Sphinx-1.2.2/sphinx/highlighting.py 2014-10-19 23:32:23.000000000 +1300
@@ -167,7 +167,7 @@
Allow Sphinx to recognize the Sage prompt "sage:"
the same way it recognizes the ">>>" from Python

diff -ru a/sphinx/highlighting.py b/sphinx/highlighting.py
--- a/sphinx/highlighting.py 2016-03-28 15:16:34.000000000 +0200
+++ b/sphinx/highlighting.py 2016-04-22 22:34:29.642929758 +0200
@@ -96,15 +96,19 @@
source = source.decode()

# find out which lexer to use
if lang in ('py', 'python'):
- if source.startswith('>>>'):
+ if source.startswith('>>>') or source.startswith('sage: '):
- if lang in ('py', 'python'):
+ elif lang in ('py', 'python'):
if source.startswith('>>>'):
# interactive session
lexer = lexers['pycon']
elif not force:
+ elif source.startswith('sage: '):
+ lexer = lexers['pycon']
else:
lexer = lexers['python']
elif lang in ('py3', 'python3', 'default'):
if source.startswith('>>>'):
lexer = lexers['pycon3']
+ elif source.startswith('sage: '):
+ lexer = lexers['pycon']
else:
lexer = lexers['python3']
elif lang == 'guess':
40 changes: 0 additions & 40 deletions build/pkgs/sphinx/patches/inline-latex.patch

This file was deleted.

0 comments on commit 8a13856

Please sign in to comment.