From b93289d52347452decd2c37e2eb23dbbda607d86 Mon Sep 17 00:00:00 2001 From: Christian Dersch Date: Nov 30 2020 16:16:32 +0000 Subject: Initial import (#1898135) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b61452c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pyerfa-1.7.1.1.tar.gz diff --git a/python-pyerfa.spec b/python-pyerfa.spec new file mode 100644 index 0000000..449c6a6 --- /dev/null +++ b/python-pyerfa.spec @@ -0,0 +1,72 @@ +%global module_name erfa +%global pypi_name pyerfa + +Name: python-pyerfa +Version: 1.7.1.1 +Release: 1%{?dist} +Summary: Python wrapper for the ERFA library +License: BSD +URL: https://github.com/liberfa/pyerfa +Source0: %{pypi_source} + +# Python BuildRequires +BuildRequires: python3-devel +BuildRequires: %{py3_dist jinja2} +BuildRequires: %{py3_dist pytest_astropy} +BuildRequires: %{py3_dist setuptools} +BuildRequires: %{py3_dist setuptools_scm} +# Non-Python BuildRequires +BuildRequires: erfa-devel +BuildRequires: gcc + + +%description +PyERFA is the Python wrapper for the ERFA library (Essential Routines for +Fundamental Astronomy), a C library containing key algorithms for astronomy, +which is based on the SOFA library published by the International Astronomical +Union (IAU). All C routines are wrapped as Numpy universal functions, so that +they can be called with scalar or array inputs. + + +%package -n python3-%{pypi_name} +Summary: %{summary} + +%description -n python3-%{pypi_name} +PyERFA is the Python wrapper for the ERFA library (Essential Routines for +Fundamental Astronomy), a C library containing key algorithms for astronomy, +which is based on the SOFA library published by the International Astronomical +Union (IAU). All C routines are wrapped as Numpy universal functions, so that +they can be called with scalar or array inputs. + + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} + + +%build +# Build using system liberfa, not bundled one +PYERFA_USE_SYSTEM_LIBERFA=1 %py3_build + + +%install +%py3_install + + +%check +pushd %{buildroot}%{python3_sitearch}/%{module_name} +%{__python3} -m pytest +rm -rf .pytest_cache +rm tests/__pycache__/test_erfa*pytest*.pyc +popd + + +%files -n python%{python3_pkgversion}-%{pypi_name} +%license LICENSE.rst +%doc AUTHORS.rst CHANGES.rst README.rst +%{python3_sitearch}/%{module_name} +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ + + +%changelog +* Fri Nov 20 11:37:40 CET 2020 Christian Dersch - 1.7.1.1-1 +- initial package diff --git a/sources b/sources new file mode 100644 index 0000000..1b203dd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pyerfa-1.7.1.1.tar.gz) = 59c2dceed6ef5b1ece618742dd0084b729cce8eb52f903dff2aad009fa0f495defb4511688da0a5203ed5900d041a552fbe50668ddac0c3a6bb3fd6d34d089bb