Name: python-timezonefinder Version: 6.6.3 Release: 1%{?dist} Summary: Offline lookup of the time zone at any coordinates on Earth # Code is MIT. timezonefinder/data is derived from timezone-boundary-builder, # itself built from OpenStreetMap data, under ODbL-1.0 (DATA_LICENSE). License: MIT AND ODbL-1.0 URL: https://github.com/jannikmi/timezonefinder Source0: %{pypi_source timezonefinder} BuildRequires: python3-devel BuildRequires: gcc BuildRequires: python3-pytest %global _description %{expand: timezonefinder finds the IANA time zone name (such as Europe/Berlin) for any latitude and longitude, offline. It ships the time zone boundaries in a compact binary format and checks point-in-polygon with a small C extension.} %description %{_description} %package -n python3-timezonefinder Summary: %{summary} %description -n python3-timezonefinder %{_description} %prep %autosetup -n timezonefinder-%{version} # Fedora's cffi is 2.x; the extension uses only the stable ABI-mode API. sed -i 's/"cffi<2,>=1.15.1"/"cffi>=1.15.1"/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # Upstream's packaging also installs its tests as a top-level "tests" # package and DATA_LICENSE straight into the prefix (shipped as %%license). rm -r %{buildroot}%{python3_sitearch}/tests %{buildroot}%{_prefix}/DATA_LICENSE %pyproject_save_files -l timezonefinder %check %pyproject_check_import -e timezonefinder.utils_numba -e timezonefinder._numba_replacements # Most test modules import upstream's scripts/ package (data generation), # which is not in the sdist; run the ones that do not, plus known lookups. %pytest tests/cli_test.py tests/test_compatibility.py \ tests/test_flatbuf_polygon_utils.py tests/test_flatbuf_shortcut_utils.py %{py3_test_envvars} %{python3} -c ' from timezonefinder import TimezoneFinder tf = TimezoneFinder() assert tf.timezone_at(lng=13.358, lat=52.5061) == "Europe/Berlin" assert tf.timezone_at(lng=-122.42, lat=37.77) == "America/Los_Angeles" ' %files -n python3-timezonefinder -f %{pyproject_files} %license DATA_LICENSE %doc README.rst %{_bindir}/timezonefinder %changelog * Sat Oct 31 2026 Morgan Hough - 6.6.3-1 - Initial package