4c03922
%global srcname rasterio
4c03922
4c03922
Name:           python-%{srcname}
9c11b70
Version:        1.3.9
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
9c11b70
# Selective backport of https://github.com/rasterio/rasterio/commit/121335576a5ee5fc739d7b315498cc4a77ac6eb8
9c11b70
Patch:          rasterio-gdal3.8.patch
4c03922
72abdaa
BuildRequires:  gcc-c++
6711b52
BuildRequires:  gdal >= 1.11
6711b52
BuildRequires:  gdal-devel >= 1.11
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
f119af6
%pyproject_buildrequires -r -x ipython,plot,test
f119af6
4c03922
%build
f119af6
%pyproject_wheel
4c03922
4c03922
%install
f119af6
%pyproject_install
f119af6
%pyproject_save_files %{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.
34bf454
# Skip debian tests since we are not on debian
f119af6
%{pytest} -ra -m 'not network and not wheel' \
0218ac3
    -k 'not test_outer_boundless_pixel_fidelity and not debian'
4c03922
f119af6
%files -n python3-%{srcname} -f %{pyproject_files}
4c03922
%doc README.rst AUTHORS.txt CHANGES.txt CITATION.txt
4c03922
%license LICENSE.txt
4c03922
%{_bindir}/rio
4c03922
4c03922
%changelog
aa30456
%autochangelog