diff --git a/0001-Reduce-numpy-build-dependency.patch b/0001-Reduce-numpy-build-dependency.patch index 42c7c25..83a0ea5 100644 --- a/0001-Reduce-numpy-build-dependency.patch +++ b/0001-Reduce-numpy-build-dependency.patch @@ -1,7 +1,7 @@ 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 +Subject: [PATCH 1/3] Reduce numpy build dependency Signed-off-by: Elliott Sales de Andrade --- diff --git a/0002-Increase-tolerance-for-new-FreeType.patch b/0002-Increase-tolerance-for-new-FreeType.patch index cc87dde..cd108c8 100644 --- a/0002-Increase-tolerance-for-new-FreeType.patch +++ b/0002-Increase-tolerance-for-new-FreeType.patch @@ -1,7 +1,7 @@ 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 +Subject: [PATCH 2/3] Increase tolerance for new FreeType Signed-off-by: Elliott Sales de Andrade --- diff --git a/0003-Allow-older-versions-of-setuptools.patch b/0003-Allow-older-versions-of-setuptools.patch new file mode 100644 index 0000000..0b3259b --- /dev/null +++ b/0003-Allow-older-versions-of-setuptools.patch @@ -0,0 +1,44 @@ +From 20da43627e09a1f9cf3545ff484ece36c6cdc477 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sat, 2 Aug 2025 00:36:22 -0400 +Subject: [PATCH 3/3] Allow older versions of setuptools + +Revert "pep639: setuptools license and license-files fields" + +This reverts commit 5fc8006f300ca2203cdb3583c3081ecbb979dc3b. + +Signed-off-by: Elliott Sales de Andrade +--- + pyproject.toml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 4e012ede..6ba29dce 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,7 +1,7 @@ + [build-system] + requires = [ + "wheel", +- "setuptools >= 77.0.3", ++ "setuptools >= 40.6.0", + "Cython >= 0.29.24", + # numpy requirement for wheel builds for distribution on PyPI - building + # against 2.x yields wheels that are also compatible with numpy 1.x at +@@ -23,11 +23,11 @@ description = "A Python library for cartographic visualizations with Matplotlib" + readme = "README.md" + requires-python = ">=3.10" + keywords = ["cartography", "map", "transform", "projection", "pyproj", "shapely", "shapefile"] +-license = "BSD-3-Clause" +-license-files = ["LICENSE"] ++license = {file = "LICENSE"} + classifiers = [ + 'Development Status :: 4 - Beta', + 'Framework :: Matplotlib', ++ 'License :: OSI Approved :: BSD License', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', +-- +2.50.0 + diff --git a/python-cartopy.spec b/python-cartopy.spec index ba75e74..0b08ec3 100644 --- a/python-cartopy.spec +++ b/python-cartopy.spec @@ -18,9 +18,8 @@ Source1: siteconfig.py 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} +# Revert PEP639 change to allow older setuptools. +Patch: 0003-Allow-older-versions-of-setuptools.patch BuildRequires: gcc-c++ BuildRequires: proj-data-uk @@ -46,7 +45,9 @@ Summary: %{summary} Requires: python-%{srcname}-common = %{version}-%{release} Recommends: python3dist(cartopy[ows]) = %{version}-%{release} Recommends: python3dist(cartopy[plotting]) = %{version}-%{release} +%ifnarch %{ix86} Recommends: python3dist(cartopy[speedups]) = %{version}-%{release} +%endif %description -n python3-%{srcname} %{_description} @@ -66,7 +67,11 @@ Suggests: natural-earth-map-data-10m Data files for %{srcname}. +%ifnarch %{ix86} %pyproject_extras_subpkg -n python3-cartopy ows plotting speedups +%else +%pyproject_extras_subpkg -n python3-cartopy ows plotting +%endif %prep @@ -80,7 +85,11 @@ rm lib/cartopy/trace.cpp %generate_buildrequires +%ifnarch %{ix86} %pyproject_buildrequires -r -x ows,plotting,speedups,test +%else +%pyproject_buildrequires -r -x ows,plotting,test +%endif %build