# Python2 macros for EPEL %if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %global pypi_name gertty Name: python-gertty Version: 1.0.3 Release: 2%{?dist} Summary: Gertty is a console-based interface to the Gerrit Code Review system License: ASL 2.0 URL: https://pypi.python.org/pypi/gertty Source0: https://pypi.python.org/packages/source/g/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-requests BuildRequires: python-pbr Requires: python-pbr Requires: python-urwid Requires: python-sqlalchemy Requires: GitPython Requires: python-dateutil Requires: python-requests Requires: python-ordereddict Requires: python-alembic Requires: PyYAML Requires: python-voluptuous Requires: python-ply %description Gertty is a console-based interface to the Gerrit Code Review system. As compared to the web interface, the main advantages are: (a) Workflow -- the interface is designed to support a workflow similar to reading network news or mail. In particular, it is designed to deal with a large number of review requests across a large number of projects. (b) Offline Use -- Gertty syncs information about changes in subscribed projects to a local database and local git repos. All review operations are performed against that database and then synced back to Gerrit. (c) Speed -- user actions modify locally cached content and need not wait for server interaction. (d) Convenience -- because Gertty downloads all changes to local git repos, a single command instructs it to checkout a change into that repo for detailed examination or testing of larger changes. %prep %setup -q -n %{pypi_name}-%{version} # Remove egg-info rm -rf gertty.egg-info # We handle requirements ourselves, remove requirements.txt rm -rf requirements.txt # Fix the wrong-file-end-of-line-encoding warning from rpmlint sed -i 's/\r$//' LICENSE %build %{__python2} setup.py build %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} %files %doc README.rst LICENSE CONTRIBUTING.rst %doc %{_datadir}/%{pypi_name}/examples/* %{_bindir}/* %{python2_sitelib}/gertty-%{version}* %{python2_sitelib}/%{pypi_name} %changelog * Wed Nov 19 2014 Kashyap Chamarthy - 1.0.3-2 - Fix rpmlint warnings (wrong-file-end-of-line-encoding) - Fix and simplify RPM macros * Mon Nov 17 2014 Kashyap Chamarthy - 1.0.3-1 - Initial package