929b9fb
%global srcname reproject
929b9fb
%global sum Reproject astronomical images
929b9fb
929b9fb
Name:           python-%{srcname}
Sergio Pascual aae2a48
Version:        0.13.0
Sergio Pascual 851a358
Release:        %autorelease
929b9fb
Summary:        %{sum}
929b9fb
Sergio Pascual aae2a48
License:        BSD-3-Clause
2ecb38e
URL:            https://reproject.readthedocs.io/
41c9f01
Source0:        %{pypi_source}
929b9fb
ff79db5
BuildRequires:  gcc
ff79db5
929b9fb
BuildRequires:  python3-devel
929b9fb
Sergio Pascual 5fff83a
ExcludeArch: %{ix86}
Sergio Pascual 5fff83a
929b9fb
%description
929b9fb
%{sum}.
929b9fb
929b9fb
%package -n python3-%{srcname}
929b9fb
Summary:        %{sum}
929b9fb
929b9fb
%description -n python3-%{srcname}
929b9fb
%{sum}.
929b9fb
929b9fb
%prep
63e1aa2
%autosetup -p1 -n %{srcname}-%{version}
Sergio Pascual aae2a48
sed -i -e 's/oldest-supported-numpy/numpy/' -e 's/cython==3.0.4/cython>=3/' pyproject.toml
Sergio Pascual aae2a48
Sergio Pascual aae2a48
%generate_buildrequires
Sergio Pascual aae2a48
%pyproject_buildrequires -x test
929b9fb
929b9fb
%build
63e1aa2
%pyproject_wheel
929b9fb
929b9fb
%install
63e1aa2
%pyproject_install
929b9fb
Sergio Pascual aae2a48
%pyproject_save_files reproject
Sergio Pascual aae2a48
4ed4ecb
%check
Sergio Pascual 851a358
# these fail in arm
Sergio Pascual 851a358
# reproject/healpix/tests/test_healpix.py::test_reproject_healpix_to_image_footprint[**]
Sergio Pascual 851a358
%ifarch aarch64
Sergio Pascual 851a358
%pyproject_check_import
Sergio Pascual 851a358
%else
4ed4ecb
pushd %{buildroot}/%{python3_sitearch}
Sergio Pascual aae2a48
  %pytest reproject
Sergio Pascual aae2a48
  rm -rf .pytest_cache
4ed4ecb
popd
Sergio Pascual 851a358
%endif
929b9fb
Sergio Pascual aae2a48
%files -n python3-%{srcname} -f %{pyproject_files}
41c9f01
%license LICENSE
4ed4ecb
%doc CHANGES.md README.rst
929b9fb
929b9fb
%changelog
Sergio Pascual 851a358
%autochangelog