%global srcname columnize
Name: pycolumnize
Version: 0.3.8
Release: 2%{?dist}
Summary: A Python module to align in columns a simple list
License: MIT
URL: https://github.com/rocky/pycolumnize
Source0: https://pypi.python.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-nose
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-nose
%endif
%description
A Python module to format a simple (i.e. not nested) list into aligned columns.
A string with embedded newline characters is returned.
%if 0%{?with_python3}
%package -n python3-%{srcname}
Summary: A Python module to align in columns a simple list
%description -n python3-%{srcname}
A Python module to format a simple (i.e. not nested) list into aligned columns.
A string with embedded newline characters is returned.
%endif
%prep
%setup -q -n %{srcname}-%{version}
rm -rf %{srcname}.egg-info
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif
%build
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
popd
%endif
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
#%check
#%{__python2} setup.py nosetests
#%if 0%{?with_python3}
#pushd %{py3dir}
#%{__python3} setup.py nosetests
#popd
#%endif
%files
%doc NEWS README.txt
%{python2_sitelib}/*
%if 0%{?with_python3}
%files -n python3-%{srcname}
%doc NEWS README.txt
%{python3_sitelib}/*
%{python3_sitelib}/__pycache__/%{srcname}*
%endif
%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jan 18 2015 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.8-1
- Update to lastest upsteam release 0.3.8
* Sun Jan 18 2015 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.7-1
- Update to lastest upsteam release 0.3.7
* Fri Oct 03 2014 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.5-2
- Add py3 package
- Enable check
* Sun Aug 03 2014 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.5-1
- Update spec file
- Update to lastest upsteam release 0.3.5
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 0.3.3-7
- Replace python-setuptools-devel BR with python-setuptools
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Jul 14 2011 Kushal Das <kushal@fedoraproject.org> - 0.3.3-1
- New release of the source
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Jun 23 2009 Kushal Das <kushal@fedoraproject.org> 0.3.2-2
- Removing comments
* Tue Jun 23 2009 Kushal Das <kushal@fedoraproject.org> 0.3.2-1
- Initial release