4c03922
%global srcname rasterio
4c03922
4c03922
Name:           python-%{srcname}
df9506d
Version:        1.3.10
aa30456
Release:        %autorelease
4c03922
Summary:        Fast and direct raster I/O for use with Numpy and SciPy
4c03922
7250a04
License:        BSD-3-Clause
3eceb98
URL:            https://github.com/rasterio/rasterio
4c03922
# PyPI tarball doesn't include test data.
3eceb98
Source0:        https://github.com/rasterio/rasterio/archive/%{version}/%{srcname}-%{version}.tar.gz
ad2ae0c
Patch:          0001-Loosen-up-build-requirements.patch
57688e1
# https://github.com/rasterio/rasterio/pull/3091
57688e1
# Update tests for gdal 3.9.0
57688e1
Patch:          0001-Adjust-test-expectations-in-light-of-3.9.0-3091.patch
57688e1
# https://github.com/rasterio/rasterio/pull/3102
57688e1
# Restore a check that #3091 unnecessarily removed
57688e1
Patch:          0002-restore-gdalinfo-output-check-for-tag-test-with-fix-.patch
4c03922
72abdaa
BuildRequires:  gcc-c++
df9506d
BuildRequires:  gdal >= 3.1
df9506d
BuildRequires:  gdal-devel >= 3.1
4c03922
4c03922
%global _description \
4c03922
Rasterio reads and writes geospatial raster data. Geographic information \
4c03922
systems use GeoTIFF and other formats to organize and store gridded, or raster, \
4c03922
datasets. Rasterio reads and writes these formats and provides a Python API \
4c03922
based on ND arrays.
4c03922
4c03922
%description %{_description}
4c03922
4c03922
4c03922
%package -n     python3-%{srcname}
4c03922
Summary:        %{summary}
4c03922
4c03922
BuildRequires:  python3-devel
4c03922
4c03922
%description -n python3-%{srcname} %{_description}
4c03922
f119af6
%pyproject_extras_subpkg -n python3-%{srcname} ipython plot s3
91693e6
91693e6
4c03922
%prep
5aacca8
%autosetup -n %{srcname}-%{version} -p1
4c03922
f119af6
%generate_buildrequires
df9506d
%pyproject_buildrequires -x ipython,plot,test
f119af6
4c03922
%build
f119af6
%pyproject_wheel
4c03922
4c03922
%install
f119af6
%pyproject_install
df9506d
%pyproject_save_files -l %{srcname}
4c03922
4c03922
%check
4c03922
rm -r %{srcname}  # Don't try unbuilt copy.
4c03922
f6c6ace
# test_outer_boundless_pixel_fidelity is very flaky, so skip it.
57688e1
# test_sieve_all_masked crashes with gdal 3.9 - https://github.com/rasterio/rasterio/issues/3101
34bf454
# Skip debian tests since we are not on debian
f119af6
%{pytest} -ra -m 'not network and not wheel' \
57688e1
    -k 'not test_outer_boundless_pixel_fidelity and not test_sieve_all_masked and not debian'
4c03922
f119af6
%files -n python3-%{srcname} -f %{pyproject_files}
4c03922
%doc README.rst AUTHORS.txt CHANGES.txt CITATION.txt
4c03922
%{_bindir}/rio
4c03922
4c03922
%changelog
aa30456
%autochangelog