diff --git a/python-pyshtools.spec b/python-pyshtools.spec index b5596c4..4486a5b 100644 --- a/python-pyshtools.spec +++ b/python-pyshtools.spec @@ -15,11 +15,12 @@ License: BSD URL: https://shtools.github.io/SHTOOLS/ Source0: %pypi_source -BuildRequires: make BuildRequires: gcc BuildRequires: gcc-gfortran BuildRequires: fftw3-devel BuildRequires: %{blaslib}-devel +BuildRequires: make +BuildRequires: python3-devel %description pysthools is a Python library that can be used to perform spherical @@ -30,18 +31,6 @@ operations on global gravitational and magnetic field data. %package -n python3-%{srcname} Summary: %{summary} -%{?python_provide:%python_provide python3-%{srcname}} - -BuildRequires: python3-devel -BuildRequires: python3dist(setuptools) -BuildRequires: python3dist(astropy) -BuildRequires: python3dist(matplotlib) -BuildRequires: python3dist(numpy) -BuildRequires: python3dist(scipy) >= 0.14 -BuildRequires: python3dist(requests) -BuildRequires: python3dist(xarray) - -%{?python_enable_dependency_generator} %description -n python3-%{srcname} pysthools is a Python library that can be used to perform spherical @@ -53,23 +42,21 @@ operations on global gravitational and magnetic field data. %prep %autosetup -n %{srcname}-%{version} -# Remove bundled egg-info -rm -rf %{srcname}.egg-info - # Remove extra files rm -r examples/notebooks/.ipynb_checkpoints # Don't make f2py silent. sed -i -e '/f2py_options/d' setup.py +%generate_buildrequires +%pyproject_buildrequires -r %build -%py3_build - +%pyproject_wheel %install -%py3_install - +%pyproject_install +%pyproject_save_files %{srcname} %check #{python3} examples/notebooks/test_notebooks.py @@ -77,13 +64,8 @@ export MPLBACKEND=Agg export PYTHONPATH=%{buildroot}%{python3_sitearch} make -C examples/python -f Makefile no-timing PYTHON=%{python3} - -%files -n python3-%{srcname} -%license LICENSE.txt +%files -n python3-%{srcname} -f %{pyproject_files} %doc README.md -%{python3_sitearch}/%{srcname} -%{python3_sitearch}/%{srcname}-%{version}-py*.egg-info - %changelog %autochangelog