Merge lp:~barry/ubuntu/natty/python-numpy/bug-664276 into lp:ubuntu/natty/python-numpy

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 15
Proposed branch: lp:~barry/ubuntu/natty/python-numpy/bug-664276
Merge into: lp:ubuntu/natty/python-numpy
Diff against target: 269 lines (+141/-40)
7 files modified
debian/changelog (+14/-0)
debian/control (+16/-16)
debian/patches/20_disable-plot-extension.patch (+81/-0)
debian/patches/series (+1/-0)
debian/rules (+5/-5)
doc/source/conf.py (+23/-18)
doc/sphinxext/tests/test_docscrape.py (+1/-1)
To merge this branch: bzr merge lp:~barry/ubuntu/natty/python-numpy/bug-664276
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+49289@code.launchpad.net

Description of the change

Re-enable numpy documentation binary package, without requiring python-matplotlib dependency.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-01-25 15:33:25 +0000
3+++ debian/changelog 2011-02-10 20:32:38 +0000
4@@ -1,3 +1,17 @@
5+python-numpy (1:1.5.1-1ubuntu2) natty; urgency=low
6+
7+ * debian/rules, debian/control:
8+ - Re-enable documentation binary package. (LP: #664276)
9+ * debian/control:
10+ - Add python-sphinx to Build-Depends since it is required to build the
11+ documentation.
12+ * debian/patches/20_disable-plot-extension.patch
13+ - Disable plot_directive extension, and catch ImportErrors when
14+ matplotlib cannot be imported, which allows us to remove
15+ python-matplotlib from dependencies.
16+
17+ -- Barry Warsaw <barry@ubuntu.com> Thu, 10 Feb 2011 15:12:43 -0500
18+
19 python-numpy (1:1.5.1-1ubuntu1) natty; urgency=low
20
21 * Merge from debian experimental (LP: #695005). Remaining changes:
22
23=== modified file 'debian/control'
24--- debian/control 2011-01-25 15:33:25 +0000
25+++ debian/control 2011-02-10 20:32:38 +0000
26@@ -4,7 +4,7 @@
27 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28 XSBC-Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
29 Uploaders: Alexandre Fayolle <afayolle@debian.org>, Matthias Klose <doko@debian.org>, Ondrej Certik <ondrej@certik.cz>, David Cournapeau <cournape@gmail.com>, Sandro Tosi <morph@debian.org>
30-Build-Depends: python-all-dev, python-all-dbg, python-support (>= 1), gfortran (>= 4:4.2), libblas-dev [!arm !m68k], liblapack-dev [!arm !m68k], debhelper (>= 7.0.50~), patchutils, python-docutils, quilt
31+Build-Depends: python-all-dev, python-all-dbg, python-support (>= 1), gfortran (>= 4:4.2), libblas-dev [!arm !m68k], liblapack-dev [!arm !m68k], debhelper (>= 7.0.50~), patchutils, python-docutils, python-sphinx, quilt
32 XS-Python-Version: >= 2.4
33 Standards-Version: 3.9.1
34 Vcs-Svn: svn://svn.debian.org/python-modules/packages/numpy/trunk
35@@ -47,18 +47,18 @@
36 .
37 This package contains the extension built for the Python debug interpreter.
38
39-#Package: python-numpy-doc
40-#Depends: ${misc:Depends}, libjs-jquery
41-#Section: doc
42-#Architecture: all
43-#Description: NumPy documentation
44-# Numpy contains a powerful N-dimensional array object, sophisticated
45-# (broadcasting) functions, tools for integrating C/C++ and Fortran
46-# code, and useful linear algebra, Fourier transform, and random number
47-# capabilities.
48-# .
49-# Numpy replaces the python-numeric and python-numarray modules which
50-# are now deprecated and shouldn't be used except to support older
51-# software.
52-# .
53-# This package contains documentation for Numpy and f2py.
54+Package: python-numpy-doc
55+Depends: ${misc:Depends}, libjs-jquery
56+Section: doc
57+Architecture: all
58+Description: NumPy documentation
59+ Numpy contains a powerful N-dimensional array object, sophisticated
60+ (broadcasting) functions, tools for integrating C/C++ and Fortran
61+ code, and useful linear algebra, Fourier transform, and random number
62+ capabilities.
63+ .
64+ Numpy replaces the python-numeric and python-numarray modules which
65+ are now deprecated and shouldn't be used except to support older
66+ software.
67+ .
68+ This package contains documentation for Numpy and f2py.
69
70=== added file 'debian/patches/20_disable-plot-extension.patch'
71--- debian/patches/20_disable-plot-extension.patch 1970-01-01 00:00:00 +0000
72+++ debian/patches/20_disable-plot-extension.patch 2011-02-10 20:32:38 +0000
73@@ -0,0 +1,81 @@
74+Description: Disable plot_directive and ignore any import errors when
75+ importing matplotlib. python-matplotlib is in universe and cannot be used
76+ as a dependency.
77+Author: Barry Warsaw <barry@ubuntu.com>
78+Bug-Ubuntu: https://launchpad.net/bugs/664276
79+=== modified file 'doc/source/conf.py'
80+--- old/doc/source/conf.py 2010-12-24 00:14:25 +0000
81++++ new/doc/source/conf.py 2011-02-10 17:23:52 +0000
82+@@ -21,7 +21,8 @@
83+ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',
84+ 'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
85+ 'sphinx.ext.doctest', 'sphinx.ext.autosummary',
86+- 'plot_directive']
87++ #'plot_directive']
88++ ]
89+
90+ # Add any paths that contain templates here, relative to this directory.
91+ templates_path = ['_templates']
92+@@ -212,7 +213,7 @@
93+ phantom_import_file = 'dump.xml'
94+
95+ # Make numpydoc to generate plots for example sections
96+-numpydoc_use_plots = True
97++numpydoc_use_plots = False
98+
99+ # -----------------------------------------------------------------------------
100+ # Autosummary
101+@@ -251,19 +252,23 @@
102+ import math
103+ phi = (math.sqrt(5) + 1)/2
104+
105+-import matplotlib
106+-matplotlib.rcParams.update({
107+- 'font.size': 8,
108+- 'axes.titlesize': 8,
109+- 'axes.labelsize': 8,
110+- 'xtick.labelsize': 8,
111+- 'ytick.labelsize': 8,
112+- 'legend.fontsize': 8,
113+- 'figure.figsize': (3*phi, 3),
114+- 'figure.subplot.bottom': 0.2,
115+- 'figure.subplot.left': 0.2,
116+- 'figure.subplot.right': 0.9,
117+- 'figure.subplot.top': 0.85,
118+- 'figure.subplot.wspace': 0.4,
119+- 'text.usetex': False,
120+-})
121++try:
122++ import matplotlib
123++except ImportError:
124++ sys.stderr.write('matplotlib is not available; disabling plots\n')
125++else:
126++ matplotlib.rcParams.update({
127++ 'font.size': 8,
128++ 'axes.titlesize': 8,
129++ 'axes.labelsize': 8,
130++ 'xtick.labelsize': 8,
131++ 'ytick.labelsize': 8,
132++ 'legend.fontsize': 8,
133++ 'figure.figsize': (3*phi, 3),
134++ 'figure.subplot.bottom': 0.2,
135++ 'figure.subplot.left': 0.2,
136++ 'figure.subplot.right': 0.9,
137++ 'figure.subplot.top': 0.85,
138++ 'figure.subplot.wspace': 0.4,
139++ 'text.usetex': False,
140++ })
141+
142+=== modified file 'doc/sphinxext/tests/test_docscrape.py'
143+--- old/doc/sphinxext/tests/test_docscrape.py 2010-12-24 00:14:25 +0000
144++++ new/doc/sphinxext/tests/test_docscrape.py 2011-02-10 17:23:52 +0000
145+@@ -559,7 +559,7 @@
146+ assert doc['Summary'][0] == u'öäöäöäöäöåååå'.encode('utf-8')
147+
148+ def test_plot_examples():
149+- cfg = dict(use_plots=True)
150++ cfg = dict(use_plots=False)
151+
152+ doc = SphinxDocString("""
153+ Examples
154+
155
156=== modified file 'debian/patches/series'
157--- debian/patches/series 2011-01-25 15:33:25 +0000
158+++ debian/patches/series 2011-02-10 20:32:38 +0000
159@@ -3,3 +3,4 @@
160 03_force_f2py_version.patch
161 #05_fix_endianness_detection.patch
162 10_use_local_python.org_object.inv_sphinx.diff
163+20_disable-plot-extension.patch
164
165=== modified file 'debian/rules'
166--- debian/rules 2011-01-25 15:33:25 +0000
167+++ debian/rules 2011-02-10 20:32:38 +0000
168@@ -63,11 +63,11 @@
169 dh_link usr/share/doc/python-numpy usr/share/doc/python-numpy-dbg
170
171 # remove extra license in doc
172- #rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_sources/license.txt
173+ rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_sources/license.txt
174
175 # use system-wide jquery
176- #rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_static/jquery.js
177- #dh_link -ppython-numpy-doc /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-numpy-doc/html/_static/jquery.js
178+ rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_static/jquery.js
179+ dh_link -ppython-numpy-doc /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-numpy-doc/html/_static/jquery.js
180
181 # create the pydist file
182 mkdir -p debian/python-numpy/usr/share/python/dist/
183@@ -110,8 +110,8 @@
184
185 build-indep:
186 # build doc only for default python version
187- #(export MPLCONFIGDIR=. ; make -C doc html PYTHONPATH=../$(PYLIBPATH))
188- #rst2html numpy/f2py/docs/usersguide/index.txt > numpy/f2py/docs/usersguide/index.html
189+ (export MPLCONFIGDIR=. ; make -C doc html PYTHONPATH=../$(PYLIBPATH))
190+ rst2html numpy/f2py/docs/usersguide/index.txt > numpy/f2py/docs/usersguide/index.html
191
192 update_intersphinx_mapping:
193 wget http://docs.python.org/dev/objects.inv -O debian/python.org_objects.inv
194
195=== modified file 'doc/source/conf.py'
196--- doc/source/conf.py 2010-12-24 00:14:25 +0000
197+++ doc/source/conf.py 2011-02-10 20:32:38 +0000
198@@ -21,7 +21,8 @@
199 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',
200 'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
201 'sphinx.ext.doctest', 'sphinx.ext.autosummary',
202- 'plot_directive']
203+ #'plot_directive']
204+ ]
205
206 # Add any paths that contain templates here, relative to this directory.
207 templates_path = ['_templates']
208@@ -212,7 +213,7 @@
209 phantom_import_file = 'dump.xml'
210
211 # Make numpydoc to generate plots for example sections
212-numpydoc_use_plots = True
213+numpydoc_use_plots = False
214
215 # -----------------------------------------------------------------------------
216 # Autosummary
217@@ -251,19 +252,23 @@
218 import math
219 phi = (math.sqrt(5) + 1)/2
220
221-import matplotlib
222-matplotlib.rcParams.update({
223- 'font.size': 8,
224- 'axes.titlesize': 8,
225- 'axes.labelsize': 8,
226- 'xtick.labelsize': 8,
227- 'ytick.labelsize': 8,
228- 'legend.fontsize': 8,
229- 'figure.figsize': (3*phi, 3),
230- 'figure.subplot.bottom': 0.2,
231- 'figure.subplot.left': 0.2,
232- 'figure.subplot.right': 0.9,
233- 'figure.subplot.top': 0.85,
234- 'figure.subplot.wspace': 0.4,
235- 'text.usetex': False,
236-})
237+try:
238+ import matplotlib
239+except ImportError:
240+ sys.stderr.write('matplotlib is not available; disabling plots\n')
241+else:
242+ matplotlib.rcParams.update({
243+ 'font.size': 8,
244+ 'axes.titlesize': 8,
245+ 'axes.labelsize': 8,
246+ 'xtick.labelsize': 8,
247+ 'ytick.labelsize': 8,
248+ 'legend.fontsize': 8,
249+ 'figure.figsize': (3*phi, 3),
250+ 'figure.subplot.bottom': 0.2,
251+ 'figure.subplot.left': 0.2,
252+ 'figure.subplot.right': 0.9,
253+ 'figure.subplot.top': 0.85,
254+ 'figure.subplot.wspace': 0.4,
255+ 'text.usetex': False,
256+ })
257
258=== modified file 'doc/sphinxext/tests/test_docscrape.py'
259--- doc/sphinxext/tests/test_docscrape.py 2010-12-24 00:14:25 +0000
260+++ doc/sphinxext/tests/test_docscrape.py 2011-02-10 20:32:38 +0000
261@@ -559,7 +559,7 @@
262 assert doc['Summary'][0] == u'öäöäöäöäöåååå'.encode('utf-8')
263
264 def test_plot_examples():
265- cfg = dict(use_plots=True)
266+ cfg = dict(use_plots=False)
267
268 doc = SphinxDocString("""
269 Examples

Subscribers

People subscribed via source and target branches

to all changes: