diff --git a/0006-Increase-some-tolerances-for-32-bit-systems.patch b/0006-Increase-some-tolerances-for-32-bit-systems.patch new file mode 100644 index 0000000..60ee617 --- /dev/null +++ b/0006-Increase-some-tolerances-for-32-bit-systems.patch @@ -0,0 +1,82 @@ +From 49e10df68f0c59f81aa5ec07ead5941db349da6d Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Tue, 27 Feb 2018 02:14:00 -0500 +Subject: [PATCH 6/7] Increase some tolerances for 32-bit systems. + +Signed-off-by: Elliott Sales de Andrade +--- + lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py | 2 +- + lib/cartopy/tests/mpl/test_examples.py | 2 +- + lib/cartopy/tests/mpl/test_features.py | 2 +- + lib/cartopy/tests/mpl/test_images.py | 2 +- + lib/cartopy/tests/mpl/test_img_transform.py | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py b/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py +index 93663d0..b8a4db1 100644 +--- a/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py ++++ b/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py +@@ -42,7 +42,7 @@ class TestLambertAzimuthalEqualArea(object): + decimal=4) + assert_almost_equal(np.array(crs.y_limits), + [-12727770.598700099, 12727770.598700099], +- decimal=4) ++ decimal=1) + + def test_eccentric_globe(self): + globe = ccrs.Globe(semimajor_axis=1000, semiminor_axis=500, +diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py +index db689e0..69d4f5a 100644 +--- a/lib/cartopy/tests/mpl/test_examples.py ++++ b/lib/cartopy/tests/mpl/test_examples.py +@@ -43,7 +43,7 @@ class ExampleImageTesting(ImageTesting): + + @pytest.mark.natural_earth + @ExampleImageTesting(['global_map'], +- tolerance=4 if MPL_VERSION < '2' else 0) ++ tolerance=4 if MPL_VERSION < '2' else 0.05) + def test_global_map(): + import cartopy.examples.global_map as c + c.main() +diff --git a/lib/cartopy/tests/mpl/test_features.py b/lib/cartopy/tests/mpl/test_features.py +index 250e3db..f36c344 100644 +--- a/lib/cartopy/tests/mpl/test_features.py ++++ b/lib/cartopy/tests/mpl/test_features.py +@@ -54,7 +54,7 @@ def test_natural_earth_custom(): + + + @ImageTesting(['gshhs_coastlines'], +- tolerance=1.7 if MPL_VERSION < '2' else 0) ++ tolerance=1.7 if MPL_VERSION < '2' else 0.07) + def test_gshhs(): + ax = plt.axes(projection=ccrs.Mollweide()) + ax.set_extent([138, 142, 32, 42], ccrs.Geodetic()) +diff --git a/lib/cartopy/tests/mpl/test_images.py b/lib/cartopy/tests/mpl/test_images.py +index 55a7ee5..43c8d49 100644 +--- a/lib/cartopy/tests/mpl/test_images.py ++++ b/lib/cartopy/tests/mpl/test_images.py +@@ -173,7 +173,7 @@ def test_pil_Image(): + reason='Proj Orthographic projection is buggy.', + strict=True) + @ImageTesting(['imshow_natural_earth_ortho'], +- tolerance=4.2 if MPL_VERSION < '2' else 0) ++ tolerance=4.2 if MPL_VERSION < '2' else 0.05) + def test_background_img(): + ax = plt.axes(projection=ccrs.Orthographic()) + ax.background_img(name='ne_shaded', resolution='low') +diff --git a/lib/cartopy/tests/mpl/test_img_transform.py b/lib/cartopy/tests/mpl/test_img_transform.py +index 3b53c0a..dfea25a 100644 +--- a/lib/cartopy/tests/mpl/test_img_transform.py ++++ b/lib/cartopy/tests/mpl/test_img_transform.py +@@ -98,7 +98,7 @@ elif '2.0.1' <= MPL_VERSION: + # Bug in latest Matplotlib that we don't consider correct. + regrid_tolerance = 4.75 + else: +- regrid_tolerance = 0 ++ regrid_tolerance = 0.03 + + + @pytest.mark.natural_earth +-- +2.14.3 + diff --git a/python-cartopy.spec b/python-cartopy.spec index cfb0bcb..c43c562 100644 --- a/python-cartopy.spec +++ b/python-cartopy.spec @@ -13,6 +13,7 @@ Source0: https://files.pythonhosted.org/packages/source/C/%{Srcname}/%{Sr Source1: siteconfig.py # Might not go upstream in current form. Patch0004: 0001-Increase-tolerance-for-new-FreeType.patch +Patch0006: 0006-Increase-some-tolerances-for-32-bit-systems.patch BuildRequires: gcc-c++ BuildRequires: geos-devel >= 3.3.3