From 1e4162d5c2f8971037ee9df0ee1e877c74ec381c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Oct 03 2014 07:21:20 +0000 Subject: * Fri Oct 03 2014 Fabian Affolter - 0.3.5-2 - Add py3 package - Enable check --- diff --git a/pycolumnize.spec b/pycolumnize.spec index 4212380..eaa4069 100644 --- a/pycolumnize.spec +++ b/pycolumnize.spec @@ -2,8 +2,8 @@ Name: pycolumnize Version: 0.3.5 -Release: 1%{?dist} -Summary: Python module to align in columns a simple list +Release: 2%{?dist} +Summary: A Python module to align in columns a simple list License: MIT URL: http://code.google.com/p/pycolumnize/ @@ -14,26 +14,75 @@ 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 -%{__python2} setup.py install --skip-build --root %{buildroot} +%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 +make check +%if 0%{?with_python3} +pushd %{py3dir} +make check +popd +%endif %files %doc NEWS README.txt -%{python2_sitelib}/*egg-info -%{python2_sitelib}/%{srcname}.* +%{python2_sitelib}/* + +%if 0%{?with_python3} +%files -n python3-%{srcname} +%doc NEWS README.txt +%{python3_sitelib}/* +%{python3_sitelib}/__pycache__/%{srcname}* +%endif %changelog +* Fri Oct 03 2014 Fabian Affolter - 0.3.5-2 +- Add py3 package +- Enable check + * Sun Aug 03 2014 Fabian Affolter - 0.3.5-1 - Update spec file - Update to lastest upsteam release 0.3.5