From af22a586b16767dbc4ed69831218898223a6feaf Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Jan 20 2017 17:07:45 +0000 Subject: Update to 2.0.0 final --- diff --git a/.gitignore b/.gitignore index 68f5b52..41f1fce 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ matplotlib-1.0.0-without-gpc.tar.gz /matplotlib-1.5.2rc2.tar.gz /matplotlib-2.0.0b4.tar.gz /matplotlib-2.0.0rc2.tar.gz +/matplotlib-2.0.0.tar.gz diff --git a/0001-Fix-integer-types-for-font-metrics-in-PyGlyph-class.patch b/0001-Fix-integer-types-for-font-metrics-in-PyGlyph-class.patch deleted file mode 100644 index dd77cca..0000000 --- a/0001-Fix-integer-types-for-font-metrics-in-PyGlyph-class.patch +++ /dev/null @@ -1,48 +0,0 @@ -From bf970bd8bc13b4e6e281a47163527909270edcbf Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Mon, 9 Jan 2017 22:56:40 -0800 -Subject: [PATCH] Fix integer types for font metrics in PyGlyph class - -The PyGlyph class defined in the freetype wrapper code pulls -in some font metric values from freetype when initialized. All -these values have type FT_Pos in freetype, which is a signed -long, but in the PyMemberDef structure used to store those -values in the Python class, their types were set to T_INT - -signed int. We should set them to T_LONG instead. This fixes -several hundred test suite errors on big-endian arches. ---- - src/ft2font_wrapper.cpp | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/ft2font_wrapper.cpp b/src/ft2font_wrapper.cpp -index c77dd8363..62fbf0a0c 100644 ---- a/src/ft2font_wrapper.cpp -+++ b/src/ft2font_wrapper.cpp -@@ -282,15 +282,15 @@ static PyObject *PyGlyph_get_bbox(PyGlyph *self, void *closure) - static PyTypeObject *PyGlyph_init_type(PyObject *m, PyTypeObject *type) - { - static PyMemberDef members[] = { -- {(char *)"width", T_INT, offsetof(PyGlyph, width), READONLY, (char *)""}, -- {(char *)"height", T_INT, offsetof(PyGlyph, height), READONLY, (char *)""}, -- {(char *)"horiBearingX", T_INT, offsetof(PyGlyph, horiBearingX), READONLY, (char *)""}, -- {(char *)"horiBearingY", T_INT, offsetof(PyGlyph, horiBearingY), READONLY, (char *)""}, -- {(char *)"horiAdvance", T_INT, offsetof(PyGlyph, horiAdvance), READONLY, (char *)""}, -- {(char *)"linearHoriAdvance", T_INT, offsetof(PyGlyph, linearHoriAdvance), READONLY, (char *)""}, -- {(char *)"vertBearingX", T_INT, offsetof(PyGlyph, vertBearingX), READONLY, (char *)""}, -- {(char *)"vertBearingY", T_INT, offsetof(PyGlyph, vertBearingY), READONLY, (char *)""}, -- {(char *)"vertAdvance", T_INT, offsetof(PyGlyph, vertAdvance), READONLY, (char *)""}, -+ {(char *)"width", T_LONG, offsetof(PyGlyph, width), READONLY, (char *)""}, -+ {(char *)"height", T_LONG, offsetof(PyGlyph, height), READONLY, (char *)""}, -+ {(char *)"horiBearingX", T_LONG, offsetof(PyGlyph, horiBearingX), READONLY, (char *)""}, -+ {(char *)"horiBearingY", T_LONG, offsetof(PyGlyph, horiBearingY), READONLY, (char *)""}, -+ {(char *)"horiAdvance", T_LONG, offsetof(PyGlyph, horiAdvance), READONLY, (char *)""}, -+ {(char *)"linearHoriAdvance", T_LONG, offsetof(PyGlyph, linearHoriAdvance), READONLY, (char *)""}, -+ {(char *)"vertBearingX", T_LONG, offsetof(PyGlyph, vertBearingX), READONLY, (char *)""}, -+ {(char *)"vertBearingY", T_LONG, offsetof(PyGlyph, vertBearingY), READONLY, (char *)""}, -+ {(char *)"vertAdvance", T_LONG, offsetof(PyGlyph, vertAdvance), READONLY, (char *)""}, - {NULL} - }; - --- -2.11.0 - diff --git a/0001-Only-byte-swap-16-bit-PNGs-on-little-endian-7792.patch b/0001-Only-byte-swap-16-bit-PNGs-on-little-endian-7792.patch deleted file mode 100644 index 2094081..0000000 --- a/0001-Only-byte-swap-16-bit-PNGs-on-little-endian-7792.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 47a4bf83a4354740359f4c535a3ccd0f9238bb66 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 10 Jan 2017 16:12:51 -0800 -Subject: [PATCH] Only byte-swap 16-bit PNGs on little-endian (#7792) - -_png has some code that unconditionally byte-swaps 16-bit PNG -data (which is, per the spec, stored in big-endian order). This -isn't appropriate on a big-endian platform, though: this swap -being done unconditionally breaks the handling of 16-bit PNGs -on big-endian platforms (e.g. Fedora ppc64), as reported in -this swap or not. ---- - src/_png.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/_png.cpp b/src/_png.cpp -index f5c25deeb..06e4b8754 100644 ---- a/src/_png.cpp -+++ b/src/_png.cpp -@@ -532,10 +532,12 @@ static PyObject *_read_png(PyObject *filein, bool float_result) - png_set_shift(png_ptr, sig_bit); - } - -+#if NPY_BYTE_ORDER == NPY_LITTLE_ENDIAN - // Convert big endian to little - if (bit_depth == 16) { - png_set_swap(png_ptr); - } -+#endif - - // Convert palletes to full RGB - if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) { --- -2.11.0 - diff --git a/0001-Use-reliable-int-type-for-mesh-size-in-draw_quad_mes.patch b/0001-Use-reliable-int-type-for-mesh-size-in-draw_quad_mes.patch deleted file mode 100644 index 7f14a15..0000000 --- a/0001-Use-reliable-int-type-for-mesh-size-in-draw_quad_mes.patch +++ /dev/null @@ -1,69 +0,0 @@ -From ae2ee043c7b510d43b4b0f90a09e63904382edd9 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 10 Jan 2017 13:57:16 -0800 -Subject: [PATCH] Use reliable int type for mesh size in draw_quad_mesh (#7788) - -In the agg backend, `PyRendererAgg.draw_quad_mesh` takes mesh -dimension arguments (`mesh_width` and `mesh_height`). When -converting those from Python to C, we were declaring the C -types as `size_t`, but converting from Python using the 'I' -format specifier, which converts a Python integer to a C -unsigned int. This isn't safe, because `size_t` is not -necessarily the same size as an int. On Fedora with GCC, for -instance, `size_t` is an alias for long unsigned int. - -On LE arches this usually won't cause a problem, but on a BE -arch where `size_t` isn't an int type, the mismatch causes -rendering errors (see #7788). - -This addresses the problem by just changing the types for these -values to be `unsigned int` instead. ---- - src/_backend_agg.h | 8 ++++---- - src/_backend_agg_wrapper.cpp | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/_backend_agg.h b/src/_backend_agg.h -index 0265647cb..53b73f179 100644 ---- a/src/_backend_agg.h -+++ b/src/_backend_agg.h -@@ -182,8 +182,8 @@ class RendererAgg - template - void draw_quad_mesh(GCAgg &gc, - agg::trans_affine &master_transform, -- size_t mesh_width, -- size_t mesh_height, -+ unsigned int mesh_width, -+ unsigned int mesh_height, - CoordinateArray &coordinates, - OffsetArray &offsets, - agg::trans_affine &offset_trans, -@@ -1148,8 +1148,8 @@ class QuadMeshGenerator - template - inline void RendererAgg::draw_quad_mesh(GCAgg &gc, - agg::trans_affine &master_transform, -- size_t mesh_width, -- size_t mesh_height, -+ unsigned int mesh_width, -+ unsigned int mesh_height, - CoordinateArray &coordinates, - OffsetArray &offsets, - agg::trans_affine &offset_trans, -diff --git a/src/_backend_agg_wrapper.cpp b/src/_backend_agg_wrapper.cpp -index f6ed42bcd..4806feda0 100644 ---- a/src/_backend_agg_wrapper.cpp -+++ b/src/_backend_agg_wrapper.cpp -@@ -390,8 +390,8 @@ static PyObject *PyRendererAgg_draw_quad_mesh(PyRendererAgg *self, PyObject *arg - { - GCAgg gc; - agg::trans_affine master_transform; -- size_t mesh_width; -- size_t mesh_height; -+ unsigned int mesh_width; -+ unsigned int mesh_height; - numpy::array_view coordinates; - numpy::array_view offsets; - agg::trans_affine offset_trans; --- -2.11.0 - diff --git a/b0e4b6708d71df80999764eb4b65cc1d388a521f.patch b/b0e4b6708d71df80999764eb4b65cc1d388a521f.patch deleted file mode 100644 index fcd63fb..0000000 --- a/b0e4b6708d71df80999764eb4b65cc1d388a521f.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c4c0b657ca7b55b99d87b045852227523a293848 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Sun, 8 Jan 2017 17:12:59 -0800 -Subject: [PATCH] Convert unicode index to long, not int, in get_char_index - -There's an error in the `PyFT2Font.get_char_index()` method -added in 2d56ffeb . The type for the unicode index to be sent -to `FT_Get_Char_Index` is `FT_ULong` - an unsigned long - but -the `PyArg_ParseTuple` call that converts it from Python used -`I` in the format string, which converts a Python int to a C -unsigned int, not a C unsigned long. This doesn't seem to cause -a problem on little-endian arches, but it results in completely -incorrect conversion on big-endian arches, which in turn would -result in wrong glyphs, unfound glyphs, and even in an infinite -recursion in `UnicodeFonts._get_glyph`. - -To get correct conversion we must use `k` not `I`, which is -the specifier for a C unsigned long. - -Ref: https://docs.python.org/3/c-api/arg.html#numbers ---- - src/ft2font_wrapper.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/ft2font_wrapper.cpp b/src/ft2font_wrapper.cpp -index a97de68..c77dd83 100644 ---- a/src/ft2font_wrapper.cpp -+++ b/src/ft2font_wrapper.cpp -@@ -971,7 +971,7 @@ static PyObject *PyFT2Font_get_char_index(PyFT2Font *self, PyObject *args, PyObj - FT_UInt index; - FT_ULong ccode; - -- if (!PyArg_ParseTuple(args, "I:get_char_index", &ccode)) { -+ if (!PyArg_ParseTuple(args, "k:get_char_index", &ccode)) { - return NULL; - } - diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 3b190b5..fcc4ace 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -51,11 +51,11 @@ # Use the same directory of the main package for subpackage licence and docs %global _docdir_fmt %{name} -%global rctag rc2 +#global rctag rc2 Name: python-matplotlib Version: 2.0.0 -Release: 0.7%{?rctag:.%{rctag}}%{?dist} +Release: 1%{?rctag:.%{rctag}}%{?dist} Summary: Python 2D plotting library Group: Development/Libraries # qt4_editor backend is MIT @@ -76,16 +76,6 @@ Patch9: python-matplotlib-qhull.patch Patch10: python-matplotlib-increase-tests-tolerance.patch Patch11: python-matplotlib-increase-tests-tolerance-aarch64ppc64.patch Patch13: python-matplotlib-increase-tests-tolerance-i686.patch -# These four patches all fix integer type issues which broke matplotlib -# badly on ppc64 (big-endian) -# https://github.com/matplotlib/matplotlib/pull/7768 -Patch14: https://github.com/matplotlib/matplotlib/commit/b0e4b6708d71df80999764eb4b65cc1d388a521f.patch -# https://github.com/matplotlib/matplotlib/pull/7781 -Patch15: 0001-Fix-integer-types-for-font-metrics-in-PyGlyph-class.patch -# https://github.com/matplotlib/matplotlib/pull/7791 -Patch16: 0001-Use-reliable-int-type-for-mesh-size-in-draw_quad_mes.patch -# https://github.com/matplotlib/matplotlib/pull/7796 -Patch17: 0001-Only-byte-swap-16-bit-PNGs-on-little-endian-7792.patch BuildRequires: freetype-devel BuildRequires: libpng-devel @@ -432,10 +422,6 @@ sed -i 's/\(USE_FONTCONFIG = \)False/\1True/' lib/matplotlib/font_manager.py %ifarch i686 %patch13 -p1 -b .tests-i686 %endif -%patch14 -p1 -b .inttype -%patch15 -p1 -b .moreints -%patch16 -p1 -b .yetmoreints -%patch17 -p1 -b .pngswap chmod -x lib/matplotlib/mpl-data/images/*.svg chmod -x lib/matplotlib/{dates,sankey}.py @@ -634,6 +620,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} \ %endif %changelog +* Fri Jan 20 2017 Orion Poplawski - 2.0.0-1 +- Update to 2.0.0 final + * Tue Jan 10 2017 Adam Williamson - 2.0.0-0.7.rc2 - Update to 2.0.0rc2 - Fix more big-endian integer issues diff --git a/sources b/sources index a9175bb..4fc5a86 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (matplotlib-2.0.0rc2.tar.gz) = 4eba9268307d95345a5e848bfbd257a19cec79d35dba2bd1409f2acb9e059d3229e712e0d67cccd375a7d301184be2777e5114a5c5506b0b1050ffab7eef1016 +SHA512 (matplotlib-2.0.0.tar.gz) = b0e6d91aee5f91e0155c9e6716eef1a7e1fb907daeb93d603709142b749878fd758e42fe3707ac73c3d87959c6a35126c9e17c08ef78c5734106fafdf198f304