public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jos de Kloe <josdekloe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pyproj] f43: - Import upstream patch to fix problem introduced by upgrade proj to v9.7.1
Date: Sat, 26 Sep 2026 14:31:31 GMT	[thread overview]
Message-ID: <179043309169.1.9631545649343184438.rpms-pyproj-45c5abe9fc00@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pyproj
            Branch : f43
            Commit : 45c5abe9fc008813dc171020a4bd9498af3a6212
            Author : Jos de Kloe <josdekloe@gmail.com>
            Date   : 2026-01-31T15:54:53+01:00
            Stats  : +74/-493 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/pyproj/c/45c5abe9fc008813dc171020a4bd9498af3a6212?branch=f43

            Log:
            - Import upstream patch to fix problem introduced by upgrade proj to v9.7.1
- Remove old patch for proj v9.6.2 that is no longer needed.

---
diff --git a/proj93-cython3.patch b/proj93-cython3.patch
deleted file mode 100644
index 1d74069..0000000
--- a/proj93-cython3.patch
+++ /dev/null
@@ -1,468 +0,0 @@
-diff -rupN --no-dereference pyproj-3.6.0/pyproj/_datadir.pxd pyproj-3.6.0-new/pyproj/_datadir.pxd
---- pyproj-3.6.0/pyproj/_datadir.pxd	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/pyproj/_datadir.pxd	2023-09-13 12:13:21.780093772 +0200
-@@ -1,7 +1,7 @@
- include "proj.pxi"
- 
--cpdef str _get_proj_error()
--cpdef void _clear_proj_error()
-+cpdef str _get_proj_error() noexcept
-+cpdef void _clear_proj_error() noexcept
- cdef PJ_CONTEXT* PYPROJ_GLOBAL_CONTEXT
- cdef PJ_CONTEXT* pyproj_context_create() except *
- cdef void pyproj_context_destroy(PJ_CONTEXT* context) except *
-diff -rupN --no-dereference pyproj-3.6.0/pyproj/_datadir.pyx pyproj-3.6.0-new/pyproj/_datadir.pyx
---- pyproj-3.6.0/pyproj/_datadir.pyx	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/pyproj/_datadir.pyx	2023-09-13 12:13:21.781093753 +0200
-@@ -6,7 +6,6 @@ from libc.stdlib cimport free, malloc
- 
- from pyproj._compat cimport cstrencode
- 
--from pyproj.exceptions import DataDirError
- from pyproj.utils import strtobool
- 
- # for logging the internal PROJ messages
-@@ -79,14 +78,14 @@ def get_user_data_dir(create=False):
-     )
- 
- 
--cpdef str _get_proj_error():
-+cpdef str _get_proj_error() noexcept:
-     """
-     Get the internal PROJ error message. Returns None if no error was set.
-     """
-     return _INTERNAL_PROJ_ERROR
- 
- 
--cpdef void _clear_proj_error():
-+cpdef void _clear_proj_error() noexcept:
-     """
-     Clear the internal PROJ error message.
-     """
-@@ -94,7 +93,7 @@ cpdef void _clear_proj_error():
-     _INTERNAL_PROJ_ERROR = None
- 
- 
--cdef void pyproj_log_function(void *user_data, int level, const char *error_msg) nogil:
-+cdef void pyproj_log_function(void *user_data, int level, const char *error_msg) nogil noexcept:
-     """
-     Log function for catching PROJ errors.
-     """
-diff -rupN --no-dereference pyproj-3.6.0/pyproject.toml pyproj-3.6.0-new/pyproject.toml
---- pyproj-3.6.0/pyproject.toml	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/pyproject.toml	2023-09-13 12:13:21.781093753 +0200
-@@ -1,5 +1,5 @@
- [build-system]
--requires = ["setuptools>=61.0.0", "wheel", "cython>=0.28.4"]
-+requires = ["setuptools>=61.0.0", "wheel", "cython>=3"]
- build-backend = "setuptools.build_meta"
- 
- [project]
-diff -rupN --no-dereference pyproj-3.6.0/setup.py pyproj-3.6.0-new/setup.py
---- pyproj-3.6.0/setup.py	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/setup.py	2023-09-13 12:13:21.780093772 +0200
-@@ -7,20 +7,39 @@ import sys
- from pathlib import Path
- from typing import Optional
- 
--from pkg_resources import parse_version
- from setuptools import Extension, setup
- 
--PROJ_MIN_VERSION = parse_version("9.0.0")
-+PROJ_MIN_VERSION = (9, 0, 0)
- CURRENT_FILE_PATH = Path(__file__).absolute().parent
- BASE_INTERNAL_PROJ_DIR = Path("proj_dir")
- INTERNAL_PROJ_DIR = CURRENT_FILE_PATH / "pyproj" / BASE_INTERNAL_PROJ_DIR
- PROJ_VERSION_SEARCH = re.compile(r".*Rel\.\s+(?P<version>\d+\.\d+\.\d+).*")
-+VERSION_SEARCH = re.compile(r".*(?P<version>\d+\.\d+\.\d+).*")
- 
- 
--def get_proj_version(proj_dir: Path) -> str:
-+def _parse_version(version: str) -> tuple[int, int, int]:
-+    """Convert a version string to a tuple of integers."""
-+    match = VERSION_SEARCH.search(version)
-+    if not match:
-+        raise SystemExit(
-+            f"PROJ version unable to be determined from {version}. "
-+            "Please set the PROJ_VERSION environment variable."
-+        )
-+    return tuple(
-+        int(ver) for ver in match.groupdict()["version"].split(".", maxsplit=2)
-+    )
-+
-+
-+def get_proj_version(proj_dir: Path) -> tuple[int, int, int]:
-+    """
-+    Determine PROJ version.
-+
-+    Prefer PROJ_VERSION environment variable.
-+    If PROJ_VERSION is not set, try to determine the version from the PROJ executable.
-+    """
-     proj_version = os.environ.get("PROJ_VERSION")
-     if proj_version:
--        return proj_version
-+        return _parse_version(proj_version)
-     proj = proj_dir / "bin" / "proj"
-     proj_ver = subprocess.check_output(str(proj), stderr=subprocess.STDOUT).decode(
-         "ascii"
-@@ -31,15 +50,17 @@ def get_proj_version(proj_dir: Path) ->
-             "PROJ version unable to be determined. "
-             "Please set the PROJ_VERSION environment variable."
-         )
--    return match.groupdict()["version"]
-+    return _parse_version(match.groupdict()["version"])
- 
- 
--def check_proj_version(proj_version: str) -> None:
-+def check_proj_version(proj_version: tuple[int, int, int]) -> None:
-     """checks that the PROJ library meets the minimum version"""
--    if parse_version(proj_version) < PROJ_MIN_VERSION:
-+    if proj_version < PROJ_MIN_VERSION:
-+        proj_version_str = ".".join(str(ver) for ver in proj_version)
-+        min_proj_version_str = ".".join(str(ver) for ver in PROJ_MIN_VERSION)
-         raise SystemExit(
--            f"ERROR: Minimum supported PROJ version is {PROJ_MIN_VERSION}, installed "
--            f"version is {proj_version}. For more information see: "
-+            f"ERROR: Minimum supported PROJ version is {min_proj_version_str}, "
-+            f"installed version is {proj_version_str}. For more information see: "
-             "https://pyproj4.github.io/pyproj/stable/installation.html"
-         )
- 
-@@ -154,11 +175,11 @@ def get_extension_modules():
-     # make sure cython is available
-     try:
-         from Cython.Build import cythonize
--    except ImportError:
-+    except ImportError as error:
-         raise SystemExit(
-             "ERROR: Cython.Build.cythonize not found. "
-             "Cython is required to build pyproj."
--        )
-+        ) from error
- 
-     # By default we'll try to get options PROJ_DIR or the local version of proj
-     proj_dir = get_proj_dir()
-@@ -167,9 +188,7 @@ def get_extension_modules():
- 
-     proj_version = get_proj_version(proj_dir)
-     check_proj_version(proj_version)
--    proj_version_major, proj_version_minor, proj_version_patch = parse_version(
--        proj_version
--    ).base_version.split(".")
-+    proj_version_major, proj_version_minor, proj_version_patch = proj_version
- 
-     # setup extension options
-     ext_options = {
-@@ -197,9 +216,9 @@ def get_extension_modules():
-         ],
-         quiet=True,
-         compile_time_env={
--            "CTE_PROJ_VERSION_MAJOR": int(proj_version_major),
--            "CTE_PROJ_VERSION_MINOR": int(proj_version_minor),
--            "CTE_PROJ_VERSION_PATCH": int(proj_version_patch),
-+            "CTE_PROJ_VERSION_MAJOR": proj_version_major,
-+            "CTE_PROJ_VERSION_MINOR": proj_version_minor,
-+            "CTE_PROJ_VERSION_PATCH": proj_version_patch,
-             "CTE_PYTHON_IMPLEMENTATION": platform.python_implementation(),
-         },
-         **get_cythonize_options(),
-diff -rupN --no-dereference pyproj-3.6.0/test/conftest.py pyproj-3.6.0-new/test/conftest.py
---- pyproj-3.6.0/test/conftest.py	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/test/conftest.py	2023-09-13 12:13:21.781093753 +0200
-@@ -18,6 +18,7 @@ PROJ_GTE_91 = PROJ_LOOSE_VERSION >= vers
- PROJ_GTE_911 = PROJ_LOOSE_VERSION >= version.parse("9.1.1")
- PROJ_GTE_92 = PROJ_LOOSE_VERSION >= version.parse("9.2.0")
- PROJ_GTE_921 = PROJ_LOOSE_VERSION >= version.parse("9.2.1")
-+PROJ_GTE_93 = PROJ_LOOSE_VERSION >= version.parse("9.3.0")
- 
- 
- def unset_data_dir():
-diff -rupN --no-dereference pyproj-3.6.0/test/test_proj.py pyproj-3.6.0-new/test/test_proj.py
---- pyproj-3.6.0/test/test_proj.py	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/test/test_proj.py	2023-09-13 12:13:21.782093733 +0200
-@@ -5,7 +5,7 @@ import sys
- import unittest
- from unittest.mock import patch
- 
--import numpy as np
-+import numpy
- import pytest
- from numpy.testing import assert_almost_equal
- 
-@@ -441,11 +441,11 @@ def test_reset_errno():
- @pytest.mark.parametrize("radians", [False, True])
- def test_get_factors__2d_input(radians):
-     transformer = Proj(3857)
--    longitude = np.array([[0, 1], [2, 3]])
--    latitude = np.array([[1, 2], [3, 4]])
-+    longitude = numpy.array([[0, 1], [2, 3]])
-+    latitude = numpy.array([[1, 2], [3, 4]])
-     if radians:
--        longitude = np.radians(longitude)
--        latitude = np.radians(latitude)
-+        longitude = numpy.radians(longitude)
-+        latitude = numpy.radians(latitude)
-     factors = transformer.get_factors(
-         longitude=longitude, latitude=latitude, radians=radians
-     )
-@@ -497,22 +497,36 @@ def test_get_factors():
- def test_get_factors__nan_inf():
-     transformer = Proj(3857)
-     factors = transformer.get_factors(
--        longitude=[0, np.nan, np.inf, 0], latitude=[np.nan, 2, 2, np.inf]
-+        longitude=[0, numpy.nan, numpy.inf, 0], latitude=[numpy.nan, 2, 2, numpy.inf]
-     )
--    assert_almost_equal(factors.meridional_scale, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.parallel_scale, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.areal_scale, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.angular_distortion, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(
--        factors.meridian_parallel_angle, [np.inf, np.inf, np.inf, np.inf]
--    )
--    assert_almost_equal(factors.meridian_convergence, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.tissot_semimajor, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.tissot_semiminor, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.dx_dlam, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.dx_dphi, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.dy_dlam, [np.inf, np.inf, np.inf, np.inf])
--    assert_almost_equal(factors.dy_dphi, [np.inf, np.inf, np.inf, np.inf])
-+    assert_almost_equal(
-+        factors.meridional_scale, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(
-+        factors.parallel_scale, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(
-+        factors.areal_scale, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(
-+        factors.angular_distortion, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(
-+        factors.meridian_parallel_angle, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(
-+        factors.meridian_convergence, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(
-+        factors.tissot_semimajor, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(
-+        factors.tissot_semiminor, [numpy.inf, numpy.inf, numpy.inf, numpy.inf]
-+    )
-+    assert_almost_equal(factors.dx_dlam, [numpy.inf, numpy.inf, numpy.inf, numpy.inf])
-+    assert_almost_equal(factors.dx_dphi, [numpy.inf, numpy.inf, numpy.inf, numpy.inf])
-+    assert_almost_equal(factors.dy_dlam, [numpy.inf, numpy.inf, numpy.inf, numpy.inf])
-+    assert_almost_equal(factors.dy_dphi, [numpy.inf, numpy.inf, numpy.inf, numpy.inf])
- 
- 
- def test_get_factors__errcheck():
-@@ -523,7 +537,7 @@ def test_get_factors__errcheck():
- 
- def test_numpy_bool_kwarg_false():
-     # Issue 564
--    south = np.array(50) < 0
-+    south = numpy.array(50) < 0
-     proj = Proj(
-         proj="utm", zone=32, ellipsis="WGS84", datum="WGS84", units="m", south=south
-     )
-@@ -532,7 +546,7 @@ def test_numpy_bool_kwarg_false():
- 
- def test_numpy_bool_kwarg_true():
-     # Issue 564
--    south = np.array(50) > 0
-+    south = numpy.array(50) > 0
-     proj = Proj(
-         proj="utm", zone=32, ellipsis="WGS84", datum="WGS84", units="m", south=south
-     )
-diff -rupN --no-dereference pyproj-3.6.0/test/test_transformer.py pyproj-3.6.0-new/test/test_transformer.py
---- pyproj-3.6.0/test/test_transformer.py	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/test/test_transformer.py	2023-09-13 12:13:21.783093713 +0200
-@@ -9,7 +9,7 @@ from itertools import permutations
- from pathlib import Path
- from unittest.mock import call, patch
- 
--import numpy as np
-+import numpy
- import pytest
- from numpy.testing import assert_almost_equal, assert_array_equal
- 
-@@ -22,6 +22,7 @@ from pyproj.transformer import AreaOfInt
- from test.conftest import (
-     PROJ_GTE_91,
-     PROJ_GTE_92,
-+    PROJ_GTE_93,
-     grids_available,
-     proj_env,
-     proj_network_env,
-@@ -64,8 +65,8 @@ def test_illegal_transformation():
-         xx, yy = pyproj.transform(
-             p1, p2, (-180, -180, 180, 180, -180), (-90, 90, 90, -90, -90)
-         )
--    assert np.all(np.isinf(xx))
--    assert np.all(np.isinf(yy))
-+    assert numpy.all(numpy.isinf(xx))
-+    assert numpy.all(numpy.isinf(yy))
-     with pytest.warns(FutureWarning), pytest.raises(ProjError):
-         pyproj.transform(
-             p1, p2, (-180, -180, 180, 180, -180), (-90, 90, 90, -90, -90), errcheck=True
-@@ -412,7 +413,7 @@ def test_always_xy__itransform():
-         )
- 
- 
--@pytest.mark.parametrize("empty_array", [(), [], np.array([])])
-+@pytest.mark.parametrize("empty_array", [(), [], numpy.array([])])
- def test_transform_empty_array_xy(empty_array):
-     transformer = Transformer.from_crs(2193, 4326)
-     assert_array_equal(
-@@ -420,7 +421,7 @@ def test_transform_empty_array_xy(empty_
-     )
- 
- 
--@pytest.mark.parametrize("empty_array", [(), [], np.array([])])
-+@pytest.mark.parametrize("empty_array", [(), [], numpy.array([])])
- def test_transform_empty_array_xyzt(empty_array):
-     transformer = Transformer.from_pipeline("+init=ITRF2008:ITRF2000")
-     assert_array_equal(
-@@ -540,7 +541,7 @@ def test_repr__conditional():
-             "Description: unavailable until proj_trans is called\n"
-             "Area of Use:\n- undefined"
-         )
--    elif PROJ_GTE_92:
-+    elif PROJ_GTE_92 and not PROJ_GTE_93:
-         assert trans_repr == (
-             "<Unknown Transformer: noop>\n"
-             "Description: Transformation from EGM2008 height to WGS 84 "
-@@ -555,7 +556,7 @@ def test_repr__conditional():
-             "(ballpark vertical transformation, without ellipsoid height "
-             "to vertical height correction)\n"
-             "Area of Use:\n"
--            "- name: World\n"
-+            f"- name: World{'.' if PROJ_GTE_93 else ''}\n"
-             "- bounds: (-180.0, -90.0, 180.0, 90.0)"
-         )
- 
-@@ -1205,7 +1206,7 @@ def test_transform_bounds_densify(densit
-         "+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 "
-         "+a=6370997 +b=6370997 +units=m +no_defs",
-     )
--    assert np.allclose(
-+    assert numpy.allclose(
-         transformer.transform_bounds(40, -120, 64, -80, densify_pts=density),
-         expected,
-     )
-@@ -1222,7 +1223,15 @@ def test_transform_bounds_densify(densit
-     "input_bounds, radians",
-     [
-         ((-120, 40, -80, 64), False),
--        ((np.radians(-120), np.radians(40), np.radians(-80), np.radians(64)), True),
-+        (
-+            (
-+                numpy.radians(-120),
-+                numpy.radians(40),
-+                numpy.radians(-80),
-+                numpy.radians(64),
-+            ),
-+            True,
-+        ),
-     ],
- )
- def test_transform_bounds_densify__xy(density, expected, input_bounds, radians):
-@@ -1232,7 +1241,7 @@ def test_transform_bounds_densify__xy(de
-         "+a=6370997 +b=6370997 +units=m +no_defs",
-         always_xy=True,
-     )
--    assert np.allclose(
-+    assert numpy.allclose(
-         transformer.transform_bounds(
-             *input_bounds, densify_pts=density, radians=radians
-         ),
-@@ -1459,8 +1468,8 @@ def test_transform_bounds__south_pole__x
- 
- @pytest.mark.parametrize("inplace", [True, False])
- def test_transform__fortran_order(inplace):
--    lons, lats = np.arange(-180, 180, 20), np.arange(-90, 90, 10)
--    lats, lons = np.meshgrid(lats, lons)
-+    lons, lats = numpy.arange(-180, 180, 20), numpy.arange(-90, 90, 10)
-+    lats, lons = numpy.meshgrid(lats, lons)
-     f_lons, f_lats = lons.copy(order="F"), lats.copy(order="F")
-     transformer = Transformer.from_crs(
-         "EPSG:4326",
-@@ -1519,10 +1528,10 @@ def test_4d_transform__inplace__array__i
- 
- def test_4d_transform__inplace__numpy():
-     transformer = Transformer.from_crs(7789, 8401)
--    xarr = np.array([3496737.2679], dtype=np.float64)
--    yarr = np.array([743254.4507], dtype=np.float64)
--    zarr = np.array([5264462.9620], dtype=np.float64)
--    tarr = np.array([2019.0], dtype=np.float64)
-+    xarr = numpy.array([3496737.2679], dtype=numpy.float64)
-+    yarr = numpy.array([743254.4507], dtype=numpy.float64)
-+    zarr = numpy.array([5264462.9620], dtype=numpy.float64)
-+    tarr = numpy.array([2019.0], dtype=numpy.float64)
-     t_xarr, t_yarr, t_zarr, t_tarr = transformer.transform(
-         xx=xarr, yy=yarr, zz=zarr, tt=tarr, inplace=True
-     )
-@@ -1538,10 +1547,10 @@ def test_4d_transform__inplace__numpy():
- 
- def test_4d_transform__inplace__numpy__int():
-     transformer = Transformer.from_crs(7789, 8401)
--    xarr = np.array([3496737], dtype=np.int32)
--    yarr = np.array([743254], dtype=np.int32)
--    zarr = np.array([5264462], dtype=np.int32)
--    tarr = np.array([2019], dtype=np.int32)
-+    xarr = numpy.array([3496737], dtype=numpy.int32)
-+    yarr = numpy.array([743254], dtype=numpy.int32)
-+    zarr = numpy.array([5264462], dtype=numpy.int32)
-+    tarr = numpy.array([2019], dtype=numpy.int32)
-     t_xarr, t_yarr, t_zarr, t_tarr = transformer.transform(
-         xx=xarr, yy=yarr, zz=zarr, tt=tarr, inplace=True
-     )
-diff -rupN --no-dereference pyproj-3.6.0/test/test_utils.py pyproj-3.6.0-new/test/test_utils.py
---- pyproj-3.6.0/test/test_utils.py	2023-06-12 15:27:32.000000000 +0200
-+++ pyproj-3.6.0-new/test/test_utils.py	2023-09-13 12:13:21.783093713 +0200
-@@ -2,8 +2,6 @@ from array import array
- 
- import numpy
- import pytest
--from pandas import Series
--from xarray import DataArray
- 
- from pyproj.utils import DataType, _copytobuffer, _copytobuffer_return_scalar
- 
-@@ -22,7 +20,6 @@ def test__copytobuffer_return_scalar__in
-     "in_data, data_type",
-     [
-         (numpy.array(1), DataType.FLOAT),
--        (DataArray(numpy.array(1)), DataType.FLOAT),
-         (1, DataType.FLOAT),
-         ([1], DataType.LIST),
-         ((1,), DataType.TUPLE),
-@@ -32,10 +29,23 @@ def test__copytobuffer(in_data, data_typ
-     assert _copytobuffer(in_data) == (array("d", [1]), data_type)
- 
- 
--@pytest.mark.parametrize(
--    "in_arr", [numpy.array([1]), DataArray(numpy.array([1])), Series(numpy.array([1]))]
--)
--def test__copytobuffer__numpy_array(in_arr):
-+def test__copytobuffer__xarray_scalar():
-+    xarray = pytest.importorskip("xarray")
-+    assert _copytobuffer(xarray.DataArray(numpy.array(1))) == (
-+        array("d", [1]),
-+        DataType.FLOAT,
-+    )
-+
-+
-+@pytest.mark.parametrize("arr_type", ["numpy", "xarray", "pandas"])
-+def test__copytobuffer__array(arr_type):
-+    in_arr = numpy.array([1])
-+    if arr_type == "xarray":
-+        xarray = pytest.importorskip("xarray")
-+        in_arr = xarray.DataArray(in_arr)
-+    elif arr_type == "pandas":
-+        pandas = pytest.importorskip("pandas")
-+        in_arr = pandas.Series(in_arr)
-     assert _copytobuffer(in_arr) == (
-         in_arr.astype("d").__array__(),
-         DataType.ARRAY,

diff --git a/pyproj-proj-9.6.2.patch b/pyproj-proj-9.6.2.patch
deleted file mode 100644
index 82f9cf6..0000000
--- a/pyproj-proj-9.6.2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- pyproj-3.7.2.unchanged/test/test_transformer.py	2025-08-14 13:05:05.000000000 +0200
-+++ pyproj-3.7.2/test/test_transformer.py	2025-09-12 11:33:46.335766578 +0200
-@@ -1260,7 +1260,7 @@ def test_transform_bounds_radians_output
-     )
- 
- 
--def test_transform_bounds__antimeridian():
-+def skip_test_transform_bounds__antimeridian():
-     crs = CRS("EPSG:3851")
-     transformer = Transformer.from_crs(crs.geodetic_crs, crs)
-     minx, miny, maxx, maxy = crs.area_of_use.bounds
-@@ -1278,7 +1278,7 @@ def test_transform_bounds__antimeridian(
-     )
- 
- 
--def test_transform_bounds__antimeridian__xy():
-+def skip_test_transform_bounds__antimeridian__xy():
-     crs = CRS("EPSG:3851")
-     transformer = Transformer.from_crs(
-         crs.geodetic_crs,

diff --git a/pyproj-proj-9.7.1.patch b/pyproj-proj-9.7.1.patch
new file mode 100644
index 0000000..f165125
--- /dev/null
+++ b/pyproj-proj-9.7.1.patch
@@ -0,0 +1,60 @@
+--- pyproj-3.7.2.unchanged/test/conftest.py	2025-08-14 13:05:05.000000000 +0200
++++ pyproj-3.7.2/test/conftest.py	2026-01-31 15:15:25.496542550 +0100
+@@ -14,6 +14,7 @@ _NETWORK_ENABLED = pyproj.network.is_net
+ PROJ_LOOSE_VERSION = version.parse(pyproj.__proj_version__)
+ PROJ_GTE_941 = PROJ_LOOSE_VERSION >= version.parse("9.4.1")
+ PROJ_GTE_95 = PROJ_LOOSE_VERSION >= version.parse("9.5.0")
++PROJ_GTE_971 = PROJ_LOOSE_VERSION >= version.parse("9.7.1")
+ 
+ 
+ def unset_data_dir():
+--- pyproj-3.7.2.unchanged/test/crs/test_crs.py	2025-08-14 13:05:05.000000000 +0200
++++ pyproj-3.7.2/test/crs/test_crs.py	2026-01-31 15:15:19.327841674 +0100
+@@ -20,7 +20,7 @@ from pyproj.crs.enums import CoordinateO
+ from pyproj.enums import ProjVersion, WktVersion
+ from pyproj.exceptions import CRSError
+ from pyproj.transformer import TransformerGroup
+-from test.conftest import PROJ_GTE_941, assert_can_pickle, grids_available
++from test.conftest import PROJ_GTE_941, PROJ_GTE_971, assert_can_pickle, grids_available
+ 
+ 
+ class CustomCRS:
+@@ -417,7 +417,20 @@ def test_datum():
+ 
+ 
+ def test_datum_horizontal():
+-    assert CRS.from_epsg(5972).datum == CRS.from_epsg(25832).datum
++    # EPSG:5972 is a Norwegian compound CRS
++    # In PROJ < 9.7.1, it uses the generic ETRS89 ensemble (same as EPSG:25832)
++    # In PROJ >= 9.7.1 (EPSG v12.022+), it uses the
++    # Norway-specific ETRS89-NOR realization
++    crs_5972 = CRS.from_epsg(5972)
++    if PROJ_GTE_971:
++        # Test against ETRS89-NOR [EUREF89] / UTM zone 32N
++        crs_11022 = CRS.from_epsg(11022)
++        assert crs_5972.datum is not None
++        assert crs_5972.datum == crs_11022.datum
++    else:
++        # Test against ETRS89 / UTM zone 32N
++        crs_25832 = CRS.from_epsg(25832)
++        assert crs_5972.datum == crs_25832.datum
+ 
+ 
+ def test_datum_unknown():
+@@ -571,7 +584,15 @@ def test_sub_crs():
+     crs = CRS.from_epsg(5972)
+     sub_crs_list = crs.sub_crs_list
+     assert len(sub_crs_list) == 2
+-    assert sub_crs_list[0] == CRS.from_epsg(25832)
++    # First sub-CRS should be a projected CRS (UTM zone 32N)
++    # In PROJ < 9.7.1, it's EPSG:25832 (ETRS89 / UTM zone 32N)
++    # In PROJ >= 9.7.1 (EPSG v12.022+), it's EPSG:11022 (ETRS89-NOR / UTM zone 32N)
++    if PROJ_GTE_971:
++        assert sub_crs_list[0].is_projected
++        assert sub_crs_list[0] == CRS.from_epsg(11022)
++    else:
++        assert sub_crs_list[0] == CRS.from_epsg(25832)
++    # Second sub-CRS should be NN2000 height (vertical)
+     assert sub_crs_list[1] == CRS.from_epsg(5941)
+     assert crs.is_projected
+     assert crs.is_vertical

diff --git a/pyproj.spec b/pyproj.spec
index c1800ee..0cc982f 100644
--- a/pyproj.spec
+++ b/pyproj.spec
@@ -6,21 +6,22 @@
 
 Name:           pyproj
 Version:        3.7.2
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Cython wrapper to provide python interfaces to Proj
 # this software uses the "MIT:Modern Style with sublicense" license
 License:        MIT
 URL:            https://github.com/jswhit/%{name}
 Source0:        https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
 
-# see: https://github.com/pyproj4/pyproj/issues/1501
-Patch1:         pyproj-proj-9.6.2.patch
+# see: https://github.com/pyproj4/pyproj/issues/1553
+# and: https://github.com/pyproj4/pyproj/pull/1557
+Patch1:         pyproj-proj-9.7.1.patch
 
 BuildRequires:  gcc
 BuildRequires:  proj-devel >= %{minimal_needed_proj_version}
 BuildRequires:  proj >= %{minimal_needed_proj_version}
 
-# these next 4 are no longer needed and taken care of automagically
+# these next 3 lines are no longer needed and taken care of automagically
 #BuildRequires:  make
 #BuildRequires:  python3-cython
 #BuildRequires:  python3-certifi
@@ -64,6 +65,10 @@ Summary: %summary
 
 Requires:  proj >= %{minimal_needed_proj_version}
 
+# Add shapely as (optional/weak) dependency.
+# For details see: https://github.com/pyproj4/pyproj/issues/1470
+Recommends: python3-shapely
+
 # ensure python provides are provided when python3 becomes the default runtime
 %{?python_provide:%python_provide python3-%{name}}
 
@@ -181,6 +186,10 @@ cp ../pyproj-%{version}/pytest.ini .
 
 
 %changelog
+* Sat Jan 31 2026 Jos de Kloe <josdekloe@gmail.com> 3.7.2-5
+- Import upstream patch to fix problem introduced by upgrade proj to v9.7.1
+- Remove old patch for proj v9.6.2 that is no longer needed.
+
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.2-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 
@@ -190,7 +199,7 @@ cp ../pyproj-%{version}/pytest.ini .
 * Mon Sep 15 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 3.7.2-2
 - Re-enable xarray integration tests
 
-* Fri Sep 12 2025 Jos de Kloe <josdekloe@gmail.com> 3.7.2
+* Fri Sep 12 2025 Jos de Kloe <josdekloe@gmail.com> 3.7.2-1
 - Update to 3.7.2; 2 tests are still disabled due to a regression in proj 9.6.2
 - Introduce new style pyproject macros
 

                 reply	other threads:[~2026-09-26 14:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179043309169.1.9631545649343184438.rpms-pyproj-45c5abe9fc00@fedoraproject.org \
    --to=josdekloe@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox