%if 0%{?rhel} %bcond_with python3 %else %bcond_without python3 %endif Name: rtv Version: 1.14.1 Release: 1%{?dist} Summary: A simple terminal viewer for Reddit (Reddit Terminal Viewer) License: MIT URL: https://github.com/michael-lazar/rtv Source0: https://files.pythonhosted.org/packages/source/r/%{name}/%{name}-%{version}.tar.gz # Patch to remove the mailcap_fix dependency that should fix the mailcap python core lib, but # Fedora already has the patch in the main mailcap library Patch0: rtv-1.14.1-mailcap_fix.patch BuildArch: noarch %if %{with python3} BuildRequires: python3-setuptools BuildRequires: python3-devel Requires: python3-tornado Requires: python3-praw >= 3.5.0 Requires: python3-six Requires: python3-requests Requires: python3-kitchen Requires: python3-beautifulsoup4 Requires: python3-setuptools %else BuildRequires: python-setuptools BuildRequires: python2-devel Requires: python-tornado Requires: python-praw >= 3.5.0 Requires: python-six Requires: python-requests Requires: python-kitchen Requires: python-beautifulsoup4 Requires: python-setuptools %endif # python3 %if %{with python3} %{?python_provide:%python_provide python3-%{name}} %else %{?python_provide:%python_provide python2-%{name}} %endif # python3 %description RTV provides an interface to view and interact with reddit from your terminal. It's compatible with most terminal emulators on Linux and OS X. RTV is built in python using the curses library. %prep %setup -n %{name}-%{version} %patch0 -p1 rm -rf %{name}.egg-info %build %if %{with python3} %py3_build %else %py2_build %endif # python3 %install %if %{with python3} %py3_install %else %py2_install %endif # python3 %files %doc README.rst %license LICENSE %{_bindir}/rtv %{_mandir}/man1/rtv.1.gz %if %{with python3} %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info %else %{python2_sitelib}/%{name} %{python2_sitelib}/%{name}-%{version}-py?.?.egg-info %endif # python3 %changelog * Mon Jan 23 2017 Fabio Alessandro Locati - 1.14.1-1 - Update to 1.14.1 - Rebase patch * Mon Dec 19 2016 Miro HronĨok - 1.13.0-2 - Rebuild for Python 3.6 * Thu Oct 27 2016 Fabio Alessandro Locati - 1.13.0-1 - Upgrade to 1.13.0 * Sun Oct 09 2016 Fabio Alessandro Locati - 1.12.1-1 - Upgrade to 1.12.1 * Sun Aug 28 2016 Fabio Alessandro Locati - 1.12.0-1 - Upgrade to 1.12.0 * Fri Aug 26 2016 Fabio Alessandro Locati - 1.11.0-1 - Initial package