%global with_python3 1 %global srcname Markups Name: python-markups Version: 0.5.0 Release: 4%{?dist} Summary: A wrapper around various text markups License: BSD URL: https://pypi.python.org/pypi/Markups Source0: https://pypi.python.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-markdown BuildRequires: python-docutils BuildRequires: python-textile Requires: python-markdown Requires: python-docutils Requires: python-textile %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-markdown BuildRequires: python3-docutils BuildRequires: python3-textile %endif %description This module provides a wrapper around the various text markup languages, such as Markdown and reStructuredText (these two are supported by default). %if 0%{?with_python3} %package -n python3-markups Summary: A wrapper around various text markups Requires: python3-markdown Requires: python3-docutils Requires: python3-textile %description -n python3-markups This module provides a wrapper around the various text markup languages, such as Markdown and reStructuredText (these two are supported by default). %endif %prep %setup -q -n %{srcname}-%{version} rm -rf %{srcname}-%{version}/Markups.egg-info %build %{__python2} setup.py build %if 0%{?with_python3} %{__python3} setup.py build %endif %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} %if 0%{?with_python3} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} %endif %check %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif %files %{python2_sitelib}/markups/ %{python2_sitelib}/%{srcname}-%{version}-py*.egg-info/ %doc LICENSE changelog README %if 0%{?with_python3} %files -n python3-markups %{python3_sitelib}/markups/ %{python3_sitelib}/%{srcname}-%{version}-py*.egg-info/ %doc LICENSE changelog README %endif %changelog * Thu Aug 14 2014 Nikos Roussos 0.5.0-4 - Fix python3 requirements * Sat Aug 09 2014 Nikos Roussos 0.5.0-3 - Delete unneeded dependency - Add documentation to python3 subpackage * Sat Aug 09 2014 Nikos Roussos 0.5.0-2 - Fix dependencies - Delete eggs * Fri Aug 08 2014 Nikos Roussos 0.5.0-1 - Initial version of the package