diff --git a/.gitignore b/.gitignore index ee955c9..95f5941 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /Cartopy-0.20.1.tar.gz /Cartopy-0.20.2.tar.gz /Cartopy-0.20.3.tar.gz +/Cartopy-0.21.0.tar.gz diff --git a/0001-Increase-tolerance-for-new-FreeType.patch b/0001-Increase-tolerance-for-new-FreeType.patch index f3df90b..1413359 100644 --- a/0001-Increase-tolerance-for-new-FreeType.patch +++ b/0001-Increase-tolerance-for-new-FreeType.patch @@ -1,113 +1,167 @@ -From 722b2ba6dc28d73aeb2ca8cc7d42178ae0410899 Mon Sep 17 00:00:00 2001 +From 3cd4152ba8a7ec7f089fdb912cff92fbd55ecedb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 26 Feb 2018 02:42:50 -0500 -Subject: [PATCH 1/5] Increase tolerance for new FreeType. +Subject: [PATCH 1/4] Increase tolerance for new FreeType. Signed-off-by: Elliott Sales de Andrade --- - lib/cartopy/tests/mpl/test_examples.py | 5 +---- - lib/cartopy/tests/mpl/test_gridliner.py | 9 +++++++-- - lib/cartopy/tests/mpl/test_ticks.py | 12 ++++++------ - 3 files changed, 14 insertions(+), 12 deletions(-) + lib/cartopy/tests/mpl/test_crs.py | 4 ++-- + lib/cartopy/tests/mpl/test_examples.py | 4 +--- + lib/cartopy/tests/mpl/test_gridliner.py | 11 +++++++---- + lib/cartopy/tests/mpl/test_mpl_integration.py | 2 +- + lib/cartopy/tests/mpl/test_ticks.py | 14 +++++++++----- + 5 files changed, 20 insertions(+), 15 deletions(-) +diff --git a/lib/cartopy/tests/mpl/test_crs.py b/lib/cartopy/tests/mpl/test_crs.py +index 7c8580a5..40321df8 100644 +--- a/lib/cartopy/tests/mpl/test_crs.py ++++ b/lib/cartopy/tests/mpl/test_crs.py +@@ -14,7 +14,7 @@ from cartopy.tests.mpl import MPL_VERSION + @pytest.mark.natural_earth + @pytest.mark.mpl_image_compare(filename="igh_land.png", + tolerance=(3.6 +- if MPL_VERSION.release[:2] < (3, 5) ++ if MPL_VERSION.release[:2] < (3, 6) + else 0.5)) + def test_igh_land(): + crs = ccrs.InterruptedGoodeHomolosine(emphasis="land") +@@ -27,7 +27,7 @@ def test_igh_land(): + @pytest.mark.natural_earth + @pytest.mark.mpl_image_compare(filename="igh_ocean.png", + tolerance=(4.5 +- if MPL_VERSION.release[:2] < (3, 5) ++ if MPL_VERSION.release[:2] < (3, 6) + else 0.5)) + def test_igh_ocean(): + crs = ccrs.InterruptedGoodeHomolosine( diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py -index 09dd8ee4..0a7591cf 100644 +index c678cc59..32bff3d4 100644 --- a/lib/cartopy/tests/mpl/test_examples.py +++ b/lib/cartopy/tests/mpl/test_examples.py -@@ -49,10 +49,7 @@ def test_global_map(): - +@@ -33,9 +33,7 @@ def test_global_map(): @pytest.mark.natural_earth --@ExampleImageTesting(['contour_label'], -- tolerance=(9.9 -- if MPL_VERSION < parse_version("3.2") -- else 0.5)) -+@ExampleImageTesting(['contour_label'], tolerance=10.4) + @pytest.mark.mpl_image_compare(filename='contour_label.png', +- tolerance=(9.9 +- if MPL_VERSION.release[:2] < (3, 3) +- else 0.5)) ++ tolerance=10.4) def test_contour_label(): from cartopy.tests.mpl.test_caching import sample_data fig = plt.figure() diff --git a/lib/cartopy/tests/mpl/test_gridliner.py b/lib/cartopy/tests/mpl/test_gridliner.py -index c9699eeb..122fefc2 100644 +index ba1614f9..918dd4f0 100644 --- a/lib/cartopy/tests/mpl/test_gridliner.py +++ b/lib/cartopy/tests/mpl/test_gridliner.py -@@ -133,6 +133,11 @@ grid_label_image = 'gridliner_labels' - grid_label_inline_image = 'gridliner_labels_inline' - grid_label_inline_usa_image = 'gridliner_labels_inline_usa' +@@ -127,6 +127,9 @@ def test_gridliner_specified_lines(): + # of text objects. A new testing strategy is needed for this kind of test. + grid_label_tol = 3.9 +# Force higher tolerance due to new FreeType on Fedora. +grid_label_tol = 15.2 -+grid_label_inline_tol = 11.0 -+grid_label_inline_usa_tol = 10.7 + @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") @pytest.mark.natural_earth -@@ -210,7 +215,7 @@ def test_grid_labels(): - +@@ -208,7 +211,7 @@ def test_grid_labels(): @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") @pytest.mark.natural_earth --@ImageTesting(['gridliner_labels_tight'], tolerance=4) -+@ImageTesting(['gridliner_labels_tight'], tolerance=47.1) + @pytest.mark.mpl_image_compare(filename='gridliner_labels_tight.png', +- tolerance=2.92) ++ tolerance=47.1) def test_grid_labels_tight(): # Ensure tight layout accounts for gridlines fig = plt.figure(figsize=(7, 5)) -@@ -295,7 +300,7 @@ def test_grid_labels_inline_usa(): - +@@ -252,7 +255,7 @@ def test_grid_labels_tight(): + @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") + @pytest.mark.natural_earth + @pytest.mark.parametrize('proj', TEST_PROJS) +-@pytest.mark.mpl_image_compare(style='mpl20') ++@pytest.mark.mpl_image_compare(style='mpl20', tolerance=8.36) + def test_grid_labels_inline(proj): + fig = plt.figure() + if isinstance(proj, tuple): +@@ -268,7 +271,7 @@ def test_grid_labels_inline(proj): + @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") + @pytest.mark.natural_earth + @pytest.mark.parametrize('proj', TEST_PROJS) +-@pytest.mark.mpl_image_compare(style='mpl20', tolerance=0.79) ++@pytest.mark.mpl_image_compare(style='mpl20', tolerance=7.76) + def test_grid_labels_inline_usa(proj): + top = 49.3457868 # north lat + left = -124.7844079 # west long +@@ -292,7 +295,7 @@ def test_grid_labels_inline_usa(proj): @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") --@ImageTesting(["gridliner_labels_bbox_style"], tolerance=grid_label_tol) -+@ImageTesting(["gridliner_labels_bbox_style"], tolerance=41.5) + @pytest.mark.mpl_image_compare(filename='gridliner_labels_bbox_style.png', +- tolerance=grid_label_tol) ++ tolerance=41.5) def test_gridliner_labels_bbox_style(): top = 49.3457868 # north lat left = -124.7844079 # west long +diff --git a/lib/cartopy/tests/mpl/test_mpl_integration.py b/lib/cartopy/tests/mpl/test_mpl_integration.py +index 884a950f..4740f796 100644 +--- a/lib/cartopy/tests/mpl/test_mpl_integration.py ++++ b/lib/cartopy/tests/mpl/test_mpl_integration.py +@@ -859,7 +859,7 @@ def test_streamplot(): + + + @pytest.mark.natural_earth +-@pytest.mark.mpl_image_compare() ++@pytest.mark.mpl_image_compare(tolerance=3.95) + def test_annotate(): + """ test a variety of annotate options on mulitple projections + diff --git a/lib/cartopy/tests/mpl/test_ticks.py b/lib/cartopy/tests/mpl/test_ticks.py -index 2eb6c470..46570324 100644 +index d629ccd7..fcf72164 100644 --- a/lib/cartopy/tests/mpl/test_ticks.py +++ b/lib/cartopy/tests/mpl/test_ticks.py -@@ -12,8 +12,8 @@ from cartopy.tests.mpl import ImageTesting +@@ -11,7 +11,8 @@ from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter @pytest.mark.natural_earth --@ImageTesting(['xticks_no_transform']) --def test_set_xticks_no_transform(): -+@ImageTesting(['xticks_no_transform'], tolerance=6.71) -+def test_set_xticks_no_transfora(): +-@pytest.mark.mpl_image_compare(filename='xticks_no_transform.png') ++@pytest.mark.mpl_image_compare(filename='xticks_no_transform.png', ++ tolerance=6.71) + def test_set_xticks_no_transform(): ax = plt.axes(projection=ccrs.PlateCarree()) ax.coastlines('110m') - ax.xaxis.set_major_formatter(LongitudeFormatter(degree_symbol='')) -@@ -22,7 +22,7 @@ def test_set_xticks_no_transform(): +@@ -22,7 +23,8 @@ def test_set_xticks_no_transform(): @pytest.mark.natural_earth --@ImageTesting(['xticks_cylindrical']) -+@ImageTesting(['xticks_cylindrical'], tolerance=7.13) +-@pytest.mark.mpl_image_compare(filename='xticks_cylindrical.png') ++@pytest.mark.mpl_image_compare(filename='xticks_cylindrical.png', ++ tolerance=7.13) def test_set_xticks_cylindrical(): ax = plt.axes(projection=ccrs.Mercator(min_latitude=-85, max_latitude=85)) ax.coastlines('110m') -@@ -41,7 +41,7 @@ def test_set_xticks_non_cylindrical(): +@@ -41,7 +43,8 @@ def test_set_xticks_non_cylindrical(): @pytest.mark.natural_earth --@ImageTesting(['yticks_no_transform']) -+@ImageTesting(['yticks_no_transform'], tolerance=3.75) +-@pytest.mark.mpl_image_compare(filename='yticks_no_transform.png') ++@pytest.mark.mpl_image_compare(filename='yticks_no_transform.png', ++ tolerance=3.75) def test_set_yticks_no_transform(): ax = plt.axes(projection=ccrs.PlateCarree()) ax.coastlines('110m') -@@ -51,7 +51,7 @@ def test_set_yticks_no_transform(): +@@ -52,7 +55,8 @@ def test_set_yticks_no_transform(): @pytest.mark.natural_earth --@ImageTesting(['yticks_cylindrical']) -+@ImageTesting(['yticks_cylindrical'], tolerance=4.37) +-@pytest.mark.mpl_image_compare(filename='yticks_cylindrical.png') ++@pytest.mark.mpl_image_compare(filename='yticks_cylindrical.png', ++ tolerance=4.37) def test_set_yticks_cylindrical(): ax = plt.axes(projection=ccrs.Mercator(min_latitude=-85, max_latitude=85)) ax.coastlines('110m') -@@ -72,7 +72,7 @@ def test_set_yticks_non_cylindrical(): +@@ -73,7 +77,7 @@ def test_set_yticks_non_cylindrical(): @pytest.mark.natural_earth --@ImageTesting(['xyticks']) -+@ImageTesting(['xyticks'], tolerance=7.19) +-@pytest.mark.mpl_image_compare(filename='xyticks.png') ++@pytest.mark.mpl_image_compare(filename='xyticks.png', tolerance=7.19) def test_set_xyticks(): fig = plt.figure(figsize=(10, 10)) projections = (ccrs.PlateCarree(), diff --git a/0002-Use-pkg-config-to-find-GEOS-instead-of-geos-config.patch b/0002-Use-pkg-config-to-find-GEOS-instead-of-geos-config.patch index 0e114b0..b5ad1c5 100644 --- a/0002-Use-pkg-config-to-find-GEOS-instead-of-geos-config.patch +++ b/0002-Use-pkg-config-to-find-GEOS-instead-of-geos-config.patch @@ -1,7 +1,7 @@ -From e589a1a90a13b0f0726885c78307d72c7bc507b5 Mon Sep 17 00:00:00 2001 +From 9c5213d34d9d9b72516832afa70824941cec0961 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 21 May 2022 01:36:44 -0400 -Subject: [PATCH 2/5] Use pkg-config to find GEOS instead of geos-config +Subject: [PATCH 2/4] Use pkg-config to find GEOS instead of geos-config Signed-off-by: Elliott Sales de Andrade --- @@ -9,10 +9,10 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py -index 6517b5e4..2bd3b5f3 100644 +index 8e061479..e1db810e 100644 --- a/setup.py +++ b/setup.py -@@ -108,11 +108,11 @@ def find_package_tree(root_path, root_package): +@@ -81,11 +81,11 @@ def file_walk_relative(top, remove=''): # GEOS try: diff --git a/0003-Remove-extraneous-insertion-of-default-compiler-path.patch b/0003-Remove-extraneous-insertion-of-default-compiler-path.patch index 387ebf3..703c471 100644 --- a/0003-Remove-extraneous-insertion-of-default-compiler-path.patch +++ b/0003-Remove-extraneous-insertion-of-default-compiler-path.patch @@ -1,7 +1,7 @@ -From 05e742c7be204919bd71a5cb68388f51ea8e1055 Mon Sep 17 00:00:00 2001 +From 0aee6b4dcb2b8d0a8e571e071c39d997296b5aa8 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 23 May 2022 02:42:38 -0400 -Subject: [PATCH 3/5] Remove extraneous insertion of default compiler paths +Subject: [PATCH 3/4] Remove extraneous insertion of default compiler paths Signed-off-by: Elliott Sales de Andrade --- @@ -9,18 +9,18 @@ Signed-off-by: Elliott Sales de Andrade 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py -index 2bd3b5f3..92a70a68 100644 +index e1db810e..bd4ab057 100644 --- a/setup.py +++ b/setup.py -@@ -30,7 +30,6 @@ import shutil +@@ -29,7 +29,6 @@ import shutil import subprocess import warnings from collections import defaultdict -from sysconfig import get_config_var - from setuptools import Command, Extension, convert_path, setup + from setuptools import Extension, find_packages, setup -@@ -250,16 +249,7 @@ install_requires = extras_require.pop('default') +@@ -130,16 +129,7 @@ install_requires = extras_require.pop('default') tests_require = extras_require.get('tests', []) # General extension paths @@ -37,16 +37,16 @@ index 2bd3b5f3..92a70a68 100644 # Description # =========== -@@ -277,10 +267,10 @@ extensions = [ +@@ -157,10 +147,10 @@ extensions = [ Extension( 'cartopy.trace', ['lib/cartopy/trace.pyx'], - include_dirs=([include_dir, './lib/cartopy', np.get_include()] + + include_dirs=(['./lib/cartopy', np.get_include()] + - proj_includes + geos_includes), - libraries=proj_libraries + geos_libraries, -- library_dirs=[library_dir] + proj_library_dirs + geos_library_dirs, -+ library_dirs=proj_library_dirs + geos_library_dirs, + geos_includes), + libraries=geos_libraries, +- library_dirs=[library_dir] + geos_library_dirs, ++ library_dirs=geos_library_dirs, language='c++', **extra_extension_args), ] diff --git a/0004-Allow-older-setuptools-scm.patch b/0004-Allow-older-setuptools-scm.patch new file mode 100644 index 0000000..d1f5bdf --- /dev/null +++ b/0004-Allow-older-setuptools-scm.patch @@ -0,0 +1,25 @@ +From 7c0b8014159fe09c4931208b13ba3ca0e3f34786 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Wed, 14 Sep 2022 04:15:29 -0400 +Subject: [PATCH 4/4] Allow older setuptools-scm + +Signed-off-by: Elliott Sales de Andrade +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index b905cf90..107d8eef 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -4,6 +4,6 @@ requires = [ + "setuptools >= 40.6.0", + "Cython >= 0.29.13", + "oldest-supported-numpy", +- "setuptools_scm >= 7.0.0", ++ "setuptools_scm", + ] + build-backend = "setuptools.build_meta" +-- +2.36.1 + diff --git a/0004-Replace-_autoscaleX_on-with-get_autoscalex_on.patch b/0004-Replace-_autoscaleX_on-with-get_autoscalex_on.patch deleted file mode 100644 index e05e126..0000000 --- a/0004-Replace-_autoscaleX_on-with-get_autoscalex_on.patch +++ /dev/null @@ -1,51 +0,0 @@ -From ea2967ba557f4f5a4fee19cd71c4e5d1f1786532 Mon Sep 17 00:00:00 2001 -From: HOLZSCHUCH Nicolas -Date: Sun, 26 Jun 2022 14:57:00 +0200 -Subject: [PATCH 4/5] Replace _autoscaleX_on with get_autoscalex_on() - -Signed-off-by: Elliott Sales de Andrade ---- - lib/cartopy/mpl/geoaxes.py | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/lib/cartopy/mpl/geoaxes.py b/lib/cartopy/mpl/geoaxes.py -index fcedf2f3..92b5aa16 100644 ---- a/lib/cartopy/mpl/geoaxes.py -+++ b/lib/cartopy/mpl/geoaxes.py -@@ -488,15 +488,16 @@ class GeoAxes(matplotlib.axes.Axes): - data_lim = self.dataLim.frozen().get_points() - view_lim = self.viewLim.frozen().get_points() - other = (self.ignore_existing_data_limits, -- self._autoscaleXon, self._autoscaleYon) -+ self.get_autoscalex_on(), self.get_autoscaley_on()) - try: - yield - finally: - if hold: - self.dataLim.set_points(data_lim) - self.viewLim.set_points(view_lim) -- (self.ignore_existing_data_limits, -- self._autoscaleXon, self._autoscaleYon) = other -+ self.ignore_existing_data_limits = other[0] -+ self.set_autoscalex_on(other[1]) -+ self.set_autoscaley_on(other[2]) - - def _draw_preprocess(self, renderer): - """ -@@ -943,11 +944,11 @@ class GeoAxes(matplotlib.axes.Axes): - matplotlib.axes.Axes.autoscale_view(self, tight=tight, - scalex=scalex, scaley=scaley) - # Limit the resulting bounds to valid area. -- if scalex and self._autoscaleXon: -+ if scalex and self.get_autoscalex_on(): - bounds = self.get_xbound() - self.set_xbound(max(bounds[0], self.projection.x_limits[0]), - min(bounds[1], self.projection.x_limits[1])) -- if scaley and self._autoscaleYon: -+ if scaley and self.get_autoscaley_on(): - bounds = self.get_ybound() - self.set_ybound(max(bounds[0], self.projection.y_limits[0]), - min(bounds[1], self.projection.y_limits[1])) --- -2.36.1 - diff --git a/0005-Fix-Axes-clearing-with-Matplotlib-3.6.patch b/0005-Fix-Axes-clearing-with-Matplotlib-3.6.patch deleted file mode 100644 index 66f0672..0000000 --- a/0005-Fix-Axes-clearing-with-Matplotlib-3.6.patch +++ /dev/null @@ -1,105 +0,0 @@ -From d6e8b5c1308571f3dabef82d3402f78a15e0ecce Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Sat, 20 Aug 2022 22:28:48 -0400 -Subject: [PATCH 5/5] Fix Axes clearing with Matplotlib 3.6+ - -Fix new deprecation warnings from Matplotlib 3.6 in tests - -Signed-off-by: Elliott Sales de Andrade ---- - lib/cartopy/mpl/geoaxes.py | 18 ++++++++++++++---- - lib/cartopy/tests/mpl/test_images.py | 3 +-- - lib/cartopy/tests/mpl/test_pseudo_color.py | 6 +++--- - 3 files changed, 18 insertions(+), 9 deletions(-) - -diff --git a/lib/cartopy/mpl/geoaxes.py b/lib/cartopy/mpl/geoaxes.py -index 92b5aa16..c568a124 100644 ---- a/lib/cartopy/mpl/geoaxes.py -+++ b/lib/cartopy/mpl/geoaxes.py -@@ -596,9 +596,8 @@ class GeoAxes(matplotlib.axes.Axes): - def __str__(self): - return '< GeoAxes: %s >' % self.projection - -- def cla(self): -- """Clear the current axes and adds boundary lines.""" -- result = matplotlib.axes.Axes.cla(self) -+ def _clear(self): -+ """Clear the current axes and add boundary lines.""" - self.xaxis.set_visible(False) - self.yaxis.set_visible(False) - # Enable tight autoscaling. -@@ -614,7 +613,18 @@ class GeoAxes(matplotlib.axes.Axes): - self.dataLim.intervalx = self.projection.x_limits - self.dataLim.intervaly = self.projection.y_limits - -- return result -+ if mpl.__version__ >= '3.6': -+ def clear(self): -+ """Clear the current Axes and add boundary lines.""" -+ result = matplotlib.axes.Axes.clear(self) -+ self._clear() -+ return result -+ else: -+ def cla(self): -+ """Clear the current Axes and add boundary lines.""" -+ result = matplotlib.axes.Axes.cla(self) -+ self._clear() -+ return result - - def format_coord(self, x, y): - """ -diff --git a/lib/cartopy/tests/mpl/test_images.py b/lib/cartopy/tests/mpl/test_images.py -index 8fc41a14..002b45b2 100644 ---- a/lib/cartopy/tests/mpl/test_images.py -+++ b/lib/cartopy/tests/mpl/test_images.py -@@ -9,7 +9,6 @@ import types - - import numpy as np - import matplotlib.pyplot as plt --import matplotlib.cm as cm - import matplotlib.colors as colors - from PIL import Image - import pytest -@@ -136,7 +135,7 @@ def test_imshow_rgba(): - # tests that the alpha of a RGBA array passed to imshow is set to 0 - # instead of masked - z = np.ones((100, 100))*0.5 -- cmap = cm.get_cmap() -+ cmap = plt.get_cmap() - norm = colors.Normalize(vmin=0, vmax=1) - z1 = cmap(norm(z)) - plt_crs = ccrs.LambertAzimuthalEqualArea() -diff --git a/lib/cartopy/tests/mpl/test_pseudo_color.py b/lib/cartopy/tests/mpl/test_pseudo_color.py -index 8e97d128..ec0655b2 100644 ---- a/lib/cartopy/tests/mpl/test_pseudo_color.py -+++ b/lib/cartopy/tests/mpl/test_pseudo_color.py -@@ -95,7 +95,7 @@ def test_pcolormesh_datalim(): - # Z with the same shape as X/Y to force the interpolation - z = np.zeros(xs.shape) - -- ax = plt.subplot(2, 1, 1, projection=ccrs.PlateCarree()) -+ ax = plt.subplot(3, 1, 1, projection=ccrs.PlateCarree()) - coll = ax.pcolormesh(xs, ys, z, shading='auto', - transform=ccrs.PlateCarree()) - -@@ -107,7 +107,7 @@ def test_pcolormesh_datalim(): - y = [-10, 10] - - xs, ys = np.meshgrid(x, y) -- ax = plt.subplot(2, 1, 1, projection=ccrs.PlateCarree()) -+ ax = plt.subplot(3, 1, 2, projection=ccrs.PlateCarree()) - coll = ax.pcolormesh(xs, ys, z, shading='auto', - transform=ccrs.PlateCarree()) - -@@ -119,7 +119,7 @@ def test_pcolormesh_datalim(): - y = [-10, 10] - - xs, ys = np.meshgrid(x, y) -- ax = plt.subplot(2, 1, 1, projection=ccrs.Orthographic()) -+ ax = plt.subplot(3, 1, 3, projection=ccrs.Orthographic()) - coll = ax.pcolormesh(xs, ys, z, shading='auto', - transform=ccrs.PlateCarree()) - --- -2.36.1 - diff --git a/python-cartopy.spec b/python-cartopy.spec index a2ceb16..e794879 100644 --- a/python-cartopy.spec +++ b/python-cartopy.spec @@ -5,7 +5,7 @@ %bcond_with network Name: python-%{srcname} -Version: 0.20.3 +Version: 0.21.0 Release: %autorelease Summary: Cartographic Python library with Matplotlib visualisations @@ -20,16 +20,11 @@ Patch0001: 0001-Increase-tolerance-for-new-FreeType.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2088864 Patch0002: 0002-Use-pkg-config-to-find-GEOS-instead-of-geos-config.patch Patch0003: 0003-Remove-extraneous-insertion-of-default-compiler-path.patch -# Fix compatibility with Matplotlib 3.6 -# https://github.com/SciTools/cartopy/pull/2054 -Patch0004: 0004-Replace-_autoscaleX_on-with-get_autoscalex_on.patch -# https://github.com/SciTools/cartopy/pull/2071 -Patch0005: 0005-Fix-Axes-clearing-with-Matplotlib-3.6.patch +# We don't need to worry about the bugs with setuptools-scm < 7. +Patch0004: 0004-Allow-older-setuptools-scm.patch -BuildRequires: git-core BuildRequires: gcc-c++ BuildRequires: geos-devel >= 3.7.2 -BuildRequires: proj-devel >= 8.0.0 BuildRequires: proj-data-uk BuildRequires: python3-devel BuildRequires: python3dist(pytest-xdist) @@ -39,7 +34,7 @@ Cartopy is a Python package designed to make drawing maps for data analysis and visualisation easy. It features: * object oriented projection definitions * point, line, polygon and image transformations between projections -* integration to expose advanced mapping in matplotlib with a simple and +* integration to expose advanced mapping in Matplotlib with a simple and intuitive interface * powerful vector data handling by integrating shapefile reading with Shapely capabilities @@ -52,13 +47,9 @@ and visualisation easy. It features: Summary: %{summary} Requires: python-%{srcname}-common = %{version}-%{release} -# OWS requirements -Recommends: python3dist(owslib) >= 0.18 -# Plotting requirements -Recommends: python3dist(gdal) >= 2.3.2 -Recommends: python3dist(pillow) >= 6.1 +Recommends: python3dist(cartopy[ows]) = %{version}-%{release} +Recommends: python3dist(cartopy[plotting]) = %{version}-%{release} Recommends: python3dist(pykdtree) >= 1.2.2 -Recommends: python3dist(scipy) >= 1.3.1 %description -n python3-%{srcname} %{_description} @@ -78,8 +69,11 @@ Suggests: natural-earth-map-data-10m Data files for %{srcname}. +%pyproject_extras_subpkg -n python3-cartopy ows plotting + + %prep -%autosetup -n %{Srcname}-%{version} -p1 -S git +%autosetup -n %{Srcname}-%{version} -p1 cp -a %SOURCE1 lib/cartopy/ sed -i -e 's/oldest-supported-numpy/numpy/g' pyproject.toml @@ -110,7 +104,7 @@ done %check MPLBACKEND=Agg \ - %{pytest} -n auto --doctest-modules --pyargs cartopy \ + %{pytest} -n auto --doctest-modules --mpl --pyargs cartopy \ %if %{with network} %{nil} %else diff --git a/sources b/sources index dc9cecc..b83ce45 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Cartopy-0.20.3.tar.gz) = 87d64e8ae48c33b934ac26d05337fbbcb6936c5301d1c3e9f2ecb88fa487059727ccc62bdcd46e37f951532d9ecf781c1e465d5f5b4ead2167aa58c10d0ff1d5 +SHA512 (Cartopy-0.21.0.tar.gz) = bacb43487a6cdd6901ccd08fe6d4cea22c4efa35db2a8827fadba94518d3280cd0b778d2148d55b4bc49ed56900f76ba16ab2ef811c666a13c86074da5d3a364