%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: 3.5.1 Release: 1%{?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 # register the test suite in setup.py Patch0: %{name}-3.5.0-run_tests.patch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-sphinx %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 %prep %setup -q -n %{modname}-%{version} %patch0 -p1 -b .run_tests %build %{__python} setup.py build pushd docs PYTHONPATH=../src make html popd %install %{__python} setup.py install --root=%{buildroot} # Clean up the documentation mv docs/_build/html . rm -rf html/.buildinfo %check %{__python} setup.py test %files %defattr(-,root,root,-) %doc CHANGES.txt README.txt TODO.txt COPYRIGHT.txt LICENSE.txt html/ %{python_sitelib}/zope/structuredtext/ # Co-own %%{python_sitelib}/zope/ %dir %{python_sitelib}/zope/ # exclude the tests and data needed only for tests %exclude %{python_sitelib}/zope/structuredtext/tests.py* %exclude %{python_sitelib}/zope/structuredtext/regressions/ %{python_sitelib}/%{modname}-*.egg-info %{python_sitelib}/%{modname}-*-nspkg.pth %changelog * 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