Compare commits

...
Sign in to create a new pull request.

43 commits

Author SHA1 Message Date
Python Maint
87594fc045 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:57:27 +02:00
Python Maint
e9295fafc0 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:25:45 +02:00
Jerry James
20e8b0730d
Stop building for 32-bit x86 2025-08-11 08:44:13 -06:00
Packit
2ec6011486 Update to 0.25.0 upstream release
- Resolves: rhbz#2385945

Commit authored by Packit automation (https://packit.dev/)
2025-08-01 16:25:45 -04:00
Fedora Release Engineering
8241eb8dea Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 07:07:28 +00:00
Python Maint
16f5d2534e Rebuilt for Python 3.14 2025-06-18 21:31:53 +02:00
Fedora Release Engineering
db1263d5f0 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 12:45:16 +00:00
Packit
f2000c0cba Update to 0.24.1 upstream release
- Resolves: rhbz#2317031

Commit authored by Packit automation (https://packit.dev/)
2024-10-08 23:29:03 +00:00
Elliott Sales de Andrade
f46a01eada Update to latest version (#2317031) 2024-10-08 18:47:03 -04:00
Elliott Sales de Andrade
a04112c2b7 Configure Packit for release automation 2024-10-08 16:56:06 -04:00
Fedora Release Engineering
6a7aca5e10 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 10:14:01 +00:00
Elliott Sales de Andrade
f963ea5e0b Correct license tag 2024-06-25 20:44:46 -04:00
Elliott Sales de Andrade
ac90935ea5 Update to latest version (#2274386) 2024-06-25 19:06:23 -04:00
Python Maint
919282549a Rebuilt for Python 3.13 2024-06-19 18:28:32 +02:00
Fedora Release Engineering
3550949e23 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 02:17:21 +00:00
Fedora Release Engineering
87e78b5ae7 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 00:01:16 +00:00
Elliott Sales de Andrade
feb2384c05 Fix tests with Matplotlib 3.8.0 2023-09-13 23:46:37 -04:00
Elliott Sales de Andrade
138595d962 Drop speedups on i686 2023-08-11 01:02:10 -04:00
Elliott Sales de Andrade
14753fe553 Update to latest version (#2229333) 2023-08-11 00:19:32 -04:00
Elliott Sales de Andrade
96c686c205 Fix tests with Proj 9.2 2023-07-19 19:15:06 -04:00
Elliott Sales de Andrade
7e262aab02 Rebuild for Python 3.12b4 2023-07-19 19:12:50 -04:00
Elliott Sales de Andrade
ebebe36587 Update to SPDX license 2023-04-07 23:26:01 -04:00
Elliott Sales de Andrade
de2e44cdf6 Backport fix for Matplotlib 3.7 2023-02-28 20:30:45 -05:00
Fedora Release Engineering
25ebc1e3bc Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 11:56:41 +00:00
Elliott Sales de Andrade
ae2332e136 Update to latest version (#2152747) 2022-12-12 22:13:41 -05:00
Elliott Sales de Andrade
b92ea55e55 Update to latest version (#2125749) 2022-09-16 00:12:31 -04:00
Elliott Sales de Andrade
c1c216adbe Fix compatibility with Matplotlib 3.6 2022-08-21 00:07:35 -04:00
Fedora Release Engineering
02e54ce8b9 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 17:08:40 +00:00
Lumir Balhar
d9c25b2d70 Allow the latest setuptools_scm 7 2022-06-30 10:47:19 +02:00
Elliott Sales de Andrade
996cfd1bc1 Update to latest version (#2101991) 2022-06-29 17:00:40 -04:00
Python Maint
250c76973d Rebuilt for Python 3.11 2022-06-21 19:11:06 +02:00
Elliott Sales de Andrade
f07ae9547e Merge remote-tracking branch 'origin/rawhide' into rawhide 2022-05-23 04:53:38 -04:00
Elliott Sales de Andrade
f9e1aeefe5 Update to latest version (#2040130) 2022-05-23 02:49:15 -04:00
Elliott Sales de Andrade
85fdfde1c8 Fix FTBFS due to broken rpath 2022-05-23 02:48:53 -04:00
Sandro Mani
b1cc8deb57 Rebuild for proj-9.0.0 2022-03-10 13:52:18 +01:00
Sandro Mani
35ad1b4422 Add Cartopy-test_shapereader.patch 2022-03-10 13:52:18 +01:00
Fedora Release Engineering
b5bb9b5192 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 10:59:15 +00:00
Sandro Mani
d5763caf8a Rebuild (geos) 2021-10-21 13:22:58 +02:00
Elliott Sales de Andrade
a5c7dbc311 Update to latest version
And also fix the internal version provides.
2021-10-09 00:52:41 -04:00
Elliott Sales de Andrade
420a586aa8 Update to latest version (#2005405) 2021-09-21 20:00:46 -04:00
Elliott Sales de Andrade
379e9f2e10 Convert to rpmautospec 2021-09-21 03:07:13 -04:00
Fedora Release Engineering
de708eaca3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 05:29:39 +00:00
Python Maint
d245345e3a Rebuilt for Python 3.10 2021-06-04 20:23:29 +02:00
11 changed files with 374 additions and 406 deletions

11
.gitignore vendored
View file

@ -8,3 +8,14 @@
/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

20
.packit.yaml Normal file
View file

@ -0,0 +1,20 @@
# 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

View file

@ -1,52 +0,0 @@
From 736a33a0b2814c93449c0a3f42b37f2862e5a746 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.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
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

View file

@ -0,0 +1,26 @@
From e3a61e272d5ab58a2b8f13c6ad05d1136d3a5ecc Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Thu, 25 Apr 2024 16:35:29 -0400
Subject: [PATCH 1/2] Reduce numpy build dependency
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
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

View file

@ -0,0 +1,170 @@
From d3d4e7a80ded257b3094d837e5133b199989b460 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 2/2] Increase tolerance for new FreeType
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
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

3
README.packit Normal file
View file

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 1.11.0.

View file

@ -1,167 +0,0 @@
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),
]

101
changelog Normal file
View file

@ -0,0 +1,101 @@
* Thu Oct 21 2021 Sandro Mani <manisandro@gmail.com> - 0.19.0-4
- Rebuild (geos)
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.19.0-2
- Rebuilt for Python 3.10
* Thu Apr 22 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.19.0-1
- Update to latest version (#1952194)
* Tue Mar 23 2021 Sandro Mani <manisandro@gmail.com> - 0.19.0~rc1-3
- Rebuild (geos)
* Tue Mar 23 2021 Sandro Mani <manisandro@gmail.com> - 0.19.0~rc1-2
- Bundle proj 7, as cartopy does not build against proj8
* 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)
* Sat Feb 13 2021 Sandro Mani <manisandro@gmail.com> - 0.18.0-6
- Rebuild (geos)
* Sat Jan 30 2021 Jos de Kloe <josdekloe@gmail.com> 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 <releng@fedoraproject.org> - 0.18.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 11 13:06:18 CET 2020 Sandro Mani <manisandro@gmail.com> - 0.18.0-4
- Rebuild (proj, gdal)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.18.0-2
- Rebuilt for Python 3.9
* Mon May 18 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0-1
- Update to latest version
* Fri May 01 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0~rc1-1
- Update to latest release candidate
* Mon Apr 13 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0~b2-1
- Update to latest beta
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0~b1-1
- Update to latest beta
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.17.0-7
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 31 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-5
- Fix build against FreeType 2.10.0
* Tue Feb 12 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-4
- Rebuilt for updated Proj
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Dec 06 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-2
- Remove pytest bytecode
* Sat Nov 17 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 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 <releng@fedoraproject.org> - 0.16.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-5
- Add explicit gcc-c++ BR
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.16.0-4
- Rebuilt for Python 3.7
* Wed Feb 28 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-3
- Drop patch for old versions of Matplotlib.
- Use python2- prefix for dependencies.
* Sun Feb 25 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-2
- Enable testing with now-packaged Natural Earth data.
* Fri Feb 23 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-1
- Initial package.

View file

@ -1,52 +1,37 @@
%global srcname cartopy
%global Srcname Cartopy
# Some tests use the network.
%bcond_with network
Name: python-%{srcname}
Version: 0.19.0
%global Version 0.19.0
Release: 1%{?dist}
Version: 0.25.0
Release: %autorelease
Summary: Cartographic Python library with Matplotlib visualisations
License: LGPLv3
URL: http://scitools.org.uk/cartopy/docs/latest/
Source0: %pypi_source %{Srcname} %{Version}
License: BSD-3-Clause
URL: https://scitools.org.uk/cartopy/docs/latest/
Source0: %pypi_source %{srcname}
# Set location of Fedora-provided pre-existing data.
Source1: siteconfig.py
# 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
# Fedora specific.
Patch: 0001-Reduce-numpy-build-dependency.patch
# Might not go upstream in current form.
Patch0004: 0001-Increase-tolerance-for-new-FreeType.patch
Patch: 0002-Increase-tolerance-for-new-FreeType.patch
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: gcc-c++
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}
BuildRequires: proj-data-uk
BuildRequires: python3-devel
%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
@ -58,37 +43,10 @@ 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}
# 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
Recommends: python3dist(cartopy[ows]) = %{version}-%{release}
Recommends: python3dist(cartopy[plotting]) = %{version}-%{release}
Recommends: python3dist(cartopy[speedups]) = %{version}-%{release}
%description -n python3-%{srcname} %{_description}
@ -108,37 +66,31 @@ 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 -a2
%autosetup -n %{srcname}-%{version} -p1
cp -a %SOURCE1 lib/cartopy/
# Remove bundled egg-info
rm -rf %{srcname}.egg-info
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
%build
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
export FORCE_CYTHON=1 SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel
%install
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
%pyproject_install
%pyproject_save_files -l %{srcname}
mkdir -p %{buildroot}%{_datadir}/cartopy/shapefiles/natural_earth/
for theme in physical cultural; do
@ -148,115 +100,22 @@ done
%check
MPLBACKEND=Agg \
%{pytest} -n auto --doctest-modules --mpl --mpl-generate-summary=html --pyargs cartopy \
%if %{with network}
MPLBACKEND=Agg \
%{pytest} --doctest-modules --pyargs cartopy
%{nil}
%else
MPLBACKEND=Agg \
%{pytest} --doctest-modules --pyargs cartopy -m "not network"
-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}
%{python3_sitearch}/cartopy/
%{python3_sitearch}/%{Srcname}-%{Version}-py*.egg-info/
%files -n python3-%{srcname} -f %{pyproject_files}
%{_bindir}/cartopy_feature_download
%changelog
* Thu Apr 22 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.19.0-1
- Update to latest version (#1952194)
* Tue Mar 23 2021 Sandro Mani <manisandro@gmail.com> - 0.19.0~rc1-3
- Rebuild (geos)
* Tue Mar 23 2021 Sandro Mani <manisandro@gmail.com> - 0.19.0~rc1-2
- Bundle proj 7, as cartopy does not build against proj8
* 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)
* Sat Feb 13 2021 Sandro Mani <manisandro@gmail.com> - 0.18.0-6
- Rebuild (geos)
* Sat Jan 30 2021 Jos de Kloe <josdekloe@gmail.com> 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 <releng@fedoraproject.org> - 0.18.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 11 13:06:18 CET 2020 Sandro Mani <manisandro@gmail.com> - 0.18.0-4
- Rebuild (proj, gdal)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.18.0-2
- Rebuilt for Python 3.9
* Mon May 18 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0-1
- Update to latest version
* Fri May 01 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0~rc1-1
- Update to latest release candidate
* Mon Apr 13 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0~b2-1
- Update to latest beta
* Mon Feb 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.18.0~b1-1
- Update to latest beta
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.17.0-7
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 31 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-5
- Fix build against FreeType 2.10.0
* Tue Feb 12 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-4
- Rebuilt for updated Proj
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Dec 06 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.17.0-2
- Remove pytest bytecode
* Sat Nov 17 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 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 <releng@fedoraproject.org> - 0.16.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-5
- Add explicit gcc-c++ BR
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.16.0-4
- Rebuilt for Python 3.7
* Wed Feb 28 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-3
- Drop patch for old versions of Matplotlib.
- Use python2- prefix for dependencies.
* Sun Feb 25 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-2
- Enable testing with now-packaged Natural Earth data.
* Fri Feb 23 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.16.0-1
- Initial package.
%autochangelog

View file

@ -1,9 +1,7 @@
from __future__ import (absolute_import, division, print_function)
import os
from pathlib import Path
def update_config(conf):
# This works when installed and when in buildroot.
conf['pre_existing_data_dir'] = os.path.join(os.path.dirname(__file__),
'../../../../share/cartopy')
conf['pre_existing_data_dir'] = str(
Path(__file__).parents[4] / 'share/cartopy')

View file

@ -1,2 +1 @@
SHA512 (Cartopy-0.19.0.tar.gz) = 6e3dd4c92687e4573b416c4ab630f62e4173534b5f49be97711d98911edf942d39be7c4beb2dfa0e4b463142c44a9cd9092a8e9897c5ac5f2be484eb27480d83
SHA512 (proj-7.2.1.tar.gz) = 59b9b31b0183e620a2f4a25a08620c170773fe4f99e8eca59e9ed6815f43bb379ea21ef71e8f759dbd747855b982657d7503bac3acc542218e0d862105f25324
SHA512 (cartopy-0.25.0.tar.gz) = 6e0576f87dbd154d7dec3c2bbec520d1602874e6b416ca6e461745ceb319dc0f38a53267ad0b1f73bcd0d81674151324c07b7a799fb0a3ad590d1a27c98b3ae7