%if 0%{?rhel} && 0%{?rhel} < 7 %bcond_with python3 %else %bcond_without python3 %endif %global srcname gist Name: python-gist Version: 0.6.1 Release: 1%{?dist} Summary: A simple tool for pasting info Group: Applications/Internet License: MIT URL: https://github.com/jdowner/gist Source0: https://github.com/jdowner/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch %package -n python2-gist Summary: A simple tool for pasting info BuildRequires: python2-devel BuildRequires: python2-setuptools Requires: python2-gnupg >= 0.4.1 Requires: python2-requests Requires: python2-simplejson Requires: python2-docopt %{?python_provide:%python_provide python2-gnupg} %{?el6:Provides: python-gnupg} %description CLI interface for managing GitHub Gists. Use it: * List of Gists * Show a Gist * Download a Gist * Create a Gist * Update a Gist * Fork a Gist * Star a Gist * Unstar a Gist %description -n python2-gist CLI interface for managing GitHub Gists. Use it: * List of Gists * Show a Gist * Download a Gist * Create a Gist * Update a Gist * Fork a Gist * Star a Gist * Unstar a Gist Python 2 version %if %{with python3} %package -n python3-gist Summary: A simple tool for pasting info %if 0%{?fedora} Requires: python3-gnupg >= 0.4.1 Requires: python3-requests Requires: python3-simplejson Requires: python3-docopt BuildRequires: python3-devel BuildRequires: python3-setuptools %{?python_provide:%python_provide python3-gnupg} %else Requires: python34-gnupg >= 0.4.1 Requires: python34-requests Requires: python34-simplejson Requires: python34-docopt BuildRequires: python34-devel BuildRequires: python34-setuptools %endif %description -n python3-gist CLI interface for managing GitHub Gists. Use it: * List of Gists * Show a Gist * Download a Gist * Create a Gist * Update a Gist * Fork a Gist * Star a Gist * Unstar a Gist Python 3 version %endif # with python3 %prep %setup -qn %{srcname}-%{version} %build %py2_build %if %{with python3} %py3_build %endif # with python3 %install %py2_install %if %{with python3} %py3_install %endif # with python3 %check # no presente in source %files -n python2-gist %doc README.rst %license LICENSE %{python2_sitelib}/%{srcname} %{python2_sitelib}/python_%{srcname}-*.egg-info %if %{with python3} %exclude %{_bindir}/%{srcname} %else %{_bindir}/%{srcname} %endif %exclude %{_datadir}/%{srcname}/README.rst %exclude %{_datadir}/%{srcname}/LICENSE %{_datadir}/%{srcname}/%{srcname}* %if %{with python3} %files -n python3-gist %doc README.rst %license LICENSE %{python3_sitelib}/%{srcname} %{python3_sitelib}/python_%{srcname}-*.egg-info %{_bindir}/%{srcname} %exclude %{_datadir}/%{srcname}/README.rst %exclude %{_datadir}/%{srcname}/LICENSE %{_datadir}/%{srcname}/%{srcname}* %endif # with python3 %changelog * Thu Jun 28 2018 Jiri Kastner - 0.6.1-1 - Initial package