diff --git a/ATpy.spec b/ATpy.spec index a397304..45b7d08 100644 --- a/ATpy.spec +++ b/ATpy.spec @@ -1,12 +1,6 @@ -%if 0%{?fedora} > 12 -%global with_python3 1 -%else -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} -%endif - Name: ATpy Version: 0.9.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Astronomical Tables in Python License: MIT @@ -17,7 +11,7 @@ Source0: https://pypi.python.org/packages/source/A/ATpy/%{name}-%{version}.tar.g BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools -Requires: numpy +Requires: numpy python-astropy %if 0%{?with_python3} BuildRequires: python3-devel @@ -33,7 +27,7 @@ and ASCII tables) with a very simple API. %if 0%{?with_python3} %package -n python3-ATpy Summary: Astronomical Tables in Python -Requires: python3-numpy +Requires: python3-numpy python3-astropy %description -n python3-ATpy ATpy is a high-level Python package providing a way to manipulate tables of @@ -52,10 +46,10 @@ cp -a . %{py3dir} find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' %endif # with_python3 -find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|' +find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|' %build -%{__python} setup.py build +%{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} @@ -71,18 +65,18 @@ pushd %{py3dir} popd %endif # with_python3 -%{__python} setup.py install --skip-build --root %{buildroot} - +%{__python2} setup.py install --skip-build --root %{buildroot} + %files %doc CHANGES LICENSE README.md -%{python_sitelib}/ATpy-*.egg-info -%{python_sitelib}/atpy/ +%{python2_sitelib}/ATpy-*.egg-info +%{python2_sitelib}/atpy %if 0%{?with_python3} %files -n python3-ATpy %doc CHANGES LICENSE README.md %{python3_sitelib}/ATpy-*.egg-info -%{python3_sitelib}/atpy/ +%{python3_sitelib}/atpy %endif # with_python3 %changelog