%global upname asciitable %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: python-%{upname} Version: 0.8.0 Release: 5%{dist} Summary: Extensible ASCII table reader and writer License: BSD Group: Development/Libraries URL: http://cxc.harvard.edu/contrib/asciitable/ Source0: http://pypi.python.org/packages/source/a/%{upname}/%{upname}-%{version}.tar.gz BuildRequires: python2-devel python-nose BuildArch: noarch Requires: numpy %description An extensible ASCII table reader. Asciitable can read a wide range of ASCII table formats via built-in Extension Reader Classes: * Basic: basic table with customizable delimiters and header configurations * Cds: CDS format table (also Vizier and ApJ machine readable tables) * CommentedHeader: column names given in a line that begins with the comment character * Daophot: table from the IRAF DAOphot package * Ipac: IPAC format table * Latex: LaTeX tables (plain and AASTex) * NoHeader: basic table with no header where columns are auto-named * Rdb: tab-separated values with an extra line after the column definition line * Tab: tab-separated values %if 0%{?with_python3} %package -n python3-asciitable Summary: Extensible ASCII table reader and writer BuildRequires: python3-devel python3-nose Requires: python3-numpy %description -n python3-asciitable An extensible ASCII table reader. Asciitable can read a wide range of ASCII table formats via built-in Extension Reader Classes: * Basic: basic table with customizable delimiters and header configurations * Cds: CDS format table (also Vizier and ApJ machine readable tables) * CommentedHeader: column names given in a line that begins with the comment character * Daophot: table from the IRAF DAOphot package * Ipac: IPAC format table * Latex: LaTeX tables (plain and AASTex) * NoHeader: basic table with no header where columns are auto-named * Rdb: tab-separated values with an extra line after the column definition line * Tab: tab-separated values %endif # with_python3 %prep %setup -n %{upname}-%{version} -q %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 %check nosetests-%{python2_version} %if 0%{?with_python3} pushd %{py3dir} nosetests-%{python3_version} 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 %doc CHANGES doc/index.rst %{python_sitelib}/* %if 0%{?with_python3} %files -n python3-asciitable %doc CHANGES doc/index.rst %{python3_sitelib}/* %endif # with_python3 %changelog * Fri Jan 04 2013 Sergio Pascual <sergiopr@fedoraproject.org> - 0.8.0-5 - Runing nosetests for python3 version also - python3 requires are inside python3 packages (bz #891376) * Fri Aug 03 2012 David Malcolm <dmalcolm@redhat.com> - 0.8.0-4 - rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Oct 06 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.8.0-1 - New upstream version, reading and writing fixed-width tables * Fri Sep 30 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.7.1-1 - New upstream version, with bugfixes * Wed Jul 6 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.7.0.2-1.1 - Updating sources * Wed Jul 6 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.7.0.2-1 - New upstream version with Latex, AASTex support * Mon Jun 6 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.6.0-2.1 - Adding buildroot - Removing nosetests * Mon Jun 6 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.6.0-2 - Adding index.rst before importing * Mon May 30 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.6.0-1 - New upstream source - Changed define macro by global macro * Tue Apr 05 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.5.1-1 - New upstream source - Building python3 package * Tue Jan 04 2011 Sergio Pascual <sergiopr@fedoraproject.org> - 0.5.0-1 - New upstream source * Wed Nov 17 2010 Sergio Pascual <sergiopr@fedoraproject.org> - 0.3.2-1 - New upstream source * Fri Jul 09 2010 Sergio Pascual <sergiopr@fedoraproject.org> - 0.2.5-1 - Initial spec file