diff --git a/.gitignore b/.gitignore index 6526b10..32794b9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,14 +8,3 @@ /Cartopy-0.19.0rc1.tar.gz /proj-7.2.1.tar.gz /Cartopy-0.19.0.tar.gz -/Cartopy-0.20.0.tar.gz -/Cartopy-0.20.1.tar.gz -/Cartopy-0.20.2.tar.gz -/Cartopy-0.20.3.tar.gz -/Cartopy-0.21.0.tar.gz -/Cartopy-0.21.1.tar.gz -/Cartopy-0.22.0.tar.gz -/Cartopy-0.23.0.tar.gz -/cartopy-0.24.0.tar.gz -/cartopy-0.24.1.tar.gz -/cartopy-0.25.0.tar.gz diff --git a/.packit.yaml b/.packit.yaml deleted file mode 100644 index b2a3bc6..0000000 --- a/.packit.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# See the documentation for more information: -# https://packit.dev/docs/configuration/ ---- -jobs: - - job: pull_from_upstream - trigger: release - dist_git_branches: - rawhide: - fast_forward_merge_into: - - fedora-branched - - job: koji_build - trigger: commit - allowed_committers: - - all_admins - dist_git_branches: - - fedora-all - - job: bodhi_update - trigger: commit - dist_git_branches: - - fedora-all diff --git a/0001-Increase-tolerance-for-new-FreeType.patch b/0001-Increase-tolerance-for-new-FreeType.patch new file mode 100644 index 0000000..661b929 --- /dev/null +++ b/0001-Increase-tolerance-for-new-FreeType.patch @@ -0,0 +1,52 @@ +From 736a33a0b2814c93449c0a3f42b37f2862e5a746 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Mon, 26 Feb 2018 02:42:50 -0500 +Subject: [PATCH] Increase tolerance for new FreeType. + +Signed-off-by: Elliott Sales de Andrade +--- + lib/cartopy/tests/mpl/test_examples.py | 2 +- + lib/cartopy/tests/mpl/test_gridliner.py | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py +index db2b49bb..bf77ab9a 100644 +--- a/lib/cartopy/tests/mpl/test_examples.py ++++ b/lib/cartopy/tests/mpl/test_examples.py +@@ -49,7 +49,7 @@ def test_global_map(): + + contour_image = 'contour_label' if MPL_VERSION < '3.4' else 'contour_label_3.4' + @pytest.mark.natural_earth +-@ExampleImageTesting([contour_image], tolerance=0) ++@ExampleImageTesting([contour_image], tolerance=10.1) + 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 ac73b5d6..cd19133f 100644 +--- a/lib/cartopy/tests/mpl/test_gridliner.py ++++ b/lib/cartopy/tests/mpl/test_gridliner.py +@@ -136,6 +136,11 @@ grid_label_image = 'gridliner_labels' + grid_label_inline_image = 'gridliner_labels_inline' + grid_label_inline_usa_image = 'gridliner_labels_inline_usa' + ++# Force higher tolerance due to new FreeType on Fedora. ++grid_label_tol = 41.5 ++grid_label_inline_tol = 10.6 ++grid_label_inline_usa_tol = 11.5 ++ + + @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") + @pytest.mark.natural_earth +@@ -215,7 +220,7 @@ def test_grid_labels(): + @pytest.mark.natural_earth + @ImageTesting(['gridliner_labels_tight'], + tolerance=grid_label_tol if ccrs.PROJ4_VERSION < (7, 1, 0) +- else 4) ++ else 48) + def test_grid_labels_tight(): + # Ensure tight layout accounts for gridlines + fig = plt.figure(figsize=(7, 5)) +-- +2.29.2 + diff --git a/0001-Reduce-numpy-build-dependency.patch b/0001-Reduce-numpy-build-dependency.patch deleted file mode 100644 index 42c7c25..0000000 --- a/0001-Reduce-numpy-build-dependency.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e3a61e272d5ab58a2b8f13c6ad05d1136d3a5ecc Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Thu, 25 Apr 2024 16:35:29 -0400 -Subject: [PATCH 1/2] Reduce numpy build dependency - -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 f0172aac..4e012ede 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -9,7 +9,7 @@ requires = [ - # Note that building against numpy 1.x works fine too - users and - # redistributors can do this by installing the numpy version they like and - # disabling build isolation. -- "numpy>=2.0.0", -+ "numpy>=1.23", - "setuptools_scm >= 8.0.0", - ] - build-backend = "setuptools.build_meta" --- -2.50.0 - diff --git a/0002-Increase-tolerance-for-new-FreeType.patch b/0002-Increase-tolerance-for-new-FreeType.patch deleted file mode 100644 index cc87dde..0000000 --- a/0002-Increase-tolerance-for-new-FreeType.patch +++ /dev/null @@ -1,170 +0,0 @@ -From d3d4e7a80ded257b3094d837e5133b199989b460 Mon Sep 17 00:00:00 2001 -From: Elliott Sales de Andrade -Date: Mon, 26 Feb 2018 02:42:50 -0500 -Subject: [PATCH 2/2] Increase tolerance for new FreeType - -Signed-off-by: Elliott Sales de Andrade ---- - lib/cartopy/tests/mpl/test_examples.py | 2 +- - lib/cartopy/tests/mpl/test_gridliner.py | 19 +++++++------------ - lib/cartopy/tests/mpl/test_mpl_integration.py | 2 +- - lib/cartopy/tests/mpl/test_ticks.py | 14 +++++++++----- - 4 files changed, 18 insertions(+), 19 deletions(-) - -diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py -index a7f64ac9..404d3d83 100644 ---- a/lib/cartopy/tests/mpl/test_examples.py -+++ b/lib/cartopy/tests/mpl/test_examples.py -@@ -37,7 +37,7 @@ def test_global_map(): - - @pytest.mark.natural_earth - @pytest.mark.mpl_image_compare( -- filename='contour_label.png', tolerance=3.9 if _MPL_38 else 0.5) -+ filename='contour_label.png', tolerance=11.2 if _MPL_38 else 0.5) - 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 66144070..3ff88139 100644 ---- a/lib/cartopy/tests/mpl/test_gridliner.py -+++ b/lib/cartopy/tests/mpl/test_gridliner.py -@@ -130,15 +130,10 @@ def test_gridliner_specified_lines(): - assert gl.ylocator.tick_values(None, None).tolist() == parallels - - --# The tolerance on these tests are particularly high because of the high number --# of text objects. A new testing strategy is needed for this kind of test. --grid_label_tol = 3.9 -- -- - @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") - @pytest.mark.natural_earth - @pytest.mark.mpl_image_compare(filename='gridliner_labels.png', -- tolerance=grid_label_tol) -+ tolerance=15.2) - def test_grid_labels(): - fig = plt.figure(figsize=(10, 10)) - -@@ -211,7 +206,7 @@ def test_grid_labels(): - @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") - @pytest.mark.natural_earth - @pytest.mark.mpl_image_compare(filename='gridliner_labels_tight.png', -- tolerance=2.9) -+ tolerance=47.1) - def test_grid_labels_tight(): - # Ensure tight layout accounts for gridlines - fig = plt.figure(figsize=(7, 5)) -@@ -259,7 +254,7 @@ def test_grid_labels_tight(): - - @pytest.mark.mpl_image_compare( - filename='gridliner_constrained_adjust_datalim.png', -- tolerance=grid_label_tol) -+ tolerance=46.5) - def test_gridliner_constrained_adjust_datalim(): - fig = plt.figure(figsize=(8, 4), layout="constrained") - -@@ -293,7 +288,7 @@ def test_gridliner_constrained_adjust_datalim(): - @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): -@@ -309,7 +304,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 -@@ -334,7 +329,7 @@ def test_grid_labels_inline_usa(proj): - @pytest.mark.natural_earth - @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug") - @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 -@@ -521,7 +516,7 @@ def test_gridliner_save_tight_bbox(): - - @pytest.mark.natural_earth - @pytest.mark.mpl_image_compare(filename='gridliner_labels_title_adjust.png', -- tolerance=grid_label_tol) -+ tolerance=61.3) - def test_gridliner_title_adjust(): - # Test that title do not overlap labels - projs = [ccrs.Mercator(), ccrs.AlbersEqualArea(), ccrs.LambertConformal(), -diff --git a/lib/cartopy/tests/mpl/test_mpl_integration.py b/lib/cartopy/tests/mpl/test_mpl_integration.py -index f1aeccdf..78866085 100644 ---- a/lib/cartopy/tests/mpl/test_mpl_integration.py -+++ b/lib/cartopy/tests/mpl/test_mpl_integration.py -@@ -1016,7 +1016,7 @@ def test_streamplot(): - - - @pytest.mark.natural_earth --@pytest.mark.mpl_image_compare() -+@pytest.mark.mpl_image_compare(tolerance=3.96) - def test_annotate(): - """ test a variety of annotate options on multiple projections - -diff --git a/lib/cartopy/tests/mpl/test_ticks.py b/lib/cartopy/tests/mpl/test_ticks.py -index f75ad2d2..bc0ba0b7 100644 ---- a/lib/cartopy/tests/mpl/test_ticks.py -+++ b/lib/cartopy/tests/mpl/test_ticks.py -@@ -10,7 +10,8 @@ from cartopy.mpl.ticker import LatitudeFormatter, LongitudeFormatter - - - @pytest.mark.natural_earth --@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') -@@ -21,7 +22,8 @@ def test_set_xticks_no_transform(): - - - @pytest.mark.natural_earth --@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') -@@ -40,7 +42,8 @@ def test_set_xticks_non_cylindrical(): - - - @pytest.mark.natural_earth --@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 +54,8 @@ def test_set_yticks_no_transform(): - - - @pytest.mark.natural_earth --@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 +76,7 @@ def test_set_yticks_non_cylindrical(): - - - @pytest.mark.natural_earth --@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(), --- -2.50.0 - diff --git a/README.packit b/README.packit deleted file mode 100644 index 3ad54d6..0000000 --- a/README.packit +++ /dev/null @@ -1,3 +0,0 @@ -This repository is maintained by packit. -https://packit.dev/ -The file was generated using packit 1.11.0. diff --git a/cartopy_bundle-proj.patch b/cartopy_bundle-proj.patch new file mode 100644 index 0000000..b8c88a1 --- /dev/null +++ b/cartopy_bundle-proj.patch @@ -0,0 +1,167 @@ +diff -rupN Cartopy-0.19.0rc1/lib/cartopy/_proj4.pxd Cartopy-0.19.0rc1-new/lib/cartopy/_proj4.pxd +--- Cartopy-0.19.0rc1/lib/cartopy/_proj4.pxd 2021-03-12 16:14:24.000000000 +0100 ++++ Cartopy-0.19.0rc1-new/lib/cartopy/_proj4.pxd 2021-03-23 01:17:48.195109606 +0100 +@@ -23,6 +23,6 @@ cdef extern from "proj_api.h": + int pj_is_latlong(projPJ) nogil + char *pj_strerrno(int) nogil + int *pj_get_errno_ref() nogil +- char *pj_get_release() nogil ++ const char *pj_get_release() nogil + cdef double DEG_TO_RAD + cdef double RAD_TO_DEG +diff -rupN Cartopy-0.19.0rc1/setup.py Cartopy-0.19.0rc1-new/setup.py +--- Cartopy-0.19.0rc1/setup.py 2021-03-12 16:14:24.000000000 +0100 ++++ Cartopy-0.19.0rc1-new/setup.py 2021-03-23 01:29:31.342127777 +0100 +@@ -141,109 +141,11 @@ else: + + + # Proj +-def find_proj_version_by_program(conda=None): +- proj = find_executable('proj') +- if proj is None: +- print( +- 'Proj {} must be installed.'.format( +- '.'.join(str(v) for v in PROJ_MIN_VERSION)), +- file=sys.stderr) +- exit(1) +- +- if conda is not None and conda not in proj: +- print( +- 'Proj {} must be installed in Conda environment "{}".'.format( +- '.'.join(str(v) for v in PROJ_MIN_VERSION), conda), +- file=sys.stderr) +- exit(1) +- +- try: +- proj_version = subprocess.check_output([proj], +- stderr=subprocess.STDOUT) +- proj_version = proj_version.split()[1].split(b'.') +- proj_version = tuple(int(v.strip(b',')) for v in proj_version) +- except (OSError, IndexError, ValueError, subprocess.CalledProcessError): +- warnings.warn( +- 'Unable to determine Proj version. Ensure you have %s or later ' +- 'installed, or installation may fail.' % ( +- '.'.join(str(v) for v in PROJ_MIN_VERSION), )) +- proj_version = (0, 0, 0) +- +- return proj_version +- +- +-def get_proj_libraries(): +- """ +- This function gets the PROJ libraries to cythonize with +- """ +- proj_libraries = ["proj"] +- if os.name == "nt" and (6, 0, 0) <= proj_version < (6, 3, 0): +- proj_libraries = [ +- "proj_{}_{}".format(proj_version[0], proj_version[1]) +- ] +- return proj_libraries +- +- +-conda = os.getenv('CONDA_DEFAULT_ENV') +-if conda is not None and conda in sys.prefix: +- # Conda does not provide pkg-config compatibility, but the search paths +- # should be set up so that nothing extra is required. We'll still check +- # the version, though. +- proj_version = find_proj_version_by_program(conda) +- if proj_version < PROJ_MIN_VERSION: +- print( +- 'Proj version %s is installed, but cartopy requires at least ' +- 'version %s.' % ('.'.join(str(v) for v in proj_version), +- '.'.join(str(v) for v in PROJ_MIN_VERSION)), +- file=sys.stderr) +- exit(1) +- +- proj_includes = [] +- proj_libraries = get_proj_libraries() +- proj_library_dirs = [] +- +-else: +- try: +- proj_version = subprocess.check_output(['pkg-config', '--modversion', +- 'proj'], +- stderr=subprocess.STDOUT) +- proj_version = tuple(int(v) for v in proj_version.split(b'.')) +- proj_includes = subprocess.check_output(['pkg-config', '--cflags', +- 'proj']) +- proj_clibs = subprocess.check_output(['pkg-config', '--libs', 'proj']) +- except (OSError, ValueError, subprocess.CalledProcessError): +- proj_version = find_proj_version_by_program() +- if proj_version < PROJ_MIN_VERSION: +- print( +- 'Proj version %s is installed, but cartopy requires at least ' +- 'version %s.' % ('.'.join(str(v) for v in proj_version), +- '.'.join(str(v) for v in PROJ_MIN_VERSION)), +- file=sys.stderr) +- exit(1) +- +- proj_includes = [] +- proj_libraries = get_proj_libraries() +- proj_library_dirs = [] +- else: +- if proj_version < PROJ_MIN_VERSION: +- print( +- 'Proj version %s is installed, but cartopy requires at least ' +- 'version %s.' % ('.'.join(str(v) for v in proj_version), +- '.'.join(str(v) for v in PROJ_MIN_VERSION)), +- file=sys.stderr) +- exit(1) +- +- proj_includes = [ +- proj_include[2:] if proj_include.startswith('-I') else +- proj_include for proj_include in proj_includes.decode().split()] +- +- proj_libraries = [] +- proj_library_dirs = [] +- for entry in proj_clibs.decode().split(): +- if entry.startswith('-L'): +- proj_library_dirs.append(entry[2:]) +- elif entry.startswith('-l'): +- proj_libraries.append(entry[2:]) ++proj_version = tuple(map(int, os.getenv("PROJ_VERSION").split(".")) ) ++proj_includes = [os.getenv("PROJ_INCLUDE_DIRS")] ++proj_libraries = [os.getenv("PROJ_LIBRARIES")] ++proj_library_dirs = [] ++ + + # Python dependencies + extras_require = {} +@@ -295,24 +197,31 @@ extensions = [ + ['lib/cartopy/trace.pyx'], + include_dirs=([include_dir, './lib/cartopy', np.get_include()] + + proj_includes + geos_includes), +- libraries=proj_libraries + geos_libraries, +- library_dirs=[library_dir] + proj_library_dirs + geos_library_dirs, ++ libraries=geos_libraries + ["curl", "sqlite3", "tiff"], ++ extra_objects=proj_libraries, ++ extra_link_args=["-fPIC"], ++ library_dirs=[library_dir] + geos_library_dirs, + language='c++', + **extra_extension_args), + Extension( + 'cartopy._crs', + ['lib/cartopy/_crs.pyx'], + include_dirs=[include_dir, np.get_include()] + proj_includes, +- libraries=proj_libraries, +- library_dirs=[library_dir] + proj_library_dirs, ++ libraries=["curl", "sqlite3", "tiff"], ++ library_dirs=[library_dir], ++ extra_objects=proj_libraries, ++ extra_link_args=["-fPIC"], ++ language='c++', + **extra_extension_args), + # Requires proj v4.9 + Extension( + 'cartopy.geodesic._geodesic', + ['lib/cartopy/geodesic/_geodesic.pyx'], + include_dirs=[include_dir, np.get_include()] + proj_includes, +- libraries=proj_libraries, +- library_dirs=[library_dir] + proj_library_dirs, ++ libraries=["curl", "sqlite3", "tiff"], ++ library_dirs=[library_dir], ++ extra_objects=proj_libraries, ++ extra_link_args=["-fPIC"], + **extra_extension_args), + ] + diff --git a/changelog b/changelog deleted file mode 100644 index a3f4a78..0000000 --- a/changelog +++ /dev/null @@ -1,101 +0,0 @@ -* Thu Oct 21 2021 Sandro Mani - 0.19.0-4 -- Rebuild (geos) - -* Fri Jul 23 2021 Fedora Release Engineering - 0.19.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.19.0-2 -- Rebuilt for Python 3.10 - -* Thu Apr 22 2021 Elliott Sales de Andrade - 0.19.0-1 -- Update to latest version (#1952194) - -* Tue Mar 23 2021 Sandro Mani - 0.19.0~rc1-3 -- Rebuild (geos) - -* Tue Mar 23 2021 Sandro Mani - 0.19.0~rc1-2 -- Bundle proj 7, as cartopy does not build against proj8 - -* Sat Mar 13 2021 Elliott Sales de Andrade - 0.19.0~rc1-1 -- Update to latest version (#1938248) - -* Sun Mar 07 2021 Sandro Mani - 0.18.0-7 -- Rebuild (proj) - -* Sat Feb 13 2021 Sandro Mani - 0.18.0-6 -- Rebuild (geos) - -* Sat Jan 30 2021 Jos de Kloe 0.18.0-5 -- Add a patch to fix build failures caused by np.float deprecation -- Modify patch to add more tolerance to image comparisons -- skip test_grid_labels, since it seems to suffer from a bug that is - not yet solved upstream - -* Wed Jan 27 2021 Fedora Release Engineering - 0.18.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Nov 11 13:06:18 CET 2020 Sandro Mani - 0.18.0-4 -- Rebuild (proj, gdal) - -* Wed Jul 29 2020 Fedora Release Engineering - 0.18.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 0.18.0-2 -- Rebuilt for Python 3.9 - -* Mon May 18 2020 Elliott Sales de Andrade - 0.18.0-1 -- Update to latest version - -* Fri May 01 2020 Elliott Sales de Andrade - 0.18.0~rc1-1 -- Update to latest release candidate - -* Mon Apr 13 2020 Elliott Sales de Andrade - 0.18.0~b2-1 -- Update to latest beta - -* Mon Feb 10 2020 Elliott Sales de Andrade - 0.18.0~b1-1 -- Update to latest beta - -* Thu Jan 30 2020 Fedora Release Engineering - 0.17.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Aug 19 2019 Miro Hrončok - 0.17.0-7 -- Rebuilt for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 0.17.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri May 31 2019 Elliott Sales de Andrade - 0.17.0-5 -- Fix build against FreeType 2.10.0 - -* Tue Feb 12 2019 Elliott Sales de Andrade - 0.17.0-4 -- Rebuilt for updated Proj - -* Sat Feb 02 2019 Fedora Release Engineering - 0.17.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Dec 06 2018 Elliott Sales de Andrade - 0.17.0-2 -- Remove pytest bytecode - -* Sat Nov 17 2018 Elliott Sales de Andrade - 0.17.0-1 -- Update to latest version -- Remove workaround for unpackaged Natural Earth data -- Drop Python 2 subpackage - -* Fri Jul 13 2018 Fedora Release Engineering - 0.16.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Jul 11 2018 Elliott Sales de Andrade - 0.16.0-5 -- Add explicit gcc-c++ BR - -* Tue Jun 19 2018 Miro Hrončok - 0.16.0-4 -- Rebuilt for Python 3.7 - -* Wed Feb 28 2018 Elliott Sales de Andrade - 0.16.0-3 -- Drop patch for old versions of Matplotlib. -- Use python2- prefix for dependencies. - -* Sun Feb 25 2018 Elliott Sales de Andrade - 0.16.0-2 -- Enable testing with now-packaged Natural Earth data. - -* Fri Feb 23 2018 Elliott Sales de Andrade - 0.16.0-1 -- Initial package. diff --git a/python-cartopy.spec b/python-cartopy.spec index ba75e74..a26a454 100644 --- a/python-cartopy.spec +++ b/python-cartopy.spec @@ -1,37 +1,52 @@ %global srcname cartopy +%global Srcname Cartopy # Some tests use the network. %bcond_with network Name: python-%{srcname} -Version: 0.25.0 -Release: %autorelease +Version: 0.19.0 +%global Version 0.19.0 +Release: 1%{?dist} Summary: Cartographic Python library with Matplotlib visualisations -License: BSD-3-Clause -URL: https://scitools.org.uk/cartopy/docs/latest/ -Source0: %pypi_source %{srcname} +License: LGPLv3 +URL: http://scitools.org.uk/cartopy/docs/latest/ +Source0: %pypi_source %{Srcname} %{Version} # Set location of Fedora-provided pre-existing data. Source1: siteconfig.py -# Fedora specific. -Patch: 0001-Reduce-numpy-build-dependency.patch -# Might not go upstream in current form. -Patch: 0002-Increase-tolerance-for-new-FreeType.patch +# Bundle proj 7, it does not build against proj-8 which dropped the deprecated API +%global proj_version 7.2.1 +Source2: https://download.osgeo.org/proj/proj-%{proj_version}.tar.gz +Patch0: cartopy_bundle-proj.patch + +# Might not go upstream in current form. +Patch0004: 0001-Increase-tolerance-for-new-FreeType.patch -# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval -ExcludeArch: %{ix86} BuildRequires: gcc-c++ -BuildRequires: proj-data-uk -BuildRequires: python3-devel +BuildRequires: geos-devel >= 3.3.3 +#BuildRequires: proj-devel >= 4.9.0 + +# For bundled proj +BuildRequires: cmake +BuildRequires: curl-devel +BuildRequires: gmock-devel +BuildRequires: gtest-devel >= 1.8.0 +BuildRequires: make +BuildRequires: libtiff-devel +BuildRequires: sqlite-devel + +Provides: bundled(proj) = %{proj_version} + %global _description %{expand: 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 @@ -43,10 +58,37 @@ and visualisation easy. It features: %package -n python3-%{srcname} Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) >= 40.6 +BuildRequires: python3dist(setuptools-scm) +BuildRequires: python3dist(wheel) +BuildRequires: python3dist(cython) >= 0.29.2 +BuildRequires: python3dist(numpy) >= 1.13.3 +BuildRequires: python3dist(shapely) >= 1.5.6 +BuildRequires: python3dist(pyshp) >= 2 +# OWS requirements +BuildRequires: python3dist(owslib) >= 0.8.11 +BuildRequires: python3dist(pillow) >= 1.7.8 +# Plotting requirements +BuildRequires: python3dist(matplotlib) >= 1.5.1 +BuildRequires: python3dist(gdal) >= 1.10 +BuildRequires: python3dist(pillow) >= 1.7.8 +BuildRequires: python3dist(pykdtree) >= 1.2.2 +BuildRequires: python3dist(scipy) >= 0.10 +# Testing requirements +BuildRequires: python3dist(flufl.lock) +BuildRequires: python3dist(pytest) >= 3 + Requires: python-%{srcname}-common = %{version}-%{release} -Recommends: python3dist(cartopy[ows]) = %{version}-%{release} -Recommends: python3dist(cartopy[plotting]) = %{version}-%{release} -Recommends: python3dist(cartopy[speedups]) = %{version}-%{release} +# OWS requirements +Recommends: python3dist(owslib) >= 0.8.11 +Recommends: python3dist(pillow) >= 1.7.8 +# Plotting requirements +Recommends: python3dist(matplotlib) >= 1.5.1 +Recommends: python3dist(gdal) >= 1.10 +Recommends: python3dist(pillow) >= 1.7.8 +Recommends: python3dist(pykdtree) >= 1.2.2 +Recommends: python3dist(scipy) >= 0.10 %description -n python3-%{srcname} %{_description} @@ -66,31 +108,37 @@ Suggests: natural-earth-map-data-10m Data files for %{srcname}. -%pyproject_extras_subpkg -n python3-cartopy ows plotting speedups - - %prep -%autosetup -n %{srcname}-%{version} -p1 +%autosetup -n %{Srcname}-%{Version} -p1 -a2 cp -a %SOURCE1 lib/cartopy/ -sed -i -e 's/, "pytest-cov", "coveralls"//g' pyproject.toml - -# Remove generated Cython sources -rm lib/cartopy/trace.cpp - - -%generate_buildrequires -%pyproject_buildrequires -r -x ows,plotting,speedups,test +# Remove bundled egg-info +rm -rf %{srcname}.egg-info %build -export FORCE_CYTHON=1 SETUPTOOLS_SCM_PRETEND_VERSION=%{version} -%pyproject_wheel +pushd proj-%{proj_version} +%cmake \ + -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_PROJINFO=OFF -DBUILD_PROJSYNC=OFF \ + -DBUILD_GIE=OFF -DBUILD_GEOD=OFF \ + -DBUILD_CS2CS=OFF -DBUILD_CCT=OFF \ + -DBUILD_PROJ=OFF +%cmake_build +make -C %{_vpath_builddir} DESTDIR=../dist install +popd + +PROJ_VERSION="%{proj_version}" \ +PROJ_INCLUDE_DIRS=$PWD/proj-%{proj_version}/dist/%{_includedir} \ +PROJ_LIBRARIES=$PWD/proj-%{proj_version}/dist/%{_libdir}/libproj.a \ +FORCE_CYTHON=1 %py3_build %install -%pyproject_install -%pyproject_save_files -l %{srcname} +PROJ_VERSION="%{proj_version}" \ +PROJ_INCLUDE_DIRS=$PWD/proj-%{proj_version}/dist/%{_includedir} \ +PROJ_LIBRARIES=$PWD/proj-%{proj_version}/dist/%{_libdir}/libproj.a \ +%py3_install mkdir -p %{buildroot}%{_datadir}/cartopy/shapefiles/natural_earth/ for theme in physical cultural; do @@ -100,22 +148,115 @@ done %check -MPLBACKEND=Agg \ - %{pytest} -n auto --doctest-modules --mpl --mpl-generate-summary=html --pyargs cartopy \ %if %{with network} - %{nil} +MPLBACKEND=Agg \ + %{pytest} --doctest-modules --pyargs cartopy %else - -m "not network" +MPLBACKEND=Agg \ + %{pytest} --doctest-modules --pyargs cartopy -m "not network" %endif %files -n python-%{srcname}-common %doc README.md +%license COPYING COPYING.LESSER lib/cartopy/data/LICENSE %{_datadir}/cartopy/ -%files -n python3-%{srcname} -f %{pyproject_files} -%{_bindir}/cartopy_feature_download +%files -n python3-%{srcname} +%{python3_sitearch}/cartopy/ +%{python3_sitearch}/%{Srcname}-%{Version}-py*.egg-info/ %changelog -%autochangelog +* Thu Apr 22 2021 Elliott Sales de Andrade - 0.19.0-1 +- Update to latest version (#1952194) + +* Tue Mar 23 2021 Sandro Mani - 0.19.0~rc1-3 +- Rebuild (geos) + +* Tue Mar 23 2021 Sandro Mani - 0.19.0~rc1-2 +- Bundle proj 7, as cartopy does not build against proj8 + +* Sat Mar 13 2021 Elliott Sales de Andrade - 0.19.0~rc1-1 +- Update to latest version (#1938248) + +* Sun Mar 07 2021 Sandro Mani - 0.18.0-7 +- Rebuild (proj) + +* Sat Feb 13 2021 Sandro Mani - 0.18.0-6 +- Rebuild (geos) + +* Sat Jan 30 2021 Jos de Kloe 0.18.0-5 +- Add a patch to fix build failures caused by np.float deprecation +- Modify patch to add more tolerance to image comparisons +- skip test_grid_labels, since it seems to suffer from a bug that is + not yet solved upstream + +* Wed Jan 27 2021 Fedora Release Engineering - 0.18.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Nov 11 13:06:18 CET 2020 Sandro Mani - 0.18.0-4 +- Rebuild (proj, gdal) + +* Wed Jul 29 2020 Fedora Release Engineering - 0.18.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.18.0-2 +- Rebuilt for Python 3.9 + +* Mon May 18 2020 Elliott Sales de Andrade - 0.18.0-1 +- Update to latest version + +* Fri May 01 2020 Elliott Sales de Andrade - 0.18.0~rc1-1 +- Update to latest release candidate + +* Mon Apr 13 2020 Elliott Sales de Andrade - 0.18.0~b2-1 +- Update to latest beta + +* Mon Feb 10 2020 Elliott Sales de Andrade - 0.18.0~b1-1 +- Update to latest beta + +* Thu Jan 30 2020 Fedora Release Engineering - 0.17.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Aug 19 2019 Miro Hrončok - 0.17.0-7 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.17.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri May 31 2019 Elliott Sales de Andrade - 0.17.0-5 +- Fix build against FreeType 2.10.0 + +* Tue Feb 12 2019 Elliott Sales de Andrade - 0.17.0-4 +- Rebuilt for updated Proj + +* Sat Feb 02 2019 Fedora Release Engineering - 0.17.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Dec 06 2018 Elliott Sales de Andrade - 0.17.0-2 +- Remove pytest bytecode + +* Sat Nov 17 2018 Elliott Sales de Andrade - 0.17.0-1 +- Update to latest version +- Remove workaround for unpackaged Natural Earth data +- Drop Python 2 subpackage + +* Fri Jul 13 2018 Fedora Release Engineering - 0.16.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jul 11 2018 Elliott Sales de Andrade - 0.16.0-5 +- Add explicit gcc-c++ BR + +* Tue Jun 19 2018 Miro Hrončok - 0.16.0-4 +- Rebuilt for Python 3.7 + +* Wed Feb 28 2018 Elliott Sales de Andrade - 0.16.0-3 +- Drop patch for old versions of Matplotlib. +- Use python2- prefix for dependencies. + +* Sun Feb 25 2018 Elliott Sales de Andrade - 0.16.0-2 +- Enable testing with now-packaged Natural Earth data. + +* Fri Feb 23 2018 Elliott Sales de Andrade - 0.16.0-1 +- Initial package. diff --git a/siteconfig.py b/siteconfig.py index 5bde5b6..8567a07 100644 --- a/siteconfig.py +++ b/siteconfig.py @@ -1,7 +1,9 @@ -from pathlib import Path +from __future__ import (absolute_import, division, print_function) + +import os def update_config(conf): # This works when installed and when in buildroot. - conf['pre_existing_data_dir'] = str( - Path(__file__).parents[4] / 'share/cartopy') + conf['pre_existing_data_dir'] = os.path.join(os.path.dirname(__file__), + '../../../../share/cartopy') diff --git a/sources b/sources index 5b897b0..4cc4ea9 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (cartopy-0.25.0.tar.gz) = 6e0576f87dbd154d7dec3c2bbec520d1602874e6b416ca6e461745ceb319dc0f38a53267ad0b1f73bcd0d81674151324c07b7a799fb0a3ad590d1a27c98b3ae7 +SHA512 (Cartopy-0.19.0.tar.gz) = 6e3dd4c92687e4573b416c4ab630f62e4173534b5f49be97711d98911edf942d39be7c4beb2dfa0e4b463142c44a9cd9092a8e9897c5ac5f2be484eb27480d83 +SHA512 (proj-7.2.1.tar.gz) = 59b9b31b0183e620a2f4a25a08620c170773fe4f99e8eca59e9ed6815f43bb379ea21ef71e8f759dbd747855b982657d7503bac3acc542218e0d862105f25324