diff --git a/.gitignore b/.gitignore index 6526b10..e88de39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,3 @@ /Cartopy-0.16.0.tar.gz /Cartopy-norm-images.tar.xz /Cartopy-0.17.0.tar.gz -/Cartopy-0.18.0b1.tar.gz -/Cartopy-0.18.0b2.tar.gz -/Cartopy-0.18.0rc1.tar.gz -/Cartopy-0.18.0.tar.gz -/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..df38668 --- /dev/null +++ b/0001-Increase-tolerance-for-new-FreeType.patch @@ -0,0 +1,44 @@ +From 4b38cd074bcc3c9014926add54ea4ee331f3e47b 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_gridliner.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/lib/cartopy/tests/mpl/test_gridliner.py b/lib/cartopy/tests/mpl/test_gridliner.py +index aa772b9..e027741 100644 +--- a/lib/cartopy/tests/mpl/test_gridliner.py ++++ b/lib/cartopy/tests/mpl/test_gridliner.py +@@ -17,7 +17,10 @@ + + from __future__ import (absolute_import, division, print_function) + ++from distutils.version import LooseVersion ++ + from matplotlib.backends.backend_agg import FigureCanvasAgg ++import matplotlib.ft2font + import matplotlib.pyplot as plt + import matplotlib.ticker as mticker + try: +@@ -109,10 +112,14 @@ if MPL_VERSION >= '2.0': + grid_label_image = 'gridliner_labels' + else: + grid_label_image = 'gridliner_labels_1.5' ++if LooseVersion(matplotlib.ft2font.__freetype_version__) >= '2.7': ++ grid_label_tolerance = 20.3 ++else: ++ grid_label_tolerance = 0 + + + @pytest.mark.natural_earth +-@ImageTesting([grid_label_image]) ++@ImageTesting([grid_label_image], tolerance=grid_label_tolerance) + def test_grid_labels(): + plt.figure(figsize=(8, 10)) + +-- +2.17.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/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..cfb0bcb 100644 --- a/python-cartopy.spec +++ b/python-cartopy.spec @@ -1,52 +1,126 @@ %global srcname cartopy - -# Some tests use the network. -%bcond_with network +%global Srcname Cartopy Name: python-%{srcname} -Version: 0.25.0 -Release: %autorelease +Version: 0.17.0 +Release: 2%{?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: https://files.pythonhosted.org/packages/source/C/%{Srcname}/%{Srcname}-%{version}.tar.gz # 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 - -# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval -ExcludeArch: %{ix86} +Patch0004: 0001-Increase-tolerance-for-new-FreeType.patch BuildRequires: gcc-c++ -BuildRequires: proj-data-uk -BuildRequires: python3-devel +BuildRequires: geos-devel >= 3.3.3 +BuildRequires: proj-devel >= 4.9.0 -%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 - intuitive interface -* powerful vector data handling by integrating shapefile reading with Shapely +%global _description \ +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 \ + intuitive interface \ +* powerful vector data handling by integrating shapefile reading with Shapely \ capabilities -} %description %{_description} -%package -n python3-%{srcname} +%package -n python2-%{srcname} Summary: %{summary} +%{?python_provide:%python_provide python2-%{srcname}} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools >= 0.7.2 +BuildRequires: python2-Cython >= 0.15.1 +BuildRequires: python2-six >= 1.3.0 +BuildRequires: python2-numpy >= 1.10 +BuildRequires: python2-shapely >= 1.5.6 +BuildRequires: python2-pyshp >= 1.1.4 +# OWS requirements +BuildRequires: python2-owslib >= 0.8.11 +BuildRequires: python2-pillow >= 1.7.8 +# Plotting requirements +BuildRequires: python2-matplotlib >= 1.5.1 +BuildRequires: python2-gdal >= 1.10.0 +BuildRequires: python2-pillow >= 1.7.8 +BuildRequires: python2-scipy >= 0.10 +# Testing requirements +BuildRequires: python2-filelock +BuildRequires: python2-mock >= 1.0.1 +BuildRequires: python2-pytest >= 3.1.0 +%if %{fedora} < 28 +# For old matplotlib +BuildRequires: python2-nose +%endif Requires: python-%{srcname}-common = %{version}-%{release} -Recommends: python3dist(cartopy[ows]) = %{version}-%{release} -Recommends: python3dist(cartopy[plotting]) = %{version}-%{release} -Recommends: python3dist(cartopy[speedups]) = %{version}-%{release} +Requires: python2-six >= 1.3.0 +Requires: python2-numpy >= 1.10 +Requires: python2-shapely >= 1.5.6 +Requires: python2-pyshp >= 1.1.4 +Requires: python2-setuptools >= 0.7.2 +# OWS requirements +Recommends: python2-owslib >= 0.8.11 +Recommends: python2-pillow >= 1.7.8 +# Plotting requirements +Recommends: python2-matplotlib >= 1.5.1 +Recommends: python2-gdal >= 1.10.0 +Recommends: python2-pillow >= 1.7.8 +Recommends: python2-scipy >= 0.10 + +%description -n python2-%{srcname} %{_description} + + +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-Cython >= 0.15.1 +BuildRequires: python3-six >= 1.3.0 +BuildRequires: python3-numpy >= 1.10 +BuildRequires: python3-shapely >= 1.5.6 +BuildRequires: python3-pyshp >= 1.1.4 +# OWS requirements +BuildRequires: python3-OWSLib >= 0.8.11 +BuildRequires: python3-pillow >= 1.7.8 +# Plotting requirements +BuildRequires: python3-matplotlib >= 1.5.1 +BuildRequires: gdal-python3 >= 1.10.0 +BuildRequires: python3-pillow >= 1.7.8 +BuildRequires: python3-pykdtree >= 1.2.2 +BuildRequires: python3-scipy >= 0.10 +# Testing requirements +BuildRequires: python3-filelock +BuildRequires: python3-mock >= 1.0.1 +BuildRequires: python3-pytest >= 3.1.0 +%if %{fedora} < 28 +# For old matplotlib +BuildRequires: python3-nose +%endif + +Requires: python-%{srcname}-common = %{version}-%{release} +Requires: python3-setuptools >= 0.7.2 +Requires: python3-six >= 1.3.0 +Requires: python3-numpy >= 1.10 +Requires: python3-shapely >= 1.5.6 +Requires: python3-pyshp >= 1.1.4 +# OWS requirements +Recommends: python3-OWSLib >= 0.8.11 +Recommends: python3-pillow >= 1.7.8 +# Plotting requirements +Recommends: python3-matplotlib >= 1.5.1 +Recommends: gdal-python3 >= 1.10.0 +Recommends: python3-pillow >= 1.7.8 +Recommends: python3-pykdtree >= 1.2.2 +Recommends: python3-scipy >= 0.10 %description -n python3-%{srcname} %{_description} @@ -66,31 +140,28 @@ 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 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 +%py2_build + +# Purge generated Cython files. +rm -f lib/cartopy/trace.cpp lib/cartopy/trace.pyd +rm -f lib/cartopy/_crs.c lib/cartopy/_crs.pyd +rm -f lib/cartopy/geodesic/_geodesic.c lib/cartopy/geodesic/_geodesic.pyd + +%py3_build %install -%pyproject_install -%pyproject_save_files -l %{srcname} +%py3_install +%py2_install mkdir -p %{buildroot}%{_datadir}/cartopy/shapefiles/natural_earth/ for theme in physical cultural; do @@ -100,22 +171,49 @@ done %check -MPLBACKEND=Agg \ - %{pytest} -n auto --doctest-modules --mpl --mpl-generate-summary=html --pyargs cartopy \ -%if %{with network} - %{nil} -%else - -m "not network" -%endif +PYTHONPATH="%{buildroot}%{python2_sitearch}" PYTHONDONTWRITEBYTECODE=1 MPLBACKEND=Agg \ + pytest-2 --doctest-modules --pyargs cartopy -m "not network" +PYTHONPATH="%{buildroot}%{python3_sitearch}" PYTHONDONTWRITEBYTECODE=1 MPLBACKEND=Agg \ + pytest-3 --doctest-modules --pyargs cartopy -m "not network" %files -n python-%{srcname}-common %doc README.md +%license COPYING.LESSER lib/cartopy/data/LICENSE %{_datadir}/cartopy/ -%files -n python3-%{srcname} -f %{pyproject_files} -%{_bindir}/cartopy_feature_download +%files -n python2-%{srcname} +%{python2_sitearch}/cartopy +%{python2_sitearch}/%{Srcname}-%{version}-py?.?.egg-info + +%files -n python3-%{srcname} +%{python3_sitearch}/cartopy +%{python3_sitearch}/%{Srcname}-%{version}-py?.?.egg-info %changelog -%autochangelog +* 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 + +* 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..f267854 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cartopy-0.25.0.tar.gz) = 6e0576f87dbd154d7dec3c2bbec520d1602874e6b416ca6e461745ceb319dc0f38a53267ad0b1f73bcd0d81674151324c07b7a799fb0a3ad590d1a27c98b3ae7 +SHA512 (Cartopy-0.17.0.tar.gz) = 19c3eb373aaf81534028fc0c03033d21da224f00b4a8590ecbda6156d00acf2312e2ed2478ffcea2dcc6fc4227e7c57623fb5cc3c8bbdf48b14f432cbb72ae27