## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 1;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global srcname rasterio

Name:           python-%{srcname}
Version:        1.4.3
Release:        %autorelease
Summary:        Fast and direct raster I/O for use with Numpy and SciPy

License:        BSD-3-Clause
URL:            https://github.com/rasterio/rasterio
# PyPI tarball doesn't include test data.
Source0:        https://github.com/rasterio/rasterio/archive/%{version}/%{srcname}-%{version}.tar.gz
Patch:          0001-Loosen-up-build-requirements.patch

BuildRequires:  gcc-c++
BuildRequires:  gdal >= 3.1
BuildRequires:  gdal-devel >= 3.1

%global _description \
Rasterio reads and writes geospatial raster data. Geographic information \
systems use GeoTIFF and other formats to organize and store gridded, or raster, \
datasets. Rasterio reads and writes these formats and provides a Python API \
based on ND arrays.

%description %{_description}


%package -n     python3-%{srcname}
Summary:        %{summary}

BuildRequires:  python3-devel

%description -n python3-%{srcname} %{_description}

%pyproject_extras_subpkg -n python3-%{srcname} ipython plot s3


%prep
%autosetup -n %{srcname}-%{version} -p1

%generate_buildrequires
%pyproject_buildrequires -x ipython,plot,test

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files -l %{srcname}

%check
rm -r %{srcname}  # Don't try unbuilt copy.

# test_outer_boundless_pixel_fidelity is very flaky, so skip it.
# Skip debian tests since we are not on debian
%{pytest} -ra -m 'not network and not wheel' \
    -k 'not test_outer_boundless_pixel_fidelity and not debian'

%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.rst AUTHORS.txt CHANGES.txt CITATION.txt
%{_bindir}/rio

%changelog
## START: Generated by rpmautospec
* Fri Dec 06 2024 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.3-1
- Update to latest version (#2329974)

* Fri Dec 06 2024 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.4.2-2
- Add Packit configuration

* Sat Nov 09 2024 Sandro Mani <manisandro@gmail.com> - 1.4.2-1
- Update to 1.4.2

* Fri Nov 08 2024 Sandro Mani <manisandro@gmail.com> - 1.3.11-2
- Rebuild (gdal)

* Tue Sep 10 2024 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.11-1
- Update to latest version

* Fri Jul 26 2024 Adam Williamson <awilliam@redhat.com> - 1.3.10-6
- Don't skip test_sieve_all_masked any more

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Fri Jun 14 2024 Adam Williamson <awilliam@redhat.com> - 1.3.10-4
- Backport fixes and disable one test to fix build with gdal 3.9

* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 1.3.10-3
- Rebuilt for Python 3.13

* Mon May 13 2024 Sandro Mani <manisandro@gmail.com> - 1.3.10-2
- Rebuild (gdal)

* Wed Apr 24 2024 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.10-1
- Update to latest version

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Thu Nov 23 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.9-2
- Allow older setuptools

* Thu Nov 16 2023 Sandro Mani <manisandro@gmail.com> - 1.3.9-1
- Update to 1.3.9, backport fix for gdal 3.8 test failure

* Wed Nov 15 2023 Sandro Mani <manisandro@gmail.com> - 1.3.8-3
- Rebuild (gdal)

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Fri Jul 07 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.8-1
- Update to latest version (#2218317)

* Tue Jul 04 2023 Python Maint <python-maint@redhat.com> - 1.3.7-2
- Rebuilt for Python 3.12

* Tue May 23 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.7-1
- Update to latest version (#2209158)

* Thu May 11 2023 Sandro Mani <manisandro@gmail.com> - 1.3.6-4
- Backport patches for gdal-3.7.0 compatibility

* Thu May 11 2023 Sandro Mani <manisandro@gmail.com> - 1.3.6-3
- Rebuild (gdal)

* Sun Apr 09 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.6-2
- Switch to SPDX license

* Sun Feb 19 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.6-1
- Update to latest version (#2164638)

* Sun Jan 22 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.4-5
- Backport test fix for affine 2.4.0

* Sun Jan 22 2023 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.4-4
- Backport test fix for GDAL 3.6.1

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Wed Nov 23 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.4-1
- Update to latest version (#2143456)

* Sun Oct 23 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.3-1
- Update to latest version (#2136303)

* Sun Aug 21 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.2-1
- Update to latest version (#2119232)

* Sun Jul 31 2022 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3.0-1
- Update to latest version (#2014368)

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.2.10-5
- Rebuilt for Python 3.11

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Fri Nov 12 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.10-3
- Fix changelog

* Thu Nov 11 2021 Sandro Mani <manisandro@gmail.com> - 1.2.10-2
- Rebuild (gdal)

* Mon Oct 11 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.10-1
- Update to latest version (#2011084)

* Sat Oct 02 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.9-1
- Update to latest version (#2009884)

* Sat Sep 11 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.8-1
- Update to latest version (#2002760)

* Wed Sep 08 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.7-1
- Update to latest version (#2002014)

* Wed Sep 08 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.6-3
- Switch to latest Python macros

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Sun Jul 04 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.6-1
- Update to latest version (#1974544)

* Fri Jun 04 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.4-1
- Update to latest version (#1966349)

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.2.3-3
- Rebuilt for Python 3.10

* Fri May 07 2021 Sandro Mani <manisandro@gmail.com> - 1.2.3-2
- Rebuild (gdal)

* Tue Apr 27 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.3-1
- Update to latest version (#1953804)

* Thu Apr 08 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.2-1
- Update to latest version (#1947027)

* Sat Mar 06 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.1-1
- Update to latest version (#1934831)

* Sat Feb 06 2021 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.0-1
- Update to latest version
- Add extras subpackages

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Nov 11 13:07:29 CET 2020 Sandro Mani <manisandro@gmail.com> - 1.1.8-2
- Rebuild (proj, gdal)

* Wed Oct 21 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.1.8-1
- Update to latest version (#1879133)

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1.4-3
- Rebuilt for Python 3.9

* Thu May 21 2020 Sandro Mani <manisandro@gmail.com> - 1.1.4-2
- Rebuild (gdal)

* Sun May 10 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.1.4-1
- Update to latest version

* Tue Mar 03 2020 Sandro Mani <manisandro@gmail.com> - 1.1.3-2
- Rebuild (gdal)

* Wed Feb 26 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.1.3-1
- Update to latest version

* Tue Jan 28 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.1.2-1
- Update to latest version

* Mon Oct 07 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.1.0-2
- rebuilt

* Mon Oct 07 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.1.0-1
- Update to latest version

* Mon Sep 09 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.28-1
- Update to latest version

* Sun Sep 08 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.27-1
- Update to latest version

* Fri Aug 30 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.26-1
- Update to latest version

* Fri Aug 23 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.25-1
- Update to latest version

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.24-3
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.24-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Jun 06 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.24-1
- Update to latest version

* Thu May 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.23-1
- Update to latest version

* Thu Mar 21 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.22-1
- Update to latest version

* Sun Mar 03 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.21-1
- Update to latest version

* Thu Feb 28 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.20-1
- Update to latest version

* Tue Feb 12 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.18-1
- Update to latest version

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Thu Jan 17 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.13-1
- Update to latest version

* Wed Dec 12 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.12-1
- Update to latest version

* Mon Nov 05 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.9-1
- Update to latest version

* Fri Sep 21 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-3
- Drop Python 2 subpackage

* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 1.0.2-2
- Rebuild with fixed binutils

* Sun Jul 29 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.2-1
- Update to latest version

* Tue Jul 24 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.1-1
- Update to latest version

* Fri Jul 13 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0.0-1
- Update to latest version.

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0b1-2
- Rebuilt for Python 3.7

* Sun May 27 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0b1-1
- Update to latest version.

* Sat Jan 06 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0a12-1
- Initial package.

## END: Generated by rpmautospec