%if 0%{?fedora} > 12 %global with_python3 1 %endif %global modname gearbox Name: python-gearbox Version: 0.0.1a Release: 1%{?dist} Summary: Command line toolkit born as a PasteScript replacement for TurboGears2 Group: Development/Libraries License: MIT URL: http://pypi.python.org/pypi/gearbox Source0: http://pypi.python.org/packages/source/g/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-prettytable Requires: python-cliff Requires: python-tempita Requires: python-paste-deploy %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-prettytable Requires: python3-cliff Requires: python3-tempita Requires: python3-paste-deploy %endif %description gearbox is a paster command replacement for TurboGears2. It has been created during the process of providing Python3 support to the TurboGears2 web framework, while still being backward compatible with the existing TurboGears projects. %if 0%{?with_python3} %package -n python3-gearbox Summary: Command line toolkit born as a PasteScript replacement for TurboGears2 Group: Development/Libraries %description -n python3-gearbox gearbox is a paster command replacement for TurboGears2. It has been created during the process of providing Python3 support to the TurboGears2 web framework, while still being backward compatible with the existing TurboGears projects. %endif %prep %setup -q -n %{modname}-%{version} # Remove bundled egg-info in case it exists rm -rf %{modname}.egg-info %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python} 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 %{__python} setup.py install -O1 --skip-build --root=%{buildroot} %files %doc README.rst %{_bindir}/gearbox %{python_sitelib}/%{modname}/ %{python_sitelib}/%{modname}-%{version}* %if 0%{?with_python3} %files -n python3-gearbox %doc README.rst %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}-* %endif %changelog * Wed Apr 03 2013 Luke Macken 0.0.1a-1 - Initial package for Fedora