#9221: update matplotlib to 1.0.0 and clean out the patches
----------------------------------------------------------+-----------------
Reporter: jason | Owner:
jason, was
Type: enhancement | Status:
closed
Priority: major | Milestone:
sage-4.6
Component: graphics | Resolution:
fixed
Keywords: | Author:
Jason Grout
Upstream: Fixed upstream, but not in a stable release. | Reviewer:
David Kirkby, Karl-Dieter Crisman
Merged: sage-4.6.alpha3 | Work_issues:
----------------------------------------------------------+-----------------
Comment(by leif):
I'm not the release manager, but '''IMHO''' either this ticket '''needs
work''', or #6235 / #9210? should be blockers for Sage 4.6, since
* installing Sage 4.6.alpha3 / matplotlib 1.0.0 breaks other Sage
installations (cf. doctest errors in {{{sage/plot/plot.py}}} below, which
even occur after rebuilding e.g. Sage 4.5.3 from scratch),
* the current spkg / alpha3 '''again''' breaks upgrading (cf. #9896) if
the original Sage installation has been moved (copied / renamed), which
apparently is common user practice.
Unless one e.g. deletes {{{$HOME/.matplotlib/}}}, the following happens
with '''other''' Sage installations (and perhaps other software):
{{{
sage -t -long "devel/sage/sage/plot/plot.py"
**********************************************************************
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/devel/sage/sage/plot/plot.py", line 210:
sage: P # show the result
Exception raised:
Traceback (most recent call last):
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_0[55]>", line 1, in <module>
P # show the result###line 210:
sage: P # show the result
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/sage/misc/displayhook.py", line 174,
in displayhook
print_obj(sys.stdout, obj)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/sage/misc/displayhook.py", line 142,
in print_obj
print >>out_stream, `obj`
File "sage_object.pyx", line 101, in
sage.structure.sage_object.SageObject.__repr__
(sage/structure/sage_object.c:1370)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/sage/plot/plot.py", line 915, in
_repr_
self.show()
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/sage/plot/plot.py", line 1437, in
show
self.save(DOCTEST_MODE_FILE, **options)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/sage/plot/plot.py", line 1973, in
save
figure.savefig(filename,dpi=dpi,bbox_inches='tight',**options)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/figure.py", line 1032, in
savefig
self.canvas.print_figure(*args, **kwargs)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/backend_bases.py", line
1455, in print_figure
**kwargs)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/backends/backend_agg.py",
line 358, in print_png
FigureCanvasAgg.draw(self)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/backends/backend_agg.py",
line 314, in draw
self.figure.draw(self.renderer)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/figure.py", line 773, in
draw
for a in self.axes: a.draw(renderer)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/artist.py", line 46, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/axes.py", line 1735, in
draw
a.draw(renderer)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/text.py", line 518, in
draw
bbox, info = self._get_layout(renderer)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/text.py", line 280, in
_get_layout
clean_line, self._fontproperties, ismath=ismath)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/backends/backend_agg.py",
line 156, in get_text_width_height_descent
self.mathtext_parser.parse(s, self.dpi, prop)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/mathtext.py", line 2797,
in parse
font_output = fontset_class(prop, backend)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/mathtext.py", line 658,
in __init__
self._stix_fallback = StixFonts(*args, **kwargs)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/mathtext.py", line 900,
in __init__
fullpath = findfont(name)
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python/site-packages/matplotlib/font_manager.py", line
1306, in findfont
if not os.path.exists(font):
File "/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/lib/python2.6/genericpath.py", line 18, in exists
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, dict found
**********************************************************************
...
[same exception in other examples]
...
**********************************************************************
5 items had failures:
1 of 71 in __main__.example_0
1 of 7 in __main__.example_13
1 of 8 in __main__.example_14
1 of 45 in __main__.example_30
1 of 89 in __main__.example_43
***Test Failed*** 5 failures.
For whitespace errors, see the file /home/leif/.sage//tmp/.doctest_plot.py
}}}
When trying to upgrade to 4.6.alpha3 in a ''renamed'' directory,
installing matplotlib 1.0.0 fails with
{{{
...
running build_ext
building 'matplotlib.ft2font' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/src
creating build/temp.linux-x86_64-2.6/CXX
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -march=native -O3 -fno-
strict-aliasing -fomit-frame-pointer -DHONORS_CFLAGS -march=native -O3
-DHONORS_CPPFLAGS -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
-DPYCXX_ISO_CPP_LIB=1
-I/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/lib/python2.6
/site-packages/numpy/core/include
-I/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-to-
rename/local/include/freetype2 -I/home/leif/Sage/sage-4.5.3-for-4.6.alpha3
-to-rename/local/include
-I/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/include -I.
-I/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/include/python2.6
-c src/ft2font.cpp -o build/temp.linux-x86_64-2.6/src/ft2font.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
In file included from
/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/include/python2.6/Python.h:8,
from ./CXX/WrapPython.h:47,
from ./CXX/Extensions.hxx:37,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/include/python2.6/pyconfig.h:1028:1:
warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/sys/time.h:23,
from ./CXX/WrapPython.h:43,
from ./CXX/Extensions.hxx:37,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
/usr/include/features.h:158:1: warning: this is the location of the
previous definition
In file included from
/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/include/python2.6/Python.h:8,
from ./CXX/WrapPython.h:47,
from ./CXX/Extensions.hxx:37,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/include/python2.6/pyconfig.h:1037:1:
warning: "_XOPEN_SOURCE" redefined
In file included from /usr/include/sys/time.h:23,
from ./CXX/WrapPython.h:43,
from ./CXX/Extensions.hxx:37,
from src/ft2font.h:4,
from src/ft2font.cpp:1:
/usr/include/features.h:160:1: warning: this is the location of the
previous definition
In file included from src/ft2font.h:14,
from src/ft2font.cpp:1:
/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/include/ft2build.h:56:38:
error: freetype/config/ftheader.h: No such file or directory
In file included from src/ft2font.cpp:1:
src/ft2font.h:15:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:16:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:17:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:18:10: error: #include expects "FILENAME" or <FILENAME>
src/ft2font.h:19:10: error: #include expects "FILENAME" or <FILENAME>
In file included from src/ft2font.cpp:1:
src/ft2font.h:33: error: 'FT_Bitmap' has not been declared
src/ft2font.h:33: error: 'FT_Int' has not been declared
src/ft2font.h:33: error: 'FT_Int' has not been declared
src/ft2font.h:89: error: ISO C++ forbids declaration of 'FT_Face' with no
type
src/ft2font.h:89: error: expected ',' or '...' before '&' token
src/ft2font.h:95: error: ISO C++ forbids declaration of 'FT_Face' with no
type
src/ft2font.h:95: error: expected ',' or '...' before '&' token
src/ft2font.h:137: error: 'FT_Face' does not name a type
src/ft2font.h:138: error: 'FT_Matrix' does not name a type
src/ft2font.h:139: error: 'FT_Vector' does not name a type
src/ft2font.h:140: error: 'FT_Error' does not name a type
src/ft2font.h:141: error: 'FT_Glyph' was not declared in this scope
src/ft2font.h:141: error: template argument 1 is invalid
src/ft2font.h:141: error: template argument 2 is invalid
src/ft2font.h:142: error: 'FT_Vector' was not declared in this scope
src/ft2font.h:142: error: template argument 1 is invalid
src/ft2font.h:142: error: template argument 2 is invalid
src/ft2font.h:148: error: 'FT_BBox' does not name a type
src/ft2font.cpp:45: error: 'FT_Library' does not name a type
src/ft2font.cpp:108: error: variable or field 'draw_bitmap' declared void
src/ft2font.cpp:108: error: 'FT_Bitmap' was not declared in this scope
src/ft2font.cpp:108: error: 'bitmap' was not declared in this scope
src/ft2font.cpp:109: error: 'FT_Int' was not declared in this scope
src/ft2font.cpp:110: error: 'FT_Int' was not declared in this scope
/home/leif/Sage/sage-4.5.3-for-4.6.alpha3-renamed/local/lib/python2.6
/site-packages/numpy/core/include/numpy/__multiarray_api.h:968: warning:
'int _import_array()' defined but not used
error: command 'gcc' failed with exit status 1
Error building matplotlib package.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9221#comment:82>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.