%if 0%{?fedora} %global with_python3 1 %endif %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif %global modname zope.structuredtext Summary: StructuredText parser Name: python-zope-structuredtext Version: 4.1.0 Release: 2%{?dist} Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz License: ZPLv2.1 Group: Development/Libraries BuildArch: noarch URL: http://pypi.python.org/pypi/zope.structuredtext BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-sphinx %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description This package provides a parser and renderers for the classic Zope "structured text" markup dialect (STX). STX is a plain text markup in which document structure is signaled primarily by indentation %package -n python2-zope-structuredtext Summary: StructuredText parser %{?python_provide:%python_provide python2-zope-structuredtext} Requires: python2 %description -n python2-zope-structuredtext This package provides a parser and renderers for the classic Zope "structured text" markup dialect (STX). STX is a plain text markup in which document structure is signaled primarily by indentation %if 0%{?with_python3} %package -n python3-zope-structuredtext Summary: StructuredText parser %{?python_provide:%python_provide python3-zope-structuredtext} Requires: python3 %description -n python3-zope-structuredtext This package provides a parser and renderers for the classic Zope "structured text" markup dialect (STX). STX is a plain text markup in which document structure is signaled primarily by indentation %endif %prep %setup -q -n %{modname}-%{version} %build %py2_build pushd docs PYTHONPATH=../src make html popd %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif # Clean up the documentation mv docs/_build/html . rm -rf html/.buildinfo %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-zope-structuredtext %doc CHANGES.rst README.rst TODO.txt COPYRIGHT.txt html/ %license LICENSE.txt %{python2_sitelib}/zope/structuredtext/ # Co-own %%{python2_sitelib}/zope/ %dir %{python2_sitelib}/zope/ # exclude the tests and data needed only for tests %exclude %{python2_sitelib}/zope/structuredtext/tests.py* %exclude %{python2_sitelib}/zope/structuredtext/regressions/ %{python2_sitelib}/%{modname}-*.egg-info %{python2_sitelib}/%{modname}-*-nspkg.pth %if 0%{?with_python3} %files -n python3-zope-structuredtext %doc CHANGES.rst README.rst TODO.txt COPYRIGHT.txt html/ %license LICENSE.txt %{python3_sitelib}/zope/structuredtext/ # Co-own %%{python3_sitelib}/zope/ %dir %{python3_sitelib}/zope/ # exclude the tests and data needed only for tests %exclude %{python3_sitelib}/zope/structuredtext/tests.py* %exclude %{python3_sitelib}/zope/structuredtext/regressions/ %{python3_sitelib}/%{modname}-*.egg-info %{python3_sitelib}/%{modname}-*-nspkg.pth %endif %changelog * Tue Apr 05 2016 Ralph Bean - 4.1.0-2 - Add a python3 subpackage. - Modernize python macros. * Tue Apr 05 2016 Ralph Bean - 4.1.0-1 - Latest upstream. * Thu Feb 04 2016 Fedora Release Engineering - 3.5.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 3.5.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 3.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 3.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 3.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Mar 12 2012 Robin Lee - 3.5.1-1 - Update to 3.5.1 * Thu Sep 23 2010 Robin Lee - 3.5.0-2 - Review request submitted * Thu Jun 17 2010 Robin Lee - 3.5.0-1 - Initial packaging