4c03922
%global srcname rasterio
4c03922
4c03922
Name:           python-%{srcname}
4c03922
Version:        1.0a12
4c03922
Release:        1%{?dist}
4c03922
Summary:        Fast and direct raster I/O for use with Numpy and SciPy
4c03922
4c03922
License:        BSD
4c03922
URL:            https://github.com/mapbox/rasterio
4c03922
# PyPI tarball doesn't include test data.
4c03922
Source0:        https://github.com/mapbox/rasterio/archive/%{version}/%{srcname}-%{version}.tar.gz
4c03922
4c03922
BuildRequires:  gdal
4c03922
BuildRequires:  gdal-devel
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     python2-%{srcname}
4c03922
Summary:        %{summary}
4c03922
%{?python_provide:%python_provide python2-%{srcname}}
4c03922
4c03922
BuildRequires:  python2-devel
4c03922
BuildRequires:  python2-setuptools
4c03922
BuildRequires:  python2-Cython
4c03922
BuildRequires:  python2-numpy
4c03922
BuildRequires:  python2-pytest
4c03922
BuildRequires:  python2-boto3
4c03922
BuildRequires:  python2-hypothesis
4c03922
BuildRequires:  python2-packaging
4c03922
BuildRequires:  python2-enum34
4c03922
BuildRequires:  python2-affine
4c03922
BuildRequires:  python2-attrs
4c03922
BuildRequires:  python2-click-plugins
4c03922
BuildRequires:  python2-cligj
4c03922
BuildRequires:  python2-numpy
4c03922
BuildRequires:  python2-snuggs >= 1.4.1
4c03922
4c03922
Requires:       python2-enum34
4c03922
Requires:       python2-affine
4c03922
Requires:       python2-attrs
4c03922
Requires:       python2-click-plugins
4c03922
Requires:       python2-cligj
4c03922
Requires:       python2-numpy
4c03922
Requires:       python2-snuggs >= 1.4.1
4c03922
4c03922
%description -n python2-%{srcname} %{_description}
4c03922
4c03922
4c03922
%package -n     python3-%{srcname}
4c03922
Summary:        %{summary}
4c03922
%{?python_provide:%python_provide python3-%{srcname}}
4c03922
4c03922
BuildRequires:  python3-devel
4c03922
BuildRequires:  python3-setuptools
4c03922
BuildRequires:  python3-Cython
4c03922
BuildRequires:  python3-numpy
4c03922
BuildRequires:  python3-pytest
4c03922
BuildRequires:  python3-hypothesis
4c03922
BuildRequires:  python3-boto3
4c03922
BuildRequires:  python3-packaging
4c03922
BuildRequires:  python3-attrs
4c03922
BuildRequires:  python3-affine
4c03922
BuildRequires:  python3-click-plugins
4c03922
BuildRequires:  python3-cligj
4c03922
BuildRequires:  python3-numpy
4c03922
BuildRequires:  python3-snuggs >= 1.4.1
4c03922
4c03922
Requires:       python3-affine
4c03922
Requires:       python3-attrs
4c03922
Requires:       python3-click-plugins
4c03922
Requires:       python3-cligj
4c03922
Requires:       python3-numpy
4c03922
Requires:       python3-snuggs >= 1.4.1
4c03922
4c03922
%description -n python3-%{srcname} %{_description}
4c03922
4c03922
4c03922
%prep
4c03922
%autosetup -n %{srcname}-%{version}
4c03922
4c03922
4c03922
%build
4c03922
%py2_build
4c03922
%py3_build
4c03922
4c03922
4c03922
%install
4c03922
%py2_install
4c03922
%py3_install
4c03922
4c03922
4c03922
%check
4c03922
rm -r %{srcname}  # Don't try unbuilt copy.
4c03922
4c03922
PYTHONPATH="%{buildroot}%{python3_sitearch}" \
4c03922
    pytest-3 -v -m 'not network' -k 'not test_non_initial_bytearray'
4c03922
PYTHONPATH="%{buildroot}%{python2_sitearch}" \
4c03922
    pytest-2 -v -m 'not network' -k 'not test_non_initial_bytearray'
4c03922
4c03922
4c03922
%files -n python2-%{srcname}
4c03922
%doc README.rst AUTHORS.txt CHANGES.txt CITATION.txt
4c03922
%license LICENSE.txt
4c03922
%{python2_sitearch}/%{srcname}
4c03922
%{python2_sitearch}/%{srcname}-%{version}-py?.?.egg-info
4c03922
4c03922
%files -n python3-%{srcname}
4c03922
%doc README.rst AUTHORS.txt CHANGES.txt CITATION.txt
4c03922
%license LICENSE.txt
4c03922
%{_bindir}/rio
4c03922
%{python3_sitearch}/%{srcname}
4c03922
%{python3_sitearch}/%{srcname}-%{version}-py?.?.egg-info
4c03922
4c03922
4c03922
%changelog
4c03922
* Sat Jan 06 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.0a12-1
4c03922
- Initial package.