Name: shadowfinder Version: 0.7.1 Release: 1%{?dist} Summary: Find the possible locations of a shadow from its length and the time License: MIT URL: https://github.com/bellingcat/ShadowFinder Source0: %{url}/archive/%{version}/ShadowFinder-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest %description ShadowFinder, from Bellingcat, takes the height of an object, the length of its shadow and the date and time a photo was taken, and maps everywhere on Earth where the sun stood at the matching angle. It narrows down where an image could have been taken; it can also start from a known sun altitude. %prep %autosetup -n ShadowFinder-%{version} -p1 # Upstream's caret pins lag Fedora's versions. sed -i -e '/^\[tool.poetry.dependencies\]/,/^$/{/^python /!{s/= "[~^>][^"]*"/= "*"/; s/version = "[~^][^"]*"/version = "*"/}}' \ pyproject.toml # timezonefinder 6.6 dropped its "pytz" extra; pytz is a direct # dependency here anyway. sed -i 's/^timezonefinder = {version = "[^"]*", extras = \["pytz"\]}$/timezonefinder = "*"/' pyproject.toml grep -q '^timezonefinder = "\*"$' pyproject.toml # The CLI reads the precomputed time zone grid from the working directory, # and find_sun's default is misspelled; use the installed copy. sed -i -E '/def generate_timezone_grid/,$!s;grid: str = "time(zone|zene)_grid.json",;grid: str = "%{_datadir}/%{name}/timezone_grid.json",;' \ src/shadowfinder/cli.py test "$(grep -c '%{_datadir}/%{name}/timezone_grid.json' src/shadowfinder/cli.py)" = 2 %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # f43's poetry-core does not record License-File (PEP 639). %pyproject_save_files -L shadowfinder install -Dpm 0644 timezone_grid.json %{buildroot}%{_datadir}/%{name}/timezone_grid.json %check %pyproject_check_import export MPLBACKEND=Agg %pytest tests %files -f %{pyproject_files} %license LICENSE %doc README.md %{_bindir}/shadowfinder %{_datadir}/%{name}/ %changelog * Sat Oct 31 2026 Morgan Hough - 0.7.1-1 - Initial package