From f598a28352e9106288a9e62b8b3c7d647a7edcd6 Mon Sep 17 00:00:00 2001 From: Sergio Pascual Date: May 10 2011 20:33:35 +0000 Subject: Importing ATpy --- diff --git a/.gitignore b/.gitignore index e69de29..cdbed7c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ATpy-0.9.5.tar.gz diff --git a/ATpy.spec b/ATpy.spec new file mode 100644 index 0000000..d2a0cdf --- /dev/null +++ b/ATpy.spec @@ -0,0 +1,104 @@ +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%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.5 +Release: 1%{?dist} +Summary: Astronomical Tables in Python +License: MIT + +Group: Development/Libraries +URL: http://atpy.github.com/ +Source0: https://github.com/downloads/atpy/atpy/%{name}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python-devel +BuildRequires: python-setuptools +Requires: numpy + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-numpy +%endif # with_python3 + +%description +ATpy is a high-level Python package providing a way to manipulate tables of +astronomical data in a uniform way. It provides built-in support for NumPy +recarrays and common astronomical file/database formats (FITS, VO, HDF5, +and ASCII tables) with a very simple API. + +%if 0%{?with_python3} +%package -n python3-ATpy +Summary: Astronomical Tables in Python + +%description -n python3-ATpy +ATpy is a high-level Python package providing a way to manipulate tables of +astronomical data in a uniform way. It provides built-in support for NumPy +recarrays and common astronomical file/database formats (FITS, VO, HDF5, +and ASCII tables) with a very simple API. + +%endif # with_python3 + +%prep +%setup -q +chmod -x LICENSE + +%if 0%{?with_python3} +rm -rf %{py3dir} +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}|' + +%build +%{__python} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 + +%install +rm -rf %{buildroot} + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +popd +%endif # with_python3 + +%{__python} setup.py install --skip-build --root %{buildroot} + +%files +%defattr(-,root,root,-) +%doc CHANGES LICENSE README +%{python_sitelib}/ATpy-*.egg-info +%{python_sitelib}/atpy/ + +%if 0%{?with_python3} +%files -n python3-ATpy +%defattr(-,root,root,-) +%doc CHANGES LICENSE README +%{python3_sitelib}/ATpy-*.egg-info +%{python3_sitelib}/atpy/ +%endif # with_python3 + +%changelog +* Mon May 02 2011 Sergio Pascual - 0.9.5-1 +- New upstream release + +* Tue Apr 26 2011 Sergio Pascual - 0.9.4-3 +- Added support for python3 + +* Tue Apr 26 2011 Sergio Pascual - 0.9.4-2 +- Updated upstream web site +- More details in files section + +* Tue Nov 30 2010 Sergio Pascual - 0.9.4-1 +- Initial spec file diff --git a/sources b/sources index e69de29..8c28825 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9e030de0f6ed9f59aed3f03010af4012 ATpy-0.9.5.tar.gz