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
=== modified file 'debian/changelog'
--- debian/changelog 2011-01-25 15:33:25 +0000
+++ debian/changelog 2011-02-10 20:32:38 +0000
@@ -1,3 +1,17 @@
1python-numpy (1:1.5.1-1ubuntu2) natty; urgency=low
2
3 * debian/rules, debian/control:
4 - Re-enable documentation binary package. (LP: #664276)
5 * debian/control:
6 - Add python-sphinx to Build-Depends since it is required to build the
7 documentation.
8 * debian/patches/20_disable-plot-extension.patch
9 - Disable plot_directive extension, and catch ImportErrors when
10 matplotlib cannot be imported, which allows us to remove
11 python-matplotlib from dependencies.
12
13 -- Barry Warsaw <barry@ubuntu.com> Thu, 10 Feb 2011 15:12:43 -0500
14
1python-numpy (1:1.5.1-1ubuntu1) natty; urgency=low15python-numpy (1:1.5.1-1ubuntu1) natty; urgency=low
216
3 * Merge from debian experimental (LP: #695005). Remaining changes:17 * Merge from debian experimental (LP: #695005). Remaining changes:
418
=== modified file 'debian/control'
--- debian/control 2011-01-25 15:33:25 +0000
+++ debian/control 2011-02-10 20:32:38 +0000
@@ -4,7 +4,7 @@
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>5XSBC-Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
6Uploaders: 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>6Uploaders: 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>
7Build-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, quilt7Build-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
8XS-Python-Version: >= 2.48XS-Python-Version: >= 2.4
9Standards-Version: 3.9.19Standards-Version: 3.9.1
10Vcs-Svn: svn://svn.debian.org/python-modules/packages/numpy/trunk10Vcs-Svn: svn://svn.debian.org/python-modules/packages/numpy/trunk
@@ -47,18 +47,18 @@
47 .47 .
48 This package contains the extension built for the Python debug interpreter.48 This package contains the extension built for the Python debug interpreter.
4949
50#Package: python-numpy-doc50Package: python-numpy-doc
51#Depends: ${misc:Depends}, libjs-jquery51Depends: ${misc:Depends}, libjs-jquery
52#Section: doc52Section: doc
53#Architecture: all53Architecture: all
54#Description: NumPy documentation54Description: NumPy documentation
55# Numpy contains a powerful N-dimensional array object, sophisticated55 Numpy contains a powerful N-dimensional array object, sophisticated
56# (broadcasting) functions, tools for integrating C/C++ and Fortran56 (broadcasting) functions, tools for integrating C/C++ and Fortran
57# code, and useful linear algebra, Fourier transform, and random number57 code, and useful linear algebra, Fourier transform, and random number
58# capabilities.58 capabilities.
59# .59 .
60# Numpy replaces the python-numeric and python-numarray modules which60 Numpy replaces the python-numeric and python-numarray modules which
61# are now deprecated and shouldn't be used except to support older61 are now deprecated and shouldn't be used except to support older
62# software.62 software.
63# .63 .
64# This package contains documentation for Numpy and f2py.64 This package contains documentation for Numpy and f2py.
6565
=== added file 'debian/patches/20_disable-plot-extension.patch'
--- debian/patches/20_disable-plot-extension.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/20_disable-plot-extension.patch 2011-02-10 20:32:38 +0000
@@ -0,0 +1,81 @@
1Description: Disable plot_directive and ignore any import errors when
2 importing matplotlib. python-matplotlib is in universe and cannot be used
3 as a dependency.
4Author: Barry Warsaw <barry@ubuntu.com>
5Bug-Ubuntu: https://launchpad.net/bugs/664276
6=== modified file 'doc/source/conf.py'
7--- old/doc/source/conf.py 2010-12-24 00:14:25 +0000
8+++ new/doc/source/conf.py 2011-02-10 17:23:52 +0000
9@@ -21,7 +21,8 @@
10 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',
11 'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
12 'sphinx.ext.doctest', 'sphinx.ext.autosummary',
13- 'plot_directive']
14+ #'plot_directive']
15+ ]
16
17 # Add any paths that contain templates here, relative to this directory.
18 templates_path = ['_templates']
19@@ -212,7 +213,7 @@
20 phantom_import_file = 'dump.xml'
21
22 # Make numpydoc to generate plots for example sections
23-numpydoc_use_plots = True
24+numpydoc_use_plots = False
25
26 # -----------------------------------------------------------------------------
27 # Autosummary
28@@ -251,19 +252,23 @@
29 import math
30 phi = (math.sqrt(5) + 1)/2
31
32-import matplotlib
33-matplotlib.rcParams.update({
34- 'font.size': 8,
35- 'axes.titlesize': 8,
36- 'axes.labelsize': 8,
37- 'xtick.labelsize': 8,
38- 'ytick.labelsize': 8,
39- 'legend.fontsize': 8,
40- 'figure.figsize': (3*phi, 3),
41- 'figure.subplot.bottom': 0.2,
42- 'figure.subplot.left': 0.2,
43- 'figure.subplot.right': 0.9,
44- 'figure.subplot.top': 0.85,
45- 'figure.subplot.wspace': 0.4,
46- 'text.usetex': False,
47-})
48+try:
49+ import matplotlib
50+except ImportError:
51+ sys.stderr.write('matplotlib is not available; disabling plots\n')
52+else:
53+ matplotlib.rcParams.update({
54+ 'font.size': 8,
55+ 'axes.titlesize': 8,
56+ 'axes.labelsize': 8,
57+ 'xtick.labelsize': 8,
58+ 'ytick.labelsize': 8,
59+ 'legend.fontsize': 8,
60+ 'figure.figsize': (3*phi, 3),
61+ 'figure.subplot.bottom': 0.2,
62+ 'figure.subplot.left': 0.2,
63+ 'figure.subplot.right': 0.9,
64+ 'figure.subplot.top': 0.85,
65+ 'figure.subplot.wspace': 0.4,
66+ 'text.usetex': False,
67+ })
68
69=== modified file 'doc/sphinxext/tests/test_docscrape.py'
70--- old/doc/sphinxext/tests/test_docscrape.py 2010-12-24 00:14:25 +0000
71+++ new/doc/sphinxext/tests/test_docscrape.py 2011-02-10 17:23:52 +0000
72@@ -559,7 +559,7 @@
73 assert doc['Summary'][0] == u'öäöäöäöäöåååå'.encode('utf-8')
74
75 def test_plot_examples():
76- cfg = dict(use_plots=True)
77+ cfg = dict(use_plots=False)
78
79 doc = SphinxDocString("""
80 Examples
81
082
=== modified file 'debian/patches/series'
--- debian/patches/series 2011-01-25 15:33:25 +0000
+++ debian/patches/series 2011-02-10 20:32:38 +0000
@@ -3,3 +3,4 @@
303_force_f2py_version.patch303_force_f2py_version.patch
4#05_fix_endianness_detection.patch4#05_fix_endianness_detection.patch
510_use_local_python.org_object.inv_sphinx.diff510_use_local_python.org_object.inv_sphinx.diff
620_disable-plot-extension.patch
67
=== modified file 'debian/rules'
--- debian/rules 2011-01-25 15:33:25 +0000
+++ debian/rules 2011-02-10 20:32:38 +0000
@@ -63,11 +63,11 @@
63 dh_link usr/share/doc/python-numpy usr/share/doc/python-numpy-dbg63 dh_link usr/share/doc/python-numpy usr/share/doc/python-numpy-dbg
6464
65 # remove extra license in doc65 # remove extra license in doc
66 #rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_sources/license.txt66 rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_sources/license.txt
6767
68 # use system-wide jquery68 # use system-wide jquery
69 #rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_static/jquery.js69 rm -f debian/python-numpy-doc/usr/share/doc/python-numpy-doc/html/_static/jquery.js
70 #dh_link -ppython-numpy-doc /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-numpy-doc/html/_static/jquery.js70 dh_link -ppython-numpy-doc /usr/share/javascript/jquery/jquery.js /usr/share/doc/python-numpy-doc/html/_static/jquery.js
7171
72 # create the pydist file72 # create the pydist file
73 mkdir -p debian/python-numpy/usr/share/python/dist/73 mkdir -p debian/python-numpy/usr/share/python/dist/
@@ -110,8 +110,8 @@
110110
111build-indep: 111build-indep:
112 # build doc only for default python version112 # build doc only for default python version
113 #(export MPLCONFIGDIR=. ; make -C doc html PYTHONPATH=../$(PYLIBPATH))113 (export MPLCONFIGDIR=. ; make -C doc html PYTHONPATH=../$(PYLIBPATH))
114 #rst2html numpy/f2py/docs/usersguide/index.txt > numpy/f2py/docs/usersguide/index.html114 rst2html numpy/f2py/docs/usersguide/index.txt > numpy/f2py/docs/usersguide/index.html
115115
116update_intersphinx_mapping:116update_intersphinx_mapping:
117 wget http://docs.python.org/dev/objects.inv -O debian/python.org_objects.inv117 wget http://docs.python.org/dev/objects.inv -O debian/python.org_objects.inv
118118
=== modified file 'doc/source/conf.py'
--- doc/source/conf.py 2010-12-24 00:14:25 +0000
+++ doc/source/conf.py 2011-02-10 20:32:38 +0000
@@ -21,7 +21,8 @@
21extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',21extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',
22 'sphinx.ext.intersphinx', 'sphinx.ext.coverage',22 'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
23 'sphinx.ext.doctest', 'sphinx.ext.autosummary',23 'sphinx.ext.doctest', 'sphinx.ext.autosummary',
24 'plot_directive']24 #'plot_directive']
25 ]
2526
26# Add any paths that contain templates here, relative to this directory.27# Add any paths that contain templates here, relative to this directory.
27templates_path = ['_templates']28templates_path = ['_templates']
@@ -212,7 +213,7 @@
212phantom_import_file = 'dump.xml'213phantom_import_file = 'dump.xml'
213214
214# Make numpydoc to generate plots for example sections215# Make numpydoc to generate plots for example sections
215numpydoc_use_plots = True216numpydoc_use_plots = False
216217
217# -----------------------------------------------------------------------------218# -----------------------------------------------------------------------------
218# Autosummary219# Autosummary
@@ -251,19 +252,23 @@
251import math252import math
252phi = (math.sqrt(5) + 1)/2253phi = (math.sqrt(5) + 1)/2
253254
254import matplotlib255try:
255matplotlib.rcParams.update({256 import matplotlib
256 'font.size': 8,257except ImportError:
257 'axes.titlesize': 8,258 sys.stderr.write('matplotlib is not available; disabling plots\n')
258 'axes.labelsize': 8,259else:
259 'xtick.labelsize': 8,260 matplotlib.rcParams.update({
260 'ytick.labelsize': 8,261 'font.size': 8,
261 'legend.fontsize': 8,262 'axes.titlesize': 8,
262 'figure.figsize': (3*phi, 3),263 'axes.labelsize': 8,
263 'figure.subplot.bottom': 0.2,264 'xtick.labelsize': 8,
264 'figure.subplot.left': 0.2,265 'ytick.labelsize': 8,
265 'figure.subplot.right': 0.9,266 'legend.fontsize': 8,
266 'figure.subplot.top': 0.85,267 'figure.figsize': (3*phi, 3),
267 'figure.subplot.wspace': 0.4,268 'figure.subplot.bottom': 0.2,
268 'text.usetex': False,269 'figure.subplot.left': 0.2,
269})270 'figure.subplot.right': 0.9,
271 'figure.subplot.top': 0.85,
272 'figure.subplot.wspace': 0.4,
273 'text.usetex': False,
274 })
270275
=== modified file 'doc/sphinxext/tests/test_docscrape.py'
--- doc/sphinxext/tests/test_docscrape.py 2010-12-24 00:14:25 +0000
+++ doc/sphinxext/tests/test_docscrape.py 2011-02-10 20:32:38 +0000
@@ -559,7 +559,7 @@
559 assert doc['Summary'][0] == u'öäöäöäöäöåååå'.encode('utf-8')559 assert doc['Summary'][0] == u'öäöäöäöäöåååå'.encode('utf-8')
560560
561def test_plot_examples():561def test_plot_examples():
562 cfg = dict(use_plots=True)562 cfg = dict(use_plots=False)
563563
564 doc = SphinxDocString("""564 doc = SphinxDocString("""
565 Examples565 Examples

Subscribers

People subscribed via source and target branches

to all changes: