diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..251be15 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pyshtools-4.3.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 8aead53..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-pyshtools - -The python-pyshtools package \ No newline at end of file diff --git a/python-pyshtools.spec b/python-pyshtools.spec new file mode 100644 index 0000000..e0edeb3 --- /dev/null +++ b/python-pyshtools.spec @@ -0,0 +1,85 @@ +%global srcname pyshtools + +Name: python-%{srcname} +Version: 4.3 +Release: 1%{?dist} +Summary: Tools for working with spherical harmonics + +License: BSD +URL: https://shtools.github.io/SHTOOLS/ +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: gcc-gfortran +BuildRequires: fftw3-devel +BuildRequires: openblas-devel + +%description +pysthools is a Python library that can be used to perform spherical +harmonic transforms and reconstructions, multitaper spectral analyses on +the sphere, expansions of functions into Slepian bases, and standard +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.0 + +Requires: python3dist(astropy) +Requires: python3dist(matplotlib) +Requires: python3dist(numpy) +Requires: python3dist(scipy) >= 0.14.0 + +%description -n python3-%{srcname} +pysthools is a Python library that can be used to perform spherical +harmonic transforms and reconstructions, multitaper spectral analyses on +the sphere, expansions of functions into Slepian bases, and standard +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 + +# Remove generated files +rm src/_SHTOOLS-f2pywrappers.f src/_SHTOOLSmodule.c + +# Remove extra args; we set these ourselves. +# Don't make f2py silent. +sed -i -e '/extra_compile_args/d' -e '/f2py_options/d' setup.py + + +%build +# Workaround https://github.com/numpy/numpy/issues/2411 +# See also https://github.com/numpy/numpy/pull/11525 +export LDFLAGS="${LDFLAGS} -shared" + +%py3_build + + +%install +%py3_install + + +%files -n python3-%{srcname} +%license LICENSE +%doc README.md +%{python3_sitearch}/%{srcname} +%{python3_sitearch}/%{srcname}-%{version}-py?.?.egg-info + + +%changelog +* Sat Aug 18 2018 Elliott Sales de Andrade - 4.3-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..42842c5 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pyshtools-4.3.tar.gz) = 66bc4d650d93a03c80857aae67fbea058f0921e603f65258597c76b894287ca9d78b6dbf72e1abaf117247b6639e4c9bc36a54541208981f1ea4d356e2e93e28