Blob Blame History Raw
%if 0%{?fedora}
%global with_python3 1
%endif

%global modname gearbox

Name:               python-gearbox
Version:            0.1.1
Release:            2%{?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
%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}

# 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
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.1-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Mon Mar 07 2016 Ralph Bean <rbean@redhat.com> - 0.1.1-1
- new version

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Dec 11 2015 Ralph Bean <rbean@redhat.com> - 0.0.11-1
- new version

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Tue Oct 13 2015 Ralph Bean <rbean@redhat.com> - 0.0.9-1
- new version

* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 0.0.8-1
- new version

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Jul 21 2014 Ralph Bean <rbean@redhat.com> - 0.0.6-1
- Latest upstream.

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 0.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Wed Feb 12 2014 Ralph Bean <rbean@redhat.com> - 0.0.5-1
- Latest upstream.

* Wed Jan 22 2014 Ralph Bean <rbean@redhat.com> - 0.0.4-1
- Latest upstream.
- Reenabled python3 subpackage.

* 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