%if 0%{?fedora} %global with_python3 1 %endif %{!?_licensedir: %global license %%doc} %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 modname asciitree Name: python-asciitree Version: 0.3.3 Release: 1%{?dist} Summary: Draws ASCII trees License: MIT URL: http://pypi.python.org/pypi/asciitree Source0: https://pypi.python.org/packages/2d/6a/885bc91484e1aa8f618f6f0228d76d0e67000b0fdd6090673b777e311913/%{modname}-%{version}.tar.gz BuildArch: noarch %description Sometimes you just want to draw ascii trees in your terminal. Read the documentation at http://pythonhosted.org/asciitree %package -n python2-%{modname} Summary: Draws ASCII trees %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools %description -n python2-%{modname} Sometimes you just want to draw ascii trees in your terminal. Read the documentation at http://pythonhosted.org/asciitree %if 0%{?with_python3} %package -n python3-%{modname} Summary: Draws ASCII trees %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-setuptools %description -n python3-%{modname} Sometimes you just want to draw ascii trees in your terminal. Read the documentation at http://pythonhosted.org/asciitree %endif %prep %autosetup -n %{modname}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif # Tests are not packaged. # https://github.com/mbr/asciitree/pull/9 #%%check #%%{__python2} setup.py test #%%if 0%{?with_python3} #%%{__python3} setup.py test #%%endif %files -n python2-%{modname} %doc README.rst %license LICENSE %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-%{version}* %if 0%{?with_python3} %files -n python3-%{modname} %doc README.rst %license LICENSE %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}* %endif %changelog * Tue Sep 13 2016 Ralph Bean - 0.3.3-1 - Initial package for Fedora