#1 Update to Matplotlib 2.1.2
Merged 6 years ago by rathann. Opened 6 years ago by qulogic.
rpms/ qulogic/python-matplotlib master  into  master

file modified
+7
@@ -13,3 +13,10 @@ 

  /matplotlib-2.0.0rc2.tar.gz

  /matplotlib-2.0.0.tar.gz

  /matplotlib-2.0.0-without-copyrighted.tar.xz

+ /matplotlib-2.0.1.tar.gz

+ /matplotlib-2.0.2.tar.gz

+ /matplotlib-2.1.0rc1.tar.gz

+ /matplotlib-2.1.0.tar.gz

+ /matplotlib-2.1.1.tar.gz

+ /matplotlib-2.1.2.tar.gz

+ /matplotlib-2.1.2-with-freetype-2.8.tar.gz

@@ -0,0 +1,29 @@ 

+ From 77bae7e7ea5c02f5be0d59dabeae6c3c09571fbe Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Wed, 24 Jan 2018 02:51:55 -0500

+ Subject: [PATCH] Add libdl on Unix-like systems.

+ 

+ Not linking with libdl causes errors when -z defs is in the linker

+ flags.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  setupext.py | 2 ++

+  1 file changed, 2 insertions(+)

+ 

+ diff --git a/setupext.py b/setupext.py

+ index d0f3f2070..6d2c3e296 100644

+ --- a/setupext.py

+ +++ b/setupext.py

+ @@ -1493,6 +1493,8 @@ class BackendTkAgg(OptionalBackendPackage):

+          if sys.platform == 'win32':

+              # PSAPI library needed for finding Tcl / Tk at run time

+              ext.libraries.extend(['psapi'])

+ +        elif sys.platform != 'darwin':

+ +            ext.libraries.extend(['dl'])

+  

+  

+  class BackendGtk(OptionalBackendPackage):

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,39 @@ 

+ From 69b627b84fa8081748d93d180deb2218b99270a4 Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Wed, 27 Sep 2017 19:35:59 -0400

+ Subject: [PATCH 1/4] matplotlibrc path search fix

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  lib/matplotlib/__init__.py | 5 ++++-

+  1 file changed, 4 insertions(+), 1 deletion(-)

+ 

+ diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py

+ index 3ba486af1..b8caf27dc 100644

+ --- a/lib/matplotlib/__init__.py

+ +++ b/lib/matplotlib/__init__.py

+ @@ -635,9 +635,12 @@ def _get_data_path():

+  

+      _file = _decode_filesystem_path(__file__)

+      path = os.sep.join([os.path.dirname(_file), 'mpl-data'])

+ +    path = '/usr/share/matplotlib/mpl-data'

+      if os.path.isdir(path):

+          return path

+  

+ +    raise RuntimeError('Could not find the matplotlib data files')

+ +

+      # setuptools' namespace_packages may highjack this init file

+      # so need to try something known to be in matplotlib, not basemap

+      import matplotlib.afm

+ @@ -731,7 +734,7 @@ def matplotlib_fname():

+              yield matplotlibrc

+              yield os.path.join(matplotlibrc, 'matplotlibrc')

+          yield os.path.join(_get_configdir(), 'matplotlibrc')

+ -        yield os.path.join(get_data_path(), 'matplotlibrc')

+ +        yield '/etc/matplotlibrc'

+  

+      for fname in gen_candidates():

+          if os.path.isfile(fname):

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,118 @@ 

+ From f146998e2bf6db54dae926ceec57d2baa6003ea0 Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Tue, 23 Jan 2018 20:22:05 -0500

+ Subject: [PATCH 2/4] Increase tolerances for FreeType 2.7.1.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  lib/matplotlib/testing/decorators.py    | 2 +-

+  lib/matplotlib/tests/test_axes.py       | 5 ++---

+  lib/matplotlib/tests/test_mathtext.py   | 4 ++--

+  lib/matplotlib/tests/test_patches.py    | 3 +--

+  lib/matplotlib/tests/test_streamplot.py | 3 +--

+  lib/mpl_toolkits/tests/test_mplot3d.py  | 2 +-

+  6 files changed, 8 insertions(+), 11 deletions(-)

+ 

+ diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py

+ index c5e069b31..ebd68cfab 100644

+ --- a/lib/matplotlib/testing/decorators.py

+ +++ b/lib/matplotlib/testing/decorators.py

+ @@ -406,7 +406,7 @@ def _pytest_image_comparison(baseline_images, extensions, tol,

+      return decorator

+  

+  

+ -def image_comparison(baseline_images, extensions=None, tol=0,

+ +def image_comparison(baseline_images, extensions=None, tol=0.1,

+                       freetype_version=None, remove_text=False,

+                       savefig_kwarg=None,

+                       # Default of mpl_test_settings fixture and cleanup too.

+ diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py

+ index 7164d0cec..6492cc140 100644

+ --- a/lib/matplotlib/tests/test_axes.py

+ +++ b/lib/matplotlib/tests/test_axes.py

+ @@ -671,8 +671,7 @@ def test_polar_rlabel_position():

+      ax.tick_params(rotation='auto')

+  

+  

+ -@image_comparison(baseline_images=['polar_theta_wedge'], style='default',

+ -                  tol=0.01 if six.PY2 else 0)

+ +@image_comparison(baseline_images=['polar_theta_wedge'], style='default')

+  def test_polar_theta_limits():

+      r = np.arange(0, 3.0, 0.01)

+      theta = 2*np.pi*r

+ @@ -4679,7 +4678,7 @@ def test_rc_spines():

+  

+  

+  @image_comparison(baseline_images=['rc_grid'], extensions=['png'],

+ -                  savefig_kwarg={'dpi': 40})

+ +                  savefig_kwarg={'dpi': 40}, tol=0.2)

+  def test_rc_grid():

+      fig = plt.figure()

+      rc_dict0 = {

+ diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py

+ index 7ef77ce6a..b8c9c9e8b 100644

+ --- a/lib/matplotlib/tests/test_mathtext.py

+ +++ b/lib/matplotlib/tests/test_mathtext.py

+ @@ -174,7 +174,7 @@ def baseline_images(request, fontset, index):

+                           ['cm', 'stix', 'stixsans', 'dejavusans',

+                            'dejavuserif'])

+  @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)

+ -@image_comparison(baseline_images=None)

+ +@image_comparison(baseline_images=None, tol=0.31)

+  def test_mathtext_rendering(baseline_images, fontset, index, test):

+      matplotlib.rcParams['mathtext.fontset'] = fontset

+      fig = plt.figure(figsize=(5.25, 0.75))

+ @@ -188,7 +188,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, test):

+                           ['cm', 'stix', 'stixsans', 'dejavusans',

+                            'dejavuserif'])

+  @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)

+ -@image_comparison(baseline_images=None, extensions=['png'])

+ +@image_comparison(baseline_images=None, extensions=['png'], tol=0.3)

+  def test_mathfont_rendering(baseline_images, fontset, index, test):

+      matplotlib.rcParams['mathtext.fontset'] = fontset

+      fig = plt.figure(figsize=(5.25, 0.75))

+ diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py

+ index 20ffa6b08..81737c84d 100644

+ --- a/lib/matplotlib/tests/test_patches.py

+ +++ b/lib/matplotlib/tests/test_patches.py

+ @@ -267,9 +267,8 @@ def test_wedge_movement():

+          assert getattr(w, attr) == new_v

+  

+  

+ -# png needs tol>=0.06, pdf tol>=1.617

+  @image_comparison(baseline_images=['wedge_range'],

+ -                  remove_text=True, tol=1.65 if on_win else 0)

+ +                  remove_text=True)

+  def test_wedge_range():

+      ax = plt.axes()

+  

+ diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py

+ index 1d7e09fef..48f1e0683 100644

+ --- a/lib/matplotlib/tests/test_streamplot.py

+ +++ b/lib/matplotlib/tests/test_streamplot.py

+ @@ -40,8 +40,7 @@ def test_startpoints():

+      plt.plot(start_x, start_y, 'ok')

+  

+  

+ -@image_comparison(baseline_images=['streamplot_colormap'],

+ -                  tol=.02)

+ +@image_comparison(baseline_images=['streamplot_colormap'])

+  def test_colormap():

+      X, Y, U, V = velocity_field()

+      plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,

+ diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py

+ index c157433c7..c13f3be2f 100644

+ --- a/lib/mpl_toolkits/tests/test_mplot3d.py

+ +++ b/lib/mpl_toolkits/tests/test_mplot3d.py

+ @@ -658,7 +658,7 @@ class TestVoxels(object):

+      @image_comparison(

+          baseline_images=['voxels-xyz'],

+          extensions=['png'],

+ -        tol=0.01

+ +        tol=0.02

+      )

+      def test_xyz(self):

+          fig, ax = plt.subplots(subplot_kw={"projection": "3d"})

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,41 @@ 

+ From 1e4e5f12b804561ab5b6bfa4ad76d44523d1568e Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Tue, 23 Jan 2018 20:27:17 -0500

+ Subject: [PATCH 3/4] Increase tolerances for FT 2.7.1 and other arches.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  lib/matplotlib/tests/test_patheffects.py | 2 +-

+  lib/matplotlib/tests/test_streamplot.py  | 3 +--

+  2 files changed, 2 insertions(+), 3 deletions(-)

+ 

+ diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py

+ index 9b8a4379c..e36d6deb6 100644

+ --- a/lib/matplotlib/tests/test_patheffects.py

+ +++ b/lib/matplotlib/tests/test_patheffects.py

+ @@ -125,7 +125,7 @@ def test_SimplePatchShadow_offset():

+      assert pe._offset == (4, 5)

+  

+  

+ -@image_comparison(baseline_images=['collection'], tol=0.015)

+ +@image_comparison(baseline_images=['collection'], tol=0.019)

+  def test_collection():

+      x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))

+      data = np.sin(x) + np.cos(y)

+ diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py

+ index 48f1e0683..aadcf6bfd 100644

+ --- a/lib/matplotlib/tests/test_streamplot.py

+ +++ b/lib/matplotlib/tests/test_streamplot.py

+ @@ -58,8 +58,7 @@ def test_linewidth():

+                     linewidth=lw)

+  

+  

+ -@image_comparison(baseline_images=['streamplot_masks_and_nans'],

+ -                  tol=0.04 if on_win else 0)

+ +@image_comparison(baseline_images=['streamplot_masks_and_nans'], tol=0.01)

+  def test_masks_and_nans():

+      X, Y, U, V = velocity_field()

+      mask = np.zeros(U.shape, dtype=bool)

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,402 @@ 

+ From 25c7d1af15f4478e795250360d2f778a76c2358d Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Wed, 24 Jan 2018 01:38:52 -0500

+ Subject: [PATCH 4/4] Increase some tolerances for 32-bit systems.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  lib/matplotlib/tests/test_artist.py      |  3 ++-

+  lib/matplotlib/tests/test_axes.py        | 42 ++++++++++++++++----------------

+  lib/matplotlib/tests/test_collections.py |  2 +-

+  lib/matplotlib/tests/test_colorbar.py    | 11 +++++----

+  lib/matplotlib/tests/test_contour.py     |  6 ++---

+  lib/matplotlib/tests/test_image.py       |  2 +-

+  lib/matplotlib/tests/test_patheffects.py |  2 +-

+  lib/matplotlib/tests/test_pickle.py      |  2 +-

+  lib/matplotlib/tests/test_quiver.py      |  2 +-

+  lib/matplotlib/tests/test_transforms.py  |  2 +-

+  lib/mpl_toolkits/tests/test_mplot3d.py   |  2 +-

+  11 files changed, 39 insertions(+), 37 deletions(-)

+ 

+ diff --git a/lib/matplotlib/tests/test_artist.py b/lib/matplotlib/tests/test_artist.py

+ index 786d50903..105714ef4 100644

+ --- a/lib/matplotlib/tests/test_artist.py

+ +++ b/lib/matplotlib/tests/test_artist.py

+ @@ -95,7 +95,8 @@ def test_collection_transform_of_none():

+      assert isinstance(c._transOffset, mtransforms.IdentityTransform)

+  

+  

+ -@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True)

+ +@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True,

+ +                  tol=0.28)

+  def test_clipping():

+      exterior = mpath.Path.unit_rectangle().deepcopy()

+      exterior.vertices *= 4

+ diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py

+ index 6492cc140..8609d8c31 100644

+ --- a/lib/matplotlib/tests/test_axes.py

+ +++ b/lib/matplotlib/tests/test_axes.py

+ @@ -483,7 +483,7 @@ def test_single_point():

+      plt.plot('b', 'b', 'o', data=data)

+  

+  

+ -@image_comparison(baseline_images=['single_date'])

+ +@image_comparison(baseline_images=['single_date'], tol=1.97)

+  def test_single_date():

+      time1 = [721964.0]

+      data1 = [-65.54]

+ @@ -971,7 +971,7 @@ def test_fill_between_interpolate():

+  

+  

+  @image_comparison(baseline_images=['fill_between_interpolate_decreasing'],

+ -                  style='mpl20', remove_text=True)

+ +                  style='mpl20', remove_text=True, tol=0.78)

+  def test_fill_between_interpolate_decreasing():

+      p = np.array([724.3, 700, 655])

+      t = np.array([9.4, 7, 2.2])

+ @@ -1085,7 +1085,7 @@ def test_pcolormesh():

+  

+  

+  @image_comparison(baseline_images=['pcolormesh_datetime_axis'],

+ -                  extensions=['png'], remove_text=False)

+ +                  extensions=['png'], remove_text=False, tol=0.19)

+  def test_pcolormesh_datetime_axis():

+      fig = plt.figure()

+      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

+ @@ -1111,7 +1111,7 @@ def test_pcolormesh_datetime_axis():

+  

+  

+  @image_comparison(baseline_images=['pcolor_datetime_axis'],

+ -                  extensions=['png'], remove_text=False)

+ +                  extensions=['png'], remove_text=False, tol=0.19)

+  def test_pcolor_datetime_axis():

+      fig = plt.figure()

+      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

+ @@ -1167,7 +1167,7 @@ def test_canonical():

+  

+  

+  @image_comparison(baseline_images=['arc_angles'], remove_text=True,

+ -                  style='default', extensions=['png'])

+ +                  style='default', extensions=['png'], tol=0.17)

+  def test_arc_angles():

+      from matplotlib import patches

+      # Ellipse parameters

+ @@ -2433,7 +2433,7 @@ def test_boxplot_mod_artist_after_plotting():

+  

+  @image_comparison(baseline_images=['violinplot_vert_baseline',

+                                     'violinplot_vert_baseline'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.24)

+  def test_vert_violinplot_baseline():

+      # First 9 digits of frac(sqrt(2))

+      np.random.seed(414213562)

+ @@ -2451,7 +2451,7 @@ def test_vert_violinplot_baseline():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showmeans'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_vert_violinplot_showmeans():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(3))

+ @@ -2462,7 +2462,7 @@ def test_vert_violinplot_showmeans():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showextrema'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_vert_violinplot_showextrema():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(5))

+ @@ -2473,7 +2473,7 @@ def test_vert_violinplot_showextrema():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showmedians'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_vert_violinplot_showmedians():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(7))

+ @@ -2484,7 +2484,7 @@ def test_vert_violinplot_showmedians():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showall'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.2)

+  def test_vert_violinplot_showall():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(11))

+ @@ -2495,7 +2495,7 @@ def test_vert_violinplot_showall():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_custompoints_10'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_vert_violinplot_custompoints_10():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(13))

+ @@ -2506,7 +2506,7 @@ def test_vert_violinplot_custompoints_10():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_custompoints_200'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_vert_violinplot_custompoints_200():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(17))

+ @@ -2517,7 +2517,7 @@ def test_vert_violinplot_custompoints_200():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_baseline'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.2)

+  def test_horiz_violinplot_baseline():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(19))

+ @@ -2528,7 +2528,7 @@ def test_horiz_violinplot_baseline():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showmedians'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_horiz_violinplot_showmedians():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(23))

+ @@ -2539,7 +2539,7 @@ def test_horiz_violinplot_showmedians():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showmeans'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.25)

+  def test_horiz_violinplot_showmeans():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(29))

+ @@ -2550,7 +2550,7 @@ def test_horiz_violinplot_showmeans():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showextrema'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.2)

+  def test_horiz_violinplot_showextrema():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(31))

+ @@ -2561,7 +2561,7 @@ def test_horiz_violinplot_showextrema():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showall'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.19)

+  def test_horiz_violinplot_showall():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(37))

+ @@ -2572,7 +2572,7 @@ def test_horiz_violinplot_showall():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_custompoints_10'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_horiz_violinplot_custompoints_10():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(41))

+ @@ -2583,7 +2583,7 @@ def test_horiz_violinplot_custompoints_10():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_custompoints_200'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_horiz_violinplot_custompoints_200():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(43))

+ @@ -3909,7 +3909,7 @@ def test_psd_noise():

+  

+  

+  @image_comparison(baseline_images=['csd_freqs'], remove_text=True,

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.21)

+  def test_csd_freqs():

+      '''test axes.csd with sinusoidal stimuli'''

+      n = 10000

+ @@ -5153,7 +5153,7 @@ def test_date_timezone_y():

+  

+  

+  @image_comparison(baseline_images=['date_timezone_x_and_y'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=3.05)

+  def test_date_timezone_x_and_y():

+      # Tests issue 5575

+      time_index = [pytz.timezone('UTC').localize(datetime.datetime(

+ diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py

+ index c27aeb11a..9d39a3e91 100644

+ --- a/lib/matplotlib/tests/test_collections.py

+ +++ b/lib/matplotlib/tests/test_collections.py

+ @@ -468,7 +468,7 @@ def test_EllipseCollection():

+  

+  

+  @image_comparison(baseline_images=['polycollection_close'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.45)

+  def test_polycollection_close():

+      from mpl_toolkits.mplot3d import Axes3D

+  

+ diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py

+ index b75ba7e9f..cfbb16444 100644

+ --- a/lib/matplotlib/tests/test_colorbar.py

+ +++ b/lib/matplotlib/tests/test_colorbar.py

+ @@ -96,7 +96,7 @@ def _colorbar_extension_length(spacing):

+  @image_comparison(

+          baseline_images=['colorbar_extensions_shape_uniform',

+                           'colorbar_extensions_shape_proportional'],

+ -        extensions=['png'])

+ +        extensions=['png'], tol=0.16)

+  def test_colorbar_extension_shape():

+      '''Test rectangular colorbar extensions.'''

+      # Create figures for uniform and proportionally spaced colorbars.

+ @@ -106,7 +106,7 @@ def test_colorbar_extension_shape():

+  

+  @image_comparison(baseline_images=['colorbar_extensions_uniform',

+                                     'colorbar_extensions_proportional'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.25)

+  def test_colorbar_extension_length():

+      '''Test variable length colorbar extensions.'''

+      # Create figures for uniform and proportionally spaced colorbars.

+ @@ -120,7 +120,7 @@ def test_colorbar_extension_length():

+                                     'cbar_sharing',

+                                     ],

+                    extensions=['png'], remove_text=True,

+ -                  savefig_kwarg={'dpi': 40})

+ +                  savefig_kwarg={'dpi': 40}, tol=0.17)

+  def test_colorbar_positioning():

+      data = np.arange(1200).reshape(30, 40)

+      levels = [0, 200, 400, 600, 800, 1000, 1200]

+ @@ -174,7 +174,7 @@ def test_colorbar_positioning():

+  

+  @image_comparison(baseline_images=['cbar_with_subplots_adjust'],

+                    extensions=['png'], remove_text=True,

+ -                  savefig_kwarg={'dpi': 40})

+ +                  savefig_kwarg={'dpi': 40}, tol=0.17)

+  def test_gridspec_make_colorbar():

+      plt.figure()

+      data = np.arange(1200).reshape(30, 40)

+ @@ -234,7 +234,8 @@ def test_colorbarbase():

+  

+  @image_comparison(

+      baseline_images=['colorbar_closed_patch'],

+ -    remove_text=True)

+ +    remove_text=True,

+ +    tol=0.22)

+  def test_colorbar_closed_patch():

+      fig = plt.figure(figsize=(8, 6))

+      ax1 = fig.add_axes([0.05, 0.85, 0.9, 0.1])

+ diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py

+ index 16ac9e865..29c1b26f2 100644

+ --- a/lib/matplotlib/tests/test_contour.py

+ +++ b/lib/matplotlib/tests/test_contour.py

+ @@ -228,7 +228,7 @@ def test_given_colors_levels_and_extends():

+  

+  

+  @image_comparison(baseline_images=['contour_datetime_axis'],

+ -                  extensions=['png'], remove_text=False)

+ +                  extensions=['png'], remove_text=False, tol=0.18)

+  def test_contour_datetime_axis():

+      fig = plt.figure()

+      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

+ @@ -254,7 +254,7 @@ def test_contour_datetime_axis():

+  

+  

+  @image_comparison(baseline_images=['contour_test_label_transforms'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.74)

+  def test_labels():

+      # Adapted from pylab_examples example code: contour_demo.py

+      # see issues #2475, #2843, and #2818 for explanation

+ @@ -283,7 +283,7 @@ def test_labels():

+  

+  @image_comparison(baseline_images=['contour_corner_mask_False',

+                                     'contour_corner_mask_True'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.19)

+  def test_corner_mask():

+      n = 60

+      mask_level = 0.95

+ diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py

+ index fd6430d56..e9bf1b1db 100644

+ --- a/lib/matplotlib/tests/test_image.py

+ +++ b/lib/matplotlib/tests/test_image.py

+ @@ -754,7 +754,7 @@ def test_imshow_endianess():

+  

+  

+  @image_comparison(baseline_images=['imshow_masked_interpolation'],

+ -                  remove_text=True, style='mpl20')

+ +                  remove_text=True, style='mpl20', tol=0.25)

+  def test_imshow_masked_interpolation():

+  

+      cm = copy(plt.get_cmap('viridis'))

+ diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py

+ index e36d6deb6..985d69cb2 100644

+ --- a/lib/matplotlib/tests/test_patheffects.py

+ +++ b/lib/matplotlib/tests/test_patheffects.py

+ @@ -125,7 +125,7 @@ def test_SimplePatchShadow_offset():

+      assert pe._offset == (4, 5)

+  

+  

+ -@image_comparison(baseline_images=['collection'], tol=0.019)

+ +@image_comparison(baseline_images=['collection'], tol=0.084)

+  def test_collection():

+      x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))

+      data = np.sin(x) + np.cos(y)

+ diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py

+ index bd6ac6862..512f07948 100644

+ --- a/lib/matplotlib/tests/test_pickle.py

+ +++ b/lib/matplotlib/tests/test_pickle.py

+ @@ -43,7 +43,7 @@ def test_simple():

+  

+  @image_comparison(baseline_images=['multi_pickle'],

+                    extensions=['png'], remove_text=True,

+ -                  style='mpl20')

+ +                  style='mpl20', tol=0.11)

+  def test_complete():

+      fig = plt.figure('Figure with a label?', figsize=(10, 6))

+  

+ diff --git a/lib/matplotlib/tests/test_quiver.py b/lib/matplotlib/tests/test_quiver.py

+ index a0e1e674f..ede6bfc64 100644

+ --- a/lib/matplotlib/tests/test_quiver.py

+ +++ b/lib/matplotlib/tests/test_quiver.py

+ @@ -131,7 +131,7 @@ def test_quiver_key_pivot():

+  

+  

+  @image_comparison(baseline_images=['barbs_test_image'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.11)

+  def test_barbs():

+      x = np.linspace(-5, 5, 5)

+      X, Y = np.meshgrid(x, x)

+ diff --git a/lib/matplotlib/tests/test_transforms.py b/lib/matplotlib/tests/test_transforms.py

+ index 8f19a50f3..fa4a9aa18 100644

+ --- a/lib/matplotlib/tests/test_transforms.py

+ +++ b/lib/matplotlib/tests/test_transforms.py

+ @@ -75,7 +75,7 @@ def test_external_transform_api():

+  

+  

+  @image_comparison(baseline_images=['pre_transform_data'],

+ -                  tol=0.08)

+ +                  tol=0.155)

+  def test_pre_transform_plotting():

+      # a catch-all for as many as possible plot layouts which handle

+      # pre-transforming the data NOTE: The axis range is important in this

+ diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py

+ index c13f3be2f..81a28aadb 100644

+ --- a/lib/mpl_toolkits/tests/test_mplot3d.py

+ +++ b/lib/mpl_toolkits/tests/test_mplot3d.py

+ @@ -198,7 +198,7 @@ def test_text3d():

+      ax.set_zlabel('Z axis')

+  

+  

+ -@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)

+ +@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.05)

+  def test_trisurf3d():

+      n_angles = 36

+      n_radii = 8

+ -- 

+ 2.14.3

+ 

@@ -0,0 +1,216 @@ 

+ From cd26dbd863d0cf2cce4d249c4941cf68d6f838ba Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Wed, 24 Jan 2018 03:02:19 -0500

+ Subject: [PATCH 4/4] Increase some tolerances for non-x86 arches.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  lib/matplotlib/tests/test_arrow_patches.py | 4 ++--

+  lib/matplotlib/tests/test_axes.py          | 5 +++--

+  lib/matplotlib/tests/test_collections.py   | 2 +-

+  lib/matplotlib/tests/test_cycles.py        | 6 +++---

+  lib/matplotlib/tests/test_image.py         | 2 +-

+  lib/matplotlib/tests/test_legend.py        | 6 +++---

+  lib/matplotlib/tests/test_pickle.py        | 2 +-

+  lib/matplotlib/tests/test_scale.py         | 2 +-

+  lib/matplotlib/tests/test_streamplot.py    | 2 +-

+  lib/matplotlib/tests/test_units.py         | 4 ++--

+  10 files changed, 18 insertions(+), 17 deletions(-)

+ 

+ diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py

+ index 0a5894a30..1f75169ca 100644

+ --- a/lib/matplotlib/tests/test_arrow_patches.py

+ +++ b/lib/matplotlib/tests/test_arrow_patches.py

+ @@ -69,7 +69,7 @@ def __prepare_fancyarrow_dpi_cor_test():

+  

+  

+  @image_comparison(baseline_images=['fancyarrow_dpi_cor_100dpi'],

+ -                  remove_text=True, extensions=['png'],

+ +                  remove_text=True, extensions=['png'], tol=0.016,

+                    savefig_kwarg=dict(dpi=100))

+  def test_fancyarrow_dpi_cor_100dpi():

+      """

+ @@ -84,7 +84,7 @@ def test_fancyarrow_dpi_cor_100dpi():

+  

+  

+  @image_comparison(baseline_images=['fancyarrow_dpi_cor_200dpi'],

+ -                  remove_text=True, extensions=['png'],

+ +                  remove_text=True, extensions=['png'], tol=0.019,

+                    savefig_kwarg=dict(dpi=200))

+  def test_fancyarrow_dpi_cor_200dpi():

+      """

+ diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py

+ index 6492cc140..3bd1c0fda 100644

+ --- a/lib/matplotlib/tests/test_axes.py

+ +++ b/lib/matplotlib/tests/test_axes.py

+ @@ -3229,7 +3229,8 @@ def test_vertex_markers():

+  

+  

+  @image_comparison(baseline_images=['vline_hline_zorder',

+ -                                   'errorbar_zorder'])

+ +                                   'errorbar_zorder'],

+ +                  tol=0.02)

+  def test_eb_line_zorder():

+      x = list(xrange(10))

+  

+ @@ -4866,7 +4867,7 @@ def test_title_location_roundtrip():

+  

+  

+  @image_comparison(baseline_images=["loglog"], remove_text=True,

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.009)

+  def test_loglog():

+      fig, ax = plt.subplots()

+      x = np.arange(1, 11)

+ diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py

+ index c27aeb11a..969bf41cf 100644

+ --- a/lib/matplotlib/tests/test_collections.py

+ +++ b/lib/matplotlib/tests/test_collections.py

+ @@ -444,7 +444,7 @@ def test_barb_limits():

+  

+  

+  @image_comparison(baseline_images=['EllipseCollection_test_image'],

+ -                  extensions=['png'],

+ +                  extensions=['png'], tol=0.012,

+                    remove_text=True)

+  def test_EllipseCollection():

+      # Test basic functionality

+ diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py

+ index eadaf2508..5d1144f5e 100644

+ --- a/lib/matplotlib/tests/test_cycles.py

+ +++ b/lib/matplotlib/tests/test_cycles.py

+ @@ -10,7 +10,7 @@ from cycler import cycler

+  

+  

+  @image_comparison(baseline_images=['color_cycle_basic'], remove_text=True,

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.008)

+  def test_colorcycle_basic():

+      fig = plt.figure()

+      ax = fig.add_subplot(111)

+ @@ -28,7 +28,7 @@ def test_colorcycle_basic():

+  

+  

+  @image_comparison(baseline_images=['marker_cycle', 'marker_cycle'],

+ -                  remove_text=True, extensions=['png'])

+ +                  remove_text=True, extensions=['png'], tol=0.008)

+  def test_marker_cycle():

+      fig = plt.figure()

+      ax = fig.add_subplot(111)

+ @@ -63,7 +63,7 @@ def test_marker_cycle():

+  

+  

+  @image_comparison(baseline_images=['lineprop_cycle_basic'], remove_text=True,

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.009)

+  def test_linestylecycle_basic():

+      fig = plt.figure()

+      ax = fig.add_subplot(111)

+ diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py

+ index fd6430d56..b4190713f 100644

+ --- a/lib/matplotlib/tests/test_image.py

+ +++ b/lib/matplotlib/tests/test_image.py

+ @@ -754,7 +754,7 @@ def test_imshow_endianess():

+  

+  

+  @image_comparison(baseline_images=['imshow_masked_interpolation'],

+ -                  remove_text=True, style='mpl20')

+ +                  remove_text=True, style='mpl20', tol=0.006)

+  def test_imshow_masked_interpolation():

+  

+      cm = copy(plt.get_cmap('viridis'))

+ diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py

+ index e63aa8ef9..d984bcac1 100644

+ --- a/lib/matplotlib/tests/test_legend.py

+ +++ b/lib/matplotlib/tests/test_legend.py

+ @@ -141,7 +141,7 @@ def test_multiple_keys():

+  

+  

+  @image_comparison(baseline_images=['rgba_alpha'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.007)

+  def test_alpha_rgba():

+      import matplotlib.pyplot as plt

+  

+ @@ -152,7 +152,7 @@ def test_alpha_rgba():

+  

+  

+  @image_comparison(baseline_images=['rcparam_alpha'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.007)

+  def test_alpha_rcparam():

+      import matplotlib.pyplot as plt

+  

+ @@ -179,7 +179,7 @@ def test_fancy():

+                 ncol=2, shadow=True, title="My legend", numpoints=1)

+  

+  

+ -@image_comparison(baseline_images=['framealpha'], remove_text=True)

+ +@image_comparison(baseline_images=['framealpha'], remove_text=True, tol=0.018)

+  def test_framealpha():

+      x = np.linspace(1, 100, 100)

+      y = x

+ diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py

+ index bd6ac6862..ea8afd807 100644

+ --- a/lib/matplotlib/tests/test_pickle.py

+ +++ b/lib/matplotlib/tests/test_pickle.py

+ @@ -41,7 +41,7 @@ def test_simple():

+      pickle.dump(fig, BytesIO(), pickle.HIGHEST_PROTOCOL)

+  

+  

+ -@image_comparison(baseline_images=['multi_pickle'],

+ +@image_comparison(baseline_images=['multi_pickle'], tol=0.004,

+                    extensions=['png'], remove_text=True,

+                    style='mpl20')

+  def test_complete():

+ diff --git a/lib/matplotlib/tests/test_scale.py b/lib/matplotlib/tests/test_scale.py

+ index 9b78377b2..4994ba91d 100644

+ --- a/lib/matplotlib/tests/test_scale.py

+ +++ b/lib/matplotlib/tests/test_scale.py

+ @@ -75,7 +75,7 @@ def test_extra_kwargs_raise():

+  

+  

+  @image_comparison(baseline_images=['logscale_nonpos_values'], remove_text=True,

+ -                  extensions=['png'], style='mpl20')

+ +                  extensions=['png'], style='mpl20', tol=0.008)

+  def test_logscale_nonpos_values():

+      np.random.seed(19680801)

+      xs = np.random.normal(size=int(1e3))

+ diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py

+ index aadcf6bfd..473991268 100644

+ --- a/lib/matplotlib/tests/test_streamplot.py

+ +++ b/lib/matplotlib/tests/test_streamplot.py

+ @@ -48,7 +48,7 @@ def test_colormap():

+      plt.colorbar()

+  

+  

+ -@image_comparison(baseline_images=['streamplot_linewidth'])

+ +@image_comparison(baseline_images=['streamplot_linewidth'], tol=0.002)

+  def test_linewidth():

+      X, Y, U, V = velocity_field()

+      speed = np.sqrt(U*U + V*V)

+ diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py

+ index f72ac2c60..781a3850e 100644

+ --- a/lib/matplotlib/tests/test_units.py

+ +++ b/lib/matplotlib/tests/test_units.py

+ @@ -39,7 +39,7 @@ class Quantity(object):

+  

+  # Tests that the conversion machinery works properly for classes that

+  # work as a facade over numpy arrays (like pint)

+ -@image_comparison(baseline_images=['plot_pint'],

+ +@image_comparison(baseline_images=['plot_pint'], tol=0.003,

+                    extensions=['png'], remove_text=False, style='mpl20')

+  def test_numpy_facade():

+      # Create an instance of the conversion interface and

+ @@ -83,7 +83,7 @@ def test_numpy_facade():

+  

+  

+  # Tests gh-8908

+ -@image_comparison(baseline_images=['plot_masked_units'],

+ +@image_comparison(baseline_images=['plot_masked_units'], tol=0.007,

+                    extensions=['png'], remove_text=True, style='mpl20')

+  def test_plot_masked_units():

+      data = np.linspace(-5, 5)

+ -- 

+ 2.14.3

+ 

@@ -1,24 +0,0 @@ 

- --- a/lib/matplotlib/__init__.py	2016-04-04 12:54:26.427194940 +0200

- +++ b/lib/matplotlib/__init__.py	2016-04-04 12:56:12.662590255 +0200

- @@ -682,9 +682,12 @@

-  

-      _file = _decode_filesystem_path(__file__)

-      path = os.sep.join([os.path.dirname(_file), 'mpl-data'])

- +    path = '/usr/share/matplotlib/mpl-data'

-      if os.path.isdir(path):

-          return path

-  

- +    raise RuntimeError('Could not find the matplotlib data files')

- +

-      # setuptools' namespace_packages may highjack this init file

-      # so need to try something known to be in matplotlib, not basemap

-      import matplotlib.afm

- @@ -812,7 +815,7 @@

-                      home, '.matplotlib', 'matplotlibrc')

-              return fname

-  

- -    path = get_data_path()  # guaranteed to exist or raise

- +    path = '/etc'  # guaranteed to exist or raise

-      fname = os.path.join(path, 'matplotlibrc')

-      if not os.path.exists(fname):

-          warnings.warn('Could not find matplotlibrc; using defaults')

@@ -1,32 +0,0 @@ 

- diff -up matplotlib-1.5.1/lib/matplotlib/tests/test_image.py.tests matplotlib-1.5.1/lib/matplotlib/tests/test_image.py

- --- matplotlib-1.5.1/lib/matplotlib/tests/test_image.py.tests	2016-05-23 14:04:41.000000000 +0200

- +++ matplotlib-1.5.1/lib/matplotlib/tests/test_image.py	2016-06-02 00:28:37.076703843 +0200

- @@ -186,7 +186,8 @@ def test_cursor_data():

-  

-      event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)

-      z = im.get_cursor_data(event)

- -    assert z is None, "Did not get None, got %d" % z

- +    #0 instead of None on armv7hl

- +    #assert z is None, "Did not get None, got %d" % z

-  

-      # Hmm, something is wrong here... I get 0, not None...

-      # But, this works further down in the tests with extents flipped

- @@ -224,14 +225,16 @@ def test_cursor_data():

-  

-      event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)

-      z = im.get_cursor_data(event)

- -    assert z is None, "Did not get None, got %d" % z

- +    #0 instead of None on armv7hl

- +    #assert z is None, "Did not get None, got %d" % z

-  

-      x, y = 0.01, -0.01

-      xdisp, ydisp = ax.transData.transform_point([x, y])

-  

-      event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)

-      z = im.get_cursor_data(event)

- -    assert z is None, "Did not get None, got %d" % z

- +    #0 instead of None on armv7hl

- +    #assert z is None, "Did not get None, got %d" % z

-  

-  

-  @image_comparison(baseline_images=['image_clip'])

@@ -1,20 +0,0 @@ 

- diff -up matplotlib-2.0.0b3/lib/matplotlib/sphinxext/tests/test_tinypages.py.tests matplotlib-2.0.0b3/lib/matplotlib/sphinxext/tests/test_tinypages.py

- --- matplotlib-2.0.0b3/lib/matplotlib/sphinxext/tests/test_tinypages.py.tests	2016-07-17 01:04:11.000000000 +0200

- +++ matplotlib-2.0.0b3/lib/matplotlib/sphinxext/tests/test_tinypages.py	2016-08-29 13:41:47.661198880 +0200

- @@ -1,6 +1,7 @@

-  """ Tests for tinypages build using sphinx extensions """

-  

-  import shutil

- +import sys

-  import tempfile

-  

-  from os.path import (join as pjoin, dirname, isdir)

- @@ -16,6 +17,8 @@ TINY_PAGES = pjoin(HERE, 'tinypages')

-  

-  def setup():

-      # Check we have the sphinx-build command

- +    if sys.version_info[0] >= 3:

- +        raise SkipTest('sphinx-build works only with python 2.x')

-      try:

-          ret = call(['sphinx-build', '--help'], stdout=PIPE, stderr=PIPE)

-      except OSError:

@@ -1,126 +0,0 @@ 

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_axes.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_axes.py.new	2017-01-07 21:28:07.736224906 -0800

- @@ -1285,7 +1285,7 @@

-      cbar.add_lines(cs2, erase=False)

-  

-  

- -@image_comparison(baseline_images=['hist2d', 'hist2d'])

- +@image_comparison(baseline_images=['hist2d', 'hist2d'], tol=10.677)

-  def test_hist2d():

-      np.random.seed(0)

-      # make it not symetric in case we switch x and y axis

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_quiver.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_quiver.py.new	2017-01-07 21:29:53.441682625 -0800

- @@ -135,7 +135,7 @@

-      ax.quiverkey(q, 0, 0.5, 1, 'W', labelpos='W')

-  

-  

- -@image_comparison(baseline_images=['barbs_test_image'],

- +@image_comparison(baseline_images=['barbs_test_image'], tol=0.8,

-                    extensions=['png'], remove_text=True)

-  def test_barbs():

-      x = np.linspace(-5, 5, 5)

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_transforms.py 2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_transforms.py.new     2017-01-07 21:21:29.478503151 -0800

- @@ -82,7 +82,7 @@

-  

-  

-  @image_comparison(baseline_images=['pre_transform_data'],

- -                  tol=0.08)

- +                  tol=0.9)

-  def test_pre_transform_plotting():

-      # a catch-all for as many as possible plot layouts which handle

-      # pre-transforming the data NOTE: The axis range is important in this

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_mlab.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_mlab.py.new	2017-01-07 21:30:47.502916717 -0800

- @@ -2279,90 +2279,6 @@

-                                  iscomplex=True, sides='default', nsides=2)

-  

-  

- -class spectral_testcase_Fs4_real_onesided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4],

- -                                iscomplex=False, sides='onesided', nsides=1)

- -

- -

- -class spectral_testcase_Fs4_real_twosided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4],

- -                                iscomplex=False, sides='twosided', nsides=2)

- -

- -

- -class spectral_testcase_Fs4_real_defaultsided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4],

- -                                iscomplex=False, sides='default', nsides=1)

- -

- -

- -class spectral_testcase_Fs4_complex_onesided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4],

- -                                iscomplex=True, sides='onesided', nsides=1)

- -

- -

- -class spectral_testcase_Fs4_complex_twosided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4],

- -                                iscomplex=True, sides='twosided', nsides=2)

- -

- -

- -class spectral_testcase_Fs4_complex_defaultsided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4],

- -                                iscomplex=True, sides='default', nsides=2)

- -

- -

- -class spectral_testcase_FsAll_real_onesided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4, 5, 10],

- -                                iscomplex=False, sides='onesided', nsides=1)

- -

- -

- -class spectral_testcase_FsAll_real_twosided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4, 5, 10],

- -                                iscomplex=False, sides='twosided', nsides=2)

- -

- -

- -class spectral_testcase_FsAll_real_defaultsided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4, 5, 10],

- -                                iscomplex=False, sides='default', nsides=1)

- -

- -

- -class spectral_testcase_FsAll_complex_onesided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4, 5, 10],

- -                                iscomplex=True, sides='onesided', nsides=1)

- -

- -

- -class spectral_testcase_FsAll_complex_twosided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4, 5, 10],

- -                                iscomplex=True, sides='twosided', nsides=2)

- -

- -

- -class spectral_testcase_FsAll_complex_defaultsided(

- -        spectral_testcase_nosig_real_onesided):

- -        def setUp(self):

- -                self.createStim(fstims=[4, 5, 10],

- -                                iscomplex=True, sides='default', nsides=2)

- -

- -

-  class spectral_testcase_nosig_real_onesided_noNFFT(

-          spectral_testcase_nosig_real_onesided):

-          def setUp(self):

@@ -1,65 +0,0 @@ 

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_axes.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_axes.py.new	2017-01-07 21:35:06.874039829 -0800

- @@ -361,7 +361,7 @@

-      plt.plot('b','b', 'o', data=data)

-  

-  

- -@image_comparison(baseline_images=['single_date'])

- +@image_comparison(baseline_images=['single_date'], tol=1.97)

-  def test_single_date():

-      time1 = [721964.0]

-      data1 = [-65.54]

- @@ -4696,7 +4696,7 @@

-  

-  

-  @image_comparison(baseline_images=['date_timezone_x_and_y'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=3.042)

-  def test_date_timezone_x_and_y():

-      # Tests issue 5575

-      time_index = [pytz.timezone('UTC').localize(datetime.datetime(

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_collections.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_collections.py.new	2017-01-07 21:35:52.016235301 -0800

- @@ -489,7 +489,7 @@

-      ax.autoscale_view()

-  

-  

- -@image_comparison(baseline_images=['polycollection_close'],

- +@image_comparison(baseline_images=['polycollection_close'], tol=0.446,

-                    extensions=['png'], remove_text=True)

-  def test_polycollection_close():

-      from mpl_toolkits.mplot3d import Axes3D

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_contour.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_contour.py.new	2017-01-07 21:36:29.283396673 -0800

- @@ -233,7 +233,7 @@

-              label.set_rotation(30)

-  

-  

- -@image_comparison(baseline_images=['contour_test_label_transforms'],

- +@image_comparison(baseline_images=['contour_test_label_transforms'], tol=0.731,

-                    extensions=['png'], remove_text=True)

-  def test_labels():

-      # Adapted from pylab_examples example code: contour_demo.py

- --- matplotlib-2.0.0rc2/lib/mpl_toolkits/tests/test_mplot3d.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/mpl_toolkits/tests/test_mplot3d.py.new	2017-01-07 21:37:04.144547626 -0800

- @@ -171,7 +171,7 @@

-      ax.set_zlabel('Z axis')

-  

-  

- -@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)

- +@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.081)

-  def test_trisurf3d():

-      n_angles = 36

-      n_radii = 8

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_transforms.py 2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_transforms.py.new     2017-01-07 21:21:29.478503151 -0800

- @@ -82,7 +82,7 @@

-  

-  

-  @image_comparison(baseline_images=['pre_transform_data'],

- -                  tol=0.08)

- +                  tol=0.15)

-  def test_pre_transform_plotting():

-      # a catch-all for as many as possible plot layouts which handle

-      # pre-transforming the data NOTE: The axis range is important in this

- 

@@ -1,55 +0,0 @@ 

- --- matplotlib-2.0.0rc2/lib/matplotlib/testing/decorators.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/testing/decorators.py.new	2017-01-07 21:19:51.078081193 -0800

- @@ -266,7 +266,7 @@

-  

-                  yield do_test, fignum, actual_fname, expected_fname

-  

- -def image_comparison(baseline_images=None, extensions=None, tol=0,

- +def image_comparison(baseline_images=None, extensions=None, tol=0.306,

-                       freetype_version=None, remove_text=False,

-                       savefig_kwarg=None, style='classic'):

-      """

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_png.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_png.py.new	2017-01-07 21:20:22.388215456 -0800

- @@ -17,7 +17,7 @@

-  

-  

-  @image_comparison(baseline_images=['pngsuite'], extensions=['png'],

- -                  tol=0.01 if on_win else 0)

- +                  tol=0.014)

-  def test_pngsuite():

-      dirname = os.path.join(

-          os.path.dirname(__file__),

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_streamplot.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_streamplot.py.new	2017-01-07 21:20:42.180300328 -0800

- @@ -18,7 +18,7 @@

-  

-  

-  @image_comparison(baseline_images=['streamplot_colormap'],

- -                  tol=0.002)

- +                  tol=0.009)

-  def test_colormap():

-      X, Y, U, V = velocity_field()

-      plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_patheffects.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_patheffects.py.new	2017-01-07 21:21:08.014411109 -0800

- @@ -110,7 +110,7 @@

-      assert_equal(pe._offset, (4, 5))

-  

-  

- -@image_comparison(baseline_images=['collection'], tol=0.015)

- +@image_comparison(baseline_images=['collection'], tol=0.083)

-  def test_collection():

-      x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))

-      data = np.sin(x) + np.cos(y)

- --- matplotlib-2.0.0rc2/lib/matplotlib/tests/test_mathtext.py	2016-12-18 11:40:53.000000000 -0800

- +++ matplotlib-2.0.0rc2/lib/matplotlib/tests/test_mathtext.py.new	2017-01-07 22:02:42.396426402 -0800

- @@ -158,7 +158,7 @@

-  

-  def make_set(basename, fontset, tests, extensions=None):

-      def make_test(filename, test):

- -        @image_comparison(baseline_images=[filename], extensions=extensions)

- +        @image_comparison(baseline_images=[filename], extensions=extensions, tol=0.310)

-          def single_test():

-              matplotlib.rcParams['mathtext.fontset'] = fontset

-              fig = plt.figure(figsize=(5.25, 0.75))

@@ -1,33 +0,0 @@ 

- --- setupext.py.orig	2013-08-02 09:39:43.914247832 +0200

- +++ setupext.py	2013-08-02 09:40:14.785304342 +0200

- @@ -914,28 +914,13 @@ class LibAgg(SetupPackage):

-          self.__class__.found_external = True

-          try:

-              return self._check_for_pkg_config(

- -                'libagg', 'agg2/agg_basics.h', min_version='PATCH')

- +                'libagg', 'agg2/agg_basics.h', min_version='2.5.0')

-          except CheckFailed as e:

-              self.__class__.found_external = False

-              return str(e) + ' Using local copy.'

-  

-      def add_flags(self, ext):

- -        if self.found_external:

- -            pkg_config.setup_extension(ext, 'libagg')

- -        else:

- -            ext.include_dirs.append('extern/agg24/include')

- -            agg_sources = [

- -                'agg_bezier_arc.cpp',

- -                'agg_curves.cpp',

- -                'agg_image_filters.cpp',

- -                'agg_trans_affine.cpp',

- -                'agg_vcgen_contour.cpp',

- -                'agg_vcgen_dash.cpp',

- -                'agg_vcgen_stroke.cpp',

- -                'agg_vpgen_segmentator.cpp'

- -                ]

- -            ext.sources.extend(

- -                os.path.join('extern', 'agg24', 'src', x) for x in agg_sources)

- +        pkg_config.setup_extension(ext, 'libagg', default_include_dirs=["/usr/include/agg2"])

-  

-  

-  class FreeType(SetupPackage):

@@ -1,24 +0,0 @@ 

- diff -up matplotlib-1.5.2rc2/setupext.py.qh matplotlib-1.5.2rc2/setupext.py

- --- matplotlib-1.5.2rc2/setupext.py.qh	2016-06-04 00:09:22.605827942 +0200

- +++ matplotlib-1.5.2rc2/setupext.py	2016-06-04 00:09:22.611827972 +0200

- @@ -1018,7 +1018,7 @@ class Qhull(SetupPackage):

-              # present on this system, so check if the header files can be

-              # found.

-              include_dirs = [

- -                os.path.join(x, 'qhull') for x in get_include_dirs()]

- +                os.path.join(x, 'libqhull') for x in get_include_dirs()]

-              if has_include_file(include_dirs, 'qhull_a.h'):

-                  return 'Using system Qhull (version unknown, no pkg-config info)'

-              else:

- diff -up matplotlib-1.5.2rc2/src/qhull_wrap.c.qh matplotlib-1.5.2rc2/src/qhull_wrap.c

- --- matplotlib-1.5.2rc2/src/qhull_wrap.c.qh	2016-05-27 04:19:34.000000000 +0200

- +++ matplotlib-1.5.2rc2/src/qhull_wrap.c	2016-06-04 00:09:22.608827957 +0200

- @@ -7,7 +7,7 @@

-   */

-  #include "Python.h"

-  #include "numpy/noprefix.h"

- -#include "qhull/qhull_a.h"

- +#include <libqhull/qhull_a.h>

-  #include <stdio.h>

-  

-  

@@ -1,34 +0,0 @@ 

- diff -up matplotlib-1.5.1/setupext.py.six matplotlib-1.5.1/setupext.py

- --- matplotlib-1.5.1/setupext.py.six	2016-01-10 23:20:20.000000000 +0100

- +++ matplotlib-1.5.1/setupext.py	2016-05-18 13:44:21.534494158 +0200

- @@ -1026,6 +1026,18 @@ class Qhull(SetupPackage):

-              ext.sources.extend(glob.glob('extern/qhull/*.c'))

-  

-  

- +class Six(SetupPackage):

- +    name = "six"

- +

- +    def check(self):

- +        try:

- +            import six

- +        except ImportError:

- +            return 'not found. pip may install it below.'

- +

- +        return 'version %s' % six.__version__

- +

- +

-  class TTConv(SetupPackage):

-      name = "ttconv"

-  

- diff -up matplotlib-1.5.1/setup.py.six matplotlib-1.5.1/setup.py

- --- matplotlib-1.5.1/setup.py.six	2016-01-10 23:20:20.000000000 +0100

- +++ matplotlib-1.5.1/setup.py	2016-05-18 13:44:21.528494040 +0200

- @@ -84,7 +84,7 @@ mpl_packages = [

-      setupext.Delaunay(),

-      setupext.QhullWrap(),

-      setupext.Tri(),

- -    setupext.Externals(),

- +    setupext.Six(),

-      'Optional subpackages',

-      setupext.SampleData(),

-      setupext.Toolkits(),

file modified
+77 -54
@@ -51,32 +51,32 @@ 

  # Use the same directory of the main package for subpackage licence and docs

  %global _docdir_fmt %{name}

  

- #global rctag rc2

+ #global rctag rc1

  

  Name:           python-matplotlib

- Version:        2.0.0

- Release:        3%{?rctag:.%{rctag}}%{?dist}.2

+ Version:        2.1.2

+ Release:        1%{?rctag:.%{rctag}}%{?dist}

  Summary:        Python 2D plotting library

  Group:          Development/Libraries

  # qt4_editor backend is MIT

  License:        Python and MIT

  URL:            http://matplotlib.org

- #Source0:        https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}.tar.gz#/matplotlib-%{version}%{?rctag}.tar.gz

- Source0:        matplotlib-%{version}-without-copyrighted.tar.xz

+ Source0:        https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}/matplotlib-%{version}%{?rctag}.tar.gz

  Source1:        setup.cfg

  

- Patch2:         20_matplotlibrc_path_search_fix.patch

- # https://github.com/matplotlib/matplotlib/issues/6538

- Patch8:         python-matplotlib-disable-failing-tests-arm.patch

- # https://github.com/matplotlib/matplotlib/issues/6791

- Patch9:         python-matplotlib-qhull.patch

- # https://github.com/matplotlib/matplotlib/issues/7134

- # https://github.com/matplotlib/matplotlib/issues/7158

- # https://github.com/matplotlib/matplotlib/issues/7159

- # https://github.com/matplotlib/matplotlib/issues/7797

- Patch10:        python-matplotlib-increase-tests-tolerance.patch

- Patch11:        python-matplotlib-increase-tests-tolerance-aarch64ppc64.patch

- Patch13:        python-matplotlib-increase-tests-tolerance-i686.patch

+ # https://github.com/matplotlib/matplotlib/pull/10310

+ Patch0001:      0001-Add-libdl-on-Unix-like-systems.patch

+ 

+ # Fedora-specific patches.

+ # https://github.com/QuLogic/mpl-images

+ Source1000:     matplotlib-%{version}-with-freetype-2.8.tar.gz

+ # https://github.com/QuLogic/matplotlib/tree/fedora-patches

+ Patch1001:      0001-matplotlibrc-path-search-fix.patch

+ Patch1002:      0002-Increase-tolerances-for-FreeType-2.7.1.patch

+ Patch1003:      0003-Increase-tolerances-for-FT-2.7.1-and-other-arches.patch

+ Patch1004:      0004-Increase-some-tolerances-for-32-bit-systems.patch

+ # https://github.com/QuLogic/matplotlib/tree/fedora-patches-non-x86

+ Patch1005:      0004-Increase-some-tolerances-for-non-x86-arches.patch

  

  BuildRequires:  freetype-devel

  BuildRequires:  libpng-devel
@@ -100,13 +100,15 @@ 

  BuildRequires:  numpy

  BuildRequires:  pyparsing

  BuildRequires:  python-dateutil

- BuildRequires:  python-pycxx-devel

  BuildRequires:  python-pyside

  BuildRequires:  python-setuptools

  BuildRequires:  python-six

  BuildRequires:  python-subprocess32

  BuildRequires:  python2-devel

- BuildRequires:  python2-functools32

+ %if %{fedora} > 26

+ BuildRequires:  python2-backports

+ %endif

+ BuildRequires:  python2-backports-functools_lru_cache

  BuildRequires:  python2-pillow

  BuildRequires:  pytz

  %if %{with_html}
@@ -120,7 +122,7 @@ 

  BuildRequires:  python2-cycler >= 0.10.0

  %endif

  %if %{run_tests}

- BuildRequires:  python-nose

+ BuildRequires:  python2-pytest

  BuildRequires:  python2-cycler >= 0.10.0

  BuildRequires:  python2-mock

  %endif
@@ -130,7 +132,7 @@ 

  Requires:       pyparsing

  Requires:       python2-cycler >= 0.10.0

  Requires:       python-dateutil

- Requires:       python2-functools32

+ Requires:       python2-backports-functools_lru_cache

  Requires:       python-matplotlib-data = %{version}-%{release}

  %{?backend_subpackage:Requires: python2-matplotlib-%{backend_subpackage}%{?_isa} = %{version}-%{release}}

  Recommends:     python2-pillow
@@ -293,7 +295,6 @@ 

  BuildRequires:  python3-gobject

  BuildRequires:  python3-numpy

  BuildRequires:  python3-pillow

- BuildRequires:  python3-pycxx-devel

  BuildRequires:  python3-pyparsing

  BuildRequires:  python3-pytz

  BuildRequires:  python3-six
@@ -305,8 +306,7 @@ 

  Requires:       python3-dateutil

  Requires:       python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}

  %if %{run_tests}

- BuildRequires:  python3-mock

- BuildRequires:  python3-nose

+ BuildRequires:  python3-pytest

  %endif

  Requires:       python3-numpy

  Recommends:     python3-pillow
@@ -388,8 +388,33 @@ 

  %endif

  

  %prep

- %setup -q -n matplotlib-%{version}%{?rctag}

- rm -r extern/qhull

+ %autosetup -n matplotlib-%{version}%{?rctag} -N

+ %patch0001 -p1

+ 

+ # Fedora-specific patches follow:

+ %patch1001 -p1

+ %if %{fedora} > 26

+ # Updated test images for FreeType 2.8.

+ gzip -dc %SOURCE1000 | tar xvf - --transform='s~^\([^/]\+\)/~lib/\1/tests/baseline_images/~'

+ %ifarch i686 armv7hl

+ # Apply this because 32-bit output is a bit off.

+ %patch1002 -p1

+ %endif

+ %ifnarch x86_64

+ %patch1003 -p1

+ %endif

+ %ifarch aarch64 ppc64 ppc64le s390x

+ %patch1005 -p1

+ %endif

+ %else

+ # Small tweaks to tolerances for FreeType 2.7.1.

+ %patch1002 -p1

+ %patch1003 -p1

+ %endif

+ %ifarch i686

+ %patch1004 -p1

+ %endif

+ rm -r extern/libqhull

  

  # Copy setup.cfg to the builddir

  sed 's/\(backend = \).*/\1%{backend}/' >setup.cfg <%{SOURCE1}
@@ -407,26 +432,6 @@ 

  sed -i 's/\(USE_FONTCONFIG = \)False/\1True/' lib/matplotlib/font_manager.py

  %endif

  

- %patch2 -p1

- %ifarch armv7hl aarch64

- %patch8 -p1 -b .tests-arm

- %endif

- 

- %if 0%{?fedora} > 24

- # Installation paths changed

- %patch9 -p1 -b .qh

- %endif

- %patch10 -p1 -b .tests

- %ifarch aarch64 %{power64} s390 s390x

- %patch11 -p1 -b .tests-aarch64ppc64

- %endif

- %ifarch i686

- %patch13 -p1 -b .tests-i686

- %endif

- 

- chmod -x lib/matplotlib/mpl-data/images/*.svg

- chmod -x lib/matplotlib/{dates,sankey}.py

- chmod -x lib/mpl_toolkits/mplot3d/*.py

  

  %build

  export http_proxy=http://127.0.0.1/
@@ -479,19 +484,26 @@ 

  

  %if %{run_tests}

  %check

+ # These files confuse pytest, and we want to test the installed copy.

+ rm -rf build*/

+ 

  export http_proxy=http://127.0.0.1/

  # This should match the default backend

  echo "backend      : %{backend}" > matplotlibrc

+ # Full tests are not run because pytest doesn't seem to understand namespace

+ # packages in PYTHONPATH.

  MPLCONFIGDIR=$PWD \

  MATPLOTLIBDATA=%{buildroot}%{_datadir}/matplotlib/mpl-data \

  PYTHONPATH=%{buildroot}%{python2_sitearch} \

-      xvfb-run -a %{__python2} tests.py --no-network --processes=$(getconf _NPROCESSORS_ONLN) --process-timeout=300

+      xvfb-run -a -s "-screen 0 640x480x24" \

+          %{__python2} -m pytest --pyargs matplotlib -m 'not network' -k 'not test_polycollection_close' -ra

  

  %if %{with_python3}

  MPLCONFIGDIR=$PWD \

  MATPLOTLIBDATA=%{buildroot}%{_datadir}/matplotlib/mpl-data \

  PYTHONPATH=%{buildroot}%{python3_sitearch} \

-      xvfb-run -a %{__python3} tests.py --no-network --processes=$(getconf _NPROCESSORS_ONLN) --process-timeout=300

+      xvfb-run -a -s "-screen 0 640x480x24" \

+          %{__python3} tests.py -m 'not network' -ra

  %endif

  %endif # run_tests

  
@@ -509,9 +521,7 @@ 

  

  %files -n python2-matplotlib

  %license LICENSE/

- %doc CONTRIBUTING.md

- %doc CHANGELOG

- %doc README.rst

+ %doc README.rst CONTRIBUTING.md

  %{python2_sitearch}/*egg-info

  %{python2_sitearch}/matplotlib-*-nspkg.pth

  %{python2_sitearch}/matplotlib/
@@ -570,9 +580,7 @@ 

  %if %{with_python3}

  %files -n python3-matplotlib

  %license LICENSE/

- %doc CONTRIBUTING.md

- %doc CHANGELOG

- %doc README.rst

+ %doc README.rst CONTRIBUTING.md

  %{python3_sitearch}/*egg-info

  %{python3_sitearch}/matplotlib-*-nspkg.pth

  %{python3_sitearch}/matplotlib/
@@ -621,6 +629,21 @@ 

  %endif

  

  %changelog

+ * Sun Jan 21 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.1.2-1

+ - Update to latest release

+ 

+ * Sun Dec 10 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.1.1-1

+ - Update to latest release

+ 

+ * Mon Oct 16 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.1.0-1

+ - Update to latest release

+ 

+ * Thu Sep 28 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.2-1

+ - Update to latest release

+ 

+ * Thu Sep 28 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.1-1

+ - Update to latest release

+ 

  * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3.2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

  

file removed
-21
@@ -1,21 +0,0 @@ 

- #! /bin/sh

- 

- version=$1

- 

- [ -z $version ] && exit 1

- 

- dir=matplotlib-${version}

- file=matplotlib-${version}.tar.gz

- result=matplotlib-${version}-without-copyrighted.tar.xz

- 

- test -f $file || exit 1

- 

- rm -rf matplotlib-${version}

- tar xzf $file

- 

- # https://github.com/matplotlib/matplotlib/issues/8034

- rm -vr matplotlib-${version}/lib/matplotlib/mpl-data/sample_data/necked_tensile_specimen.png

- rm -vr matplotlib-${version}/examples/images_contours_and_fields/interpolation_none_vs_nearest.py

- 

- rm -f $result

- tar cJf $result $dir

file modified
+2
@@ -1,5 +1,7 @@ 

  [packages]

  tests = True

+ toolkits = True

+ toolkits_tests = True

  

  [rc_options]

  backend = GTKAgg

file modified
+2 -1
@@ -1,1 +1,2 @@ 

- SHA512 (matplotlib-2.0.0-without-copyrighted.tar.xz) = 6413b0187b3d7ce5e4cbfaf7de4f42a747f1a415dbe3dca71c5f0ff0b8ac7139dc2807302bfbc67428281cfc7744cc23c6bbda041cd0568eff71801a740b862d

+ SHA512 (matplotlib-2.1.2.tar.gz) = fd93901b12a7f47cdc36d38d18de43b0cc8623dcd5597cfc1177e63cf90b0c87f718135176e2c077cd1316566a394e09e8e8e9db2ce128ee7f03021cac45543e

+ SHA512 (matplotlib-2.1.2-with-freetype-2.8.tar.gz) = abe03cf24d653ecaefcda56b60631b7200d7e2d5078801f61270d5329da8e6767773a1347a1c9c7b457a0a12427c345d70e700c156dedab27275875f5bcbc439

This is incomplete because a lot of tests fail due to the new FreeType. I am trying to figure out the best way to get that working.

Sorry for delayed response and thanks for your work! Do you have a copr build or a koji scratch build somewhere? I'd like to see the build logs.

That's alright; this was still a work-in-progress. I've updated to 2.1.0 now, and it builds on Fedora 26: https://koji.fedoraproject.org/koji/taskinfo?taskID=22478272

It still does not build on Fedora 27 or Rawhide; this is due to FreeType changing yet again, mostly: https://koji.fedoraproject.org/koji/taskinfo?taskID=22479219

6 new commits added

  • Add changelog for update.
  • Increase some tolerances for 32-bit systems.
  • Simplify and update patches.
  • Use 24-bit screen for Xvfb.
  • Disable broken tests.
  • Update to final 2.1.0 release.
6 years ago

@qulogic Thanks for a lot of work here. Dou you have any plan to finish this? I would like to build -doc subpackages for matplotlib after you finish update,

Let me know if you need any help.

Related bugzillas:

I can confirm that build in F26 is ok but in F27 not.

I am not sure if there is any way how to skip all tests depending on freetype and failing on image comparison. It isn't a good idea generally but we can skip tests in F27 and rawhide until they will be compatible with newer freetype or we can bundle older freetype somehow in SRPM just for testing.

Any other idea how to solve this?

I've tried to build the latest version of matplotlib with freetype 2.6.1 bundled in SRPM and it works. I cannot build it in rawhide because of broken dependencies but F27 build looks good: https://koji.fedoraproject.org/koji/taskinfo?taskID=23284863

I think that it might be a good idea to solve build issues with bundling and building own specific version of freetype because it is needed only for tests and it isn't included in binary RPMs.

Here is a simple patch for specfile:

diff --git a/python-matplotlib.spec b/python-matplotlib.spec
index 606fd26..7450c28 100644
--- a/python-matplotlib.spec
+++ b/python-matplotlib.spec
@@ -14,6 +14,10 @@
 # happen.
 %global run_tests               1

+# Because we need to use local freetype when freetype available in Fedora
+# is too new for matplotlib tests
+%global with_local_freetype 1
+%global freetype_version 2.6.1

 # On RHEL 7 onwards, don't build with wx:
 %if 0%{?rhel} >= 7
@@ -63,6 +67,10 @@ License:        Python and MIT
 URL:            http://matplotlib.org
 Source0:        https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}.tar.gz#/matplotlib-%{version}%{?rctag}.tar.gz
 Source1:        setup.cfg
+%if 0%{?with_local_freetype}
+# Downloaded from https://sourceforge.net/projects/freetype/files/freetype2/2.6.1/freetype-2.6.1.tar.gz
+Source2:        freetype-%{freetype_version}.tar.gz
+%endif

 # https://github.com/matplotlib/matplotlib/pull/9304
 Patch0001:      0001-TST-Skip-sphinxext-if-unavailable-instead-of-error.patch
@@ -404,6 +412,14 @@ Requires:       python3-tkinter
 %endif
 rm -r extern/libqhull

+# Add local_freetype to setup.cfg and copy source tarball to buildroot/build
+%if 0%{?with_local_freetype}
+echo -e "[test]\nlocal_freetype = True\n" | cat - %{SOURCE1} > %{SOURCE1}.new
+mv %{SOURCE1}.new %{SOURCE1}
+mkdir build
+cp %{SOURCE2} ./build/
+%endif
+
 # Copy setup.cfg to the builddir
 sed 's/\(backend = \).*/\1%{backend}/' >setup.cfg <%{SOURCE1}

It's a good practice to keep the source definition unconditionally, so when somebody gets the SRPM created with with_local_freetype 0, they can just flip the flag and build.

I think it's bad idea to bundle freetype just for tests.. It is like "what are you testing then?". And as Miro says, it is against guidelines to include sources conditionally.

@churchyard Thanks. The condition can be simply removed.

@ignatenkobrain I am not sure that this is a bad idea. I don't see any other possibility how to run tests of matplotlib in F28/F27 where freetype <= 2.7.1 is not available. If I understand it correctly, matplotlib tests contains a lot of pre-generated images (generated with freetype 2.6.1) and the same set of images is generated during tests. Then, these two sets are compared image by image and if the difference is too big, tests fail. So, if we use bundled freetype, we still test that matplotlib works and generates correct images. And I think that this is better than disabled tests. But it's just my opinion and I am not matplotlib nor freetype expert. Feel free to propose a better solution.

New patch without condition in sources:

diff --git a/python-matplotlib.spec b/python-matplotlib.spec
index 606fd26..240a4ce 100644
--- a/python-matplotlib.spec
+++ b/python-matplotlib.spec
@@ -14,6 +14,10 @@
 # happen.
 %global run_tests               1

+# Because we need to use local freetype when freetype available in Fedora
+# is too new for matplotlib tests
+%global with_local_freetype 1
+%global freetype_version 2.6.1

 # On RHEL 7 onwards, don't build with wx:
 %if 0%{?rhel} >= 7
@@ -63,6 +67,8 @@ License:        Python and MIT
 URL:            http://matplotlib.org
 Source0:        https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}.tar.gz#/matplotlib-%{version}%{?rctag}.tar.gz
 Source1:        setup.cfg
+# Downloaded from https://sourceforge.net/projects/freetype/files/freetype2/2.6.1/freetype-2.6.1.tar.gz
+Source2:        freetype-%{freetype_version}.tar.gz

 # https://github.com/matplotlib/matplotlib/pull/9304
 Patch0001:      0001-TST-Skip-sphinxext-if-unavailable-instead-of-error.patch
@@ -404,6 +410,14 @@ Requires:       python3-tkinter
 %endif
 rm -r extern/libqhull

+# Add local_freetype to setup.cfg and copy source tarball to buildroot/build
+%if 0%{?with_local_freetype}
+echo -e "[test]\nlocal_freetype = True\n" | cat - %{SOURCE1} > %{SOURCE1}.new
+mv %{SOURCE1}.new %{SOURCE1}
+mkdir build
+cp %{SOURCE2} ./build/
+%endif
+
 # Copy setup.cfg to the builddir
 sed 's/\(backend = \).*/\1%{backend}/' >setup.cfg <%{SOURCE1}

A cleaner (not necessarily more maintainable) solution would be to package old freetype as a compat package. (I'd rather not.)

I agree with @ignatenkobrain here. IIRC, it's not that matplotlib doesn't work or can't be tested against the latest freetype. It simply gives slightly different graphical output, which is not necessarily wrong. I think we should simply relax the allowed difference threshold like I did last time.

Ok, I am not strictly against this idea but I think that it means much more work than bundling suitable version of freetype for testing because mentioned patch might be big and hard to maintain.

Without bundled freetype, 839 out of 840 failed tests contains error message like this:

E           ImageComparisonFailure: images not close (RMS 6.135):
E               result_images/test_widgets/check_radio_buttons.png
E               result_images/test_widgets/check_radio_buttons-expected.png

From a list of RMSs, it seems that images differ a lot. Maximum RMS is 76.589, the minimum is 0.126, the median is 10.573 and average is 14.316.

We can set up RMS limit to some high number for all tests but it is a bad idea. Or we can adjust tolerance one by one for all 839 test which means a lot of work now and also during patch maintenance.

I have looked at this before and unfortunately, FreeType > 2.6.1 changes text output quite a bit. There are several options for changing hinting and such that could be set by environment variables. Unfortunately, Matplotlib disables FreeType hinting for tests so these options have no effect. I don't know if there's a way to get consistent rendering by enable hinting and then changing options in the new version.

A possibility for upstream is that we generate test images for several versions of FreeType and provide those for downstream packagers, but only for tags and held separately from the normal repository. That would limit repository bloat at least a bit until the version used for testing is updated. I haven't discussed this with upstream yet though.

1 new commit added

  • Update to latest version.
6 years ago

Updated for 2.1.1, which again passes on 26 but not 27 or rawhide.

I also opened a discussion upstream about testing with new FreeType.

As you can see in the mentioned mailing list, there are two discussed solutions:

  • separated repository for images generated with various versions of freetype
  • different approach for comparing images during tests (some AI/ML techniques]

But I think that we have to make some decision and implement some hotfix because we cannot wait for a solution from upstream. It seems that implementation of some ML procedure for image comparison can take too much time for us.

Question is, do we want to wait for the upstream solution or we want to use some hotfix and track what will happen in next releases?

We can't wait for upstream, i.e. the AI/ML solution will take too long.
I propose the following workaround:
- build python-matplotlib with freetype-2.8 (on a local machine, not in koji)
- visually sanity check all result_images//-failed-diff.png
- if those are ok, create a tarball of the result_images and use them as the new
baseline_images for the next python-matplotlib builds.

2 new commits added

  • Add test images re-generated with FreeType 2.8.
  • Add patch for consistent formatting on Fedora 28.
6 years ago

Now passing on Fedora 26, Fedora 27 x86_64, and Fedora 28 x86_64. I guess I'll need to make some tweaks to tolerances on other arches.

This is great work. I checked f27 build.logs and only 19 tests are failing on aarch64, ppc64le, ppc64, s390x and the RMS is 0.018 max, with 13 under 0.01. armv7hl and i686 fail with over 900 failures (RMS <= 0.093, most under 0.05). I guess it's a 64bit vs 32bit thing (float precision?). F28 build logs look about the same. Thanks for starting the discussion upstream, too.

https://src.fedoraproject.org/fork/qulogic/rpms/python-matplotlib/blob/master/f/0003-matplotlibrc-path-search-fix.patch is likely wrong, hard-coding paths like that. The original 20_matplotlibrc_path_search_fix.patch was minimally intrusive, so please follow its example.

Indeed, sorry. Yours is no worse than the original one. It could probably be done even better, taking paths passed to ./configure call, but that's another story.

@qulogic Great job. Please, let me know if I can help you with something. Looking forward to new matplotlib.

I'm just waiting for 2.1.2 (end-of-the-week-ish), so I don't need too many extra patches.

15 new commits added

  • Increase tolerances on non-x86 systems.
  • Also apply tolerance patch for 32-bit systems.
  • Add test images re-generated with FreeType 2.8.
  • Update to latest release.
  • Update to latest version.
  • Add changelog for update.
  • Increase some tolerances for 32-bit systems.
  • Simplify and update patches.
  • Use 24-bit screen for Xvfb.
  • Disable broken tests.
  • Update to final 2.1.0 release.
  • Update to 2.1.0 rc1.
  • Update to Matplotlib 2.0.2.
  • Update to 2.0.1.
  • Remove outdated patches.
6 years ago

This is OK on Fedora 26 and Fedora 27, but is failing on Fedora 28 due to the -z defs changes. I am working on a patch for that.

The last commit should pass on Fedora 28 too, though I don't feel like waiting up for it.

1 new commit added

  • Add patch to link with libdl.
6 years ago

IMHO Merge it, build it, ship it. if it fails, disable the -z flag temporarily and this can be fixed later.

@qulogic Big kudos on the work that you did. If there are no objections, I'll merge this tonight (around 23:00 UTC probably).

16 new commits added

  • Add patch to link with libdl.
  • Increase tolerances on non-x86 systems.
  • Also apply tolerance patch for 32-bit systems.
  • Add test images re-generated with FreeType 2.8.
  • Update to latest release.
  • Update to latest version.
  • Add changelog for update.
  • Increase some tolerances for 32-bit systems.
  • Simplify and update patches.
  • Use 24-bit screen for Xvfb.
  • Disable broken tests.
  • Update to final 2.1.0 release.
  • Update to 2.1.0 rc1.
  • Update to Matplotlib 2.0.2.
  • Update to 2.0.1.
  • Remove outdated patches.
6 years ago

Oops, fixed the link; not sure why it shows all the commits again.

@rathann do you plan to merge it soon? Can I help with something?

Pull-Request has been merged by rathann

6 years ago

Is the updated version not going to be built for Fedora 27 or 26? Then we don't need the FreeType 2.7 patches.