Update to latest release candidate.
This commit is contained in:
parent
a21437d90e
commit
a10a1934fb
5 changed files with 37 additions and 114 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@
|
|||
/Cartopy-0.18.0b2.tar.gz
|
||||
/Cartopy-0.18.0rc1.tar.gz
|
||||
/Cartopy-0.18.0.tar.gz
|
||||
/Cartopy-0.19.0rc1.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 95dc2e69ced6d28d1a9490603f860a060765dfdb Mon Sep 17 00:00:00 2001
|
||||
From 267c98c20ef5bb0ebdd1dcc64f692013f2d0ca22 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Mon, 26 Feb 2018 02:42:50 -0500
|
||||
Subject: [PATCH] Increase tolerance for new FreeType.
|
||||
|
|
@ -10,34 +10,34 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py
|
||||
index 71c15453..e3ab3660 100644
|
||||
index db2b49bb..bf77ab9a 100644
|
||||
--- a/lib/cartopy/tests/mpl/test_examples.py
|
||||
+++ b/lib/cartopy/tests/mpl/test_examples.py
|
||||
@@ -56,7 +56,7 @@ elif MPL_VERSION <= '2.0.2':
|
||||
elif MPL_VERSION <= '2.1.2':
|
||||
contour_labels_tolerance = 0.63
|
||||
else:
|
||||
- contour_labels_tolerance = 0
|
||||
+ contour_labels_tolerance = 9.8
|
||||
|
||||
@@ -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 80c40c6c..5724e939 100644
|
||||
index ac73b5d6..f09af5e6 100644
|
||||
--- a/lib/cartopy/tests/mpl/test_gridliner.py
|
||||
+++ b/lib/cartopy/tests/mpl/test_gridliner.py
|
||||
@@ -165,6 +165,11 @@ elif (6, 0, 0) <= ccrs.PROJ4_VERSION:
|
||||
# Better Robinson projection causes some text movement.
|
||||
grid_label_inline_tol += 1.2
|
||||
@@ -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 = 15
|
||||
+grid_label_inline_tol = 12
|
||||
+grid_label_inline_usa_tol = 14
|
||||
+grid_label_inline_tol = 10.2
|
||||
+grid_label_inline_usa_tol = 11.5
|
||||
+
|
||||
|
||||
@pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug")
|
||||
@pytest.mark.natural_earth
|
||||
@ImageTesting([grid_label_image], tolerance=grid_label_tol)
|
||||
--
|
||||
2.21.1
|
||||
2.29.2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
--- Cartopy-0.18.0.unmodified/lib/cartopy/crs.py 2020-05-04 04:58:12.000000000 +0200
|
||||
+++ Cartopy-0.18.0/lib/cartopy/crs.py 2021-01-28 09:07:42.713170954 +0100
|
||||
@@ -1296,7 +1296,7 @@ class LambertAzimuthalEqualArea(Projecti
|
||||
super(LambertAzimuthalEqualArea, self).__init__(proj4_params,
|
||||
globe=globe)
|
||||
|
||||
- a = np.float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
+ a = float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
|
||||
# Find the antipode, and shift it a small amount in latitude to
|
||||
# approximate the extent of the projection:
|
||||
@@ -1339,7 +1339,7 @@ class Miller(_RectangularProjection):
|
||||
globe = Globe(semimajor_axis=math.degrees(1), ellipse=None)
|
||||
|
||||
# TODO: Let the globe return the semimajor axis always.
|
||||
- a = np.float(globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
+ a = float(globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
|
||||
proj4_params = [('proj', 'mill'), ('lon_0', central_longitude)]
|
||||
# See Snyder, 1987. Eqs (11-1) and (11-2) substituting maximums of
|
||||
@@ -1473,8 +1473,8 @@ class Stereographic(Projection):
|
||||
super(Stereographic, self).__init__(proj4_params, globe=globe)
|
||||
|
||||
# TODO: Let the globe return the semimajor axis always.
|
||||
- a = np.float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
- b = np.float(self.globe.semiminor_axis or WGS84_SEMIMINOR_AXIS)
|
||||
+ a = float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
+ b = float(self.globe.semiminor_axis or WGS84_SEMIMINOR_AXIS)
|
||||
|
||||
# Note: The magic number has been picked to maintain consistent
|
||||
# behaviour with a wgs84 globe. There is no guarantee that the scaling
|
||||
@@ -1550,7 +1550,7 @@ class Orthographic(Projection):
|
||||
super(Orthographic, self).__init__(proj4_params, globe=globe)
|
||||
|
||||
# TODO: Let the globe return the semimajor axis always.
|
||||
- a = np.float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
+ a = float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
|
||||
# To stabilise the projection of geometries, we reduce the boundary by
|
||||
# a tiny fraction at the cost of the extreme edges.
|
||||
@@ -2107,8 +2107,8 @@ class Geostationary(_Satellite):
|
||||
sweep_axis=sweep_axis)
|
||||
|
||||
# TODO: Let the globe return the semimajor axis always.
|
||||
- a = np.float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
- h = np.float(satellite_height)
|
||||
+ a = float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
+ h = float(satellite_height)
|
||||
|
||||
# These are only exact for a spherical Earth, owing to assuming a is
|
||||
# constant. Handling elliptical would be much harder for this.
|
||||
@@ -2174,7 +2174,7 @@ class NearsidePerspective(_Satellite):
|
||||
# TODO: Let the globe return the semimajor axis always.
|
||||
a = self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS
|
||||
|
||||
- h = np.float(satellite_height)
|
||||
+ h = float(satellite_height)
|
||||
max_x = a * np.sqrt(h / (2 * a + h))
|
||||
coords = _ellipse_boundary(max_x, max_x,
|
||||
false_easting, false_northing, 61)
|
||||
@@ -2317,8 +2317,8 @@ class AzimuthalEquidistant(Projection):
|
||||
super(AzimuthalEquidistant, self).__init__(proj4_params, globe=globe)
|
||||
|
||||
# TODO: Let the globe return the semimajor axis always.
|
||||
- a = np.float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
- b = np.float(self.globe.semiminor_axis or a)
|
||||
+ a = float(self.globe.semimajor_axis or WGS84_SEMIMAJOR_AXIS)
|
||||
+ b = float(self.globe.semiminor_axis or a)
|
||||
|
||||
coords = _ellipse_boundary(a * np.pi, b * np.pi,
|
||||
false_easting, false_northing, 61)
|
||||
|
|
@ -5,18 +5,18 @@
|
|||
%bcond_with network
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.18.0
|
||||
Release: 7%{?dist}
|
||||
Version: 0.19.0~rc1
|
||||
%global Version 0.19.0rc1
|
||||
Release: 1%{?dist}
|
||||
Summary: Cartographic Python library with Matplotlib visualisations
|
||||
|
||||
License: LGPLv3
|
||||
URL: http://scitools.org.uk/cartopy/docs/latest/
|
||||
Source0: %pypi_source %{Srcname}
|
||||
Source0: %pypi_source %{Srcname} %{Version}
|
||||
# Set location of Fedora-provided pre-existing data.
|
||||
Source1: siteconfig.py
|
||||
# Might not go upstream in current form.
|
||||
Patch0004: 0001-Increase-tolerance-for-new-FreeType.patch
|
||||
Patch0005: 0002-fix-np-float-deprecation.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: geos-devel >= 3.3.3
|
||||
|
|
@ -40,12 +40,13 @@ and visualisation easy. It features:
|
|||
Summary: %{summary}
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(setuptools)
|
||||
BuildRequires: python3dist(cython) >= 0.15.1
|
||||
BuildRequires: python3dist(six) >= 1.3
|
||||
BuildRequires: python3dist(numpy) >= 1.10
|
||||
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) >= 1.1.4
|
||||
BuildRequires: python3dist(pyshp) >= 2
|
||||
# OWS requirements
|
||||
BuildRequires: python3dist(owslib) >= 0.8.11
|
||||
BuildRequires: python3dist(pillow) >= 1.7.8
|
||||
|
|
@ -56,8 +57,7 @@ BuildRequires: python3dist(pillow) >= 1.7.8
|
|||
BuildRequires: python3dist(pykdtree) >= 1.2.2
|
||||
BuildRequires: python3dist(scipy) >= 0.10
|
||||
# Testing requirements
|
||||
BuildRequires: python3dist(filelock)
|
||||
BuildRequires: python3dist(mock) >= 1.0.1
|
||||
BuildRequires: python3dist(flufl.lock)
|
||||
BuildRequires: python3dist(pytest) >= 3
|
||||
|
||||
Requires: python-%{srcname}-common = %{version}-%{release}
|
||||
|
|
@ -90,15 +90,12 @@ Data files for %{srcname}.
|
|||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{Srcname}-%{version} -p1
|
||||
%autosetup -n %{Srcname}-%{Version} -p1
|
||||
cp -a %SOURCE1 lib/cartopy/
|
||||
|
||||
# Remove bundled egg-info
|
||||
rm -rf %{srcname}.egg-info
|
||||
|
||||
# Remove pre-generated files
|
||||
rm $(grep -rl '/\* Generated by Cython')
|
||||
|
||||
|
||||
%build
|
||||
FORCE_CYTHON=1 %py3_build
|
||||
|
|
@ -115,19 +112,12 @@ done
|
|||
|
||||
|
||||
%check
|
||||
# skip test_grid_labels because some x-axis labels are not drawn while they should be
|
||||
# this seems related to this upstream issue:
|
||||
# https://github.com/SciTools/cartopy/issues/1692
|
||||
# for which a fix is still being discussed:
|
||||
# See PR#1537: https://github.com/SciTools/cartopy/pull/1537
|
||||
%global SKIPPEDTEST "--deselect=tests/mpl/test_gridliner.py::test_grid_labels"
|
||||
|
||||
%if %{with network}
|
||||
MPLBACKEND=Agg \
|
||||
%{pytest} --doctest-modules --pyargs cartopy %{SKIPPEDTEST}
|
||||
%{pytest} --doctest-modules --pyargs cartopy
|
||||
%else
|
||||
MPLBACKEND=Agg \
|
||||
%{pytest} --doctest-modules --pyargs cartopy -m "not network" %{SKIPPEDTEST}
|
||||
%{pytest} --doctest-modules --pyargs cartopy -m "not network"
|
||||
%endif
|
||||
|
||||
|
||||
|
|
@ -138,10 +128,13 @@ MPLBACKEND=Agg \
|
|||
|
||||
%files -n python3-%{srcname}
|
||||
%{python3_sitearch}/cartopy/
|
||||
%{python3_sitearch}/%{Srcname}-%{version}-py*.egg-info/
|
||||
%{python3_sitearch}/%{Srcname}-%{Version}-py*.egg-info/
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Mar 13 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.19.0~rc1-1
|
||||
- Update to latest version (#1938248)
|
||||
|
||||
* Sun Mar 07 2021 Sandro Mani <manisandro@gmail.com> - 0.18.0-7
|
||||
- Rebuild (proj)
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (Cartopy-0.18.0.tar.gz) = b2d1f4b264ce06882aa282743bc69ac888606999432adfd7d2dd427a051a95c7ecf73079cb26259251c181f7d4018dd5897d0bc7b15cf8aa9264acb8ab360298
|
||||
SHA512 (Cartopy-0.19.0rc1.tar.gz) = 5b9183b08d14a2e273405b94958387af45dbeb0deda98a50814bb01a65cdcc02e476efa24a99864006d9738574abeb9140c874c11a491d9ef5491109445a06d4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue