Blob Blame History Raw
%if 0%{?fedora}
# Temporarily disable python3 package while python3-cliff is
# out of commission in rawhide.  This can be reenabled once that
# is back, no problem.
%global with_python3 0
%endif

%global modname gearbox
%global prerelease a

Name:               python-gearbox
Version:            0.0.1
Release:            0.3.%{prerelease}%{?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}%{prerelease}.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
%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

Requires:           python3-prettytable
Requires:           python3-cliff
Requires:           python3-tempita
Requires:           python3-paste-deploy

%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}%{prerelease}

# 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}%{prerelease}-*

%if 0%{?with_python3}
%files -n python3-gearbox
%doc README.rst
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}%{prerelease}-*
%endif

%changelog
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.1-0.3.a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Apr 12 2013 Ralph Bean <rbean@redhat.com> - 0.0.1-0.2.a
- Disabled python3 subpackage for rawhide due to broken python3-cliff.
- Moved python3 Requires inside the python3-gearbox subpackage.

* Wed Apr 03 2013 Luke Macken <lmacken@redhat.com> 0.0.1-0.1.a
- Initial package for Fedora