%define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %define srcname docutils Name: python-%{srcname} Version: 0.10 Release: 1 Summary: System for processing plaintext documentation Group: Development/Languages # See COPYING.txt for information License: Public Domain and BSD and Python and GPLv3+ URL: http://docutils.sourceforge.net Source0: http://downloads.sourceforge.net/docutils/%{srcname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python-devel >= 2.6.2 BuildRequires: python-setuptools >= 0.6.14 Requires: python >= 2.6.2 Requires: python-imaging >= 1.1.6 Provides: docutils = %{version}-%{release} Obsoletes: docutils < %{version}-%{release} %description The Docutils project specifies a plaintext markup language, reStructuredText, which is easy to read and quick to write. The project includes a python library to parse rST files and transform them into other useful formats such as HTML, XML, and TeX as well as commandline tools that give the enduser access to this functionality. Currently, the library supports parsing rST that is in standalone files and PEPs (Python Enhancement Proposals). Work is underway to parse rST from Python inline documentation modules and packages. %prep %setup -q -n %{srcname}-%{version} %build python setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} python setup.py install --skip-build --root="${RPM_BUILD_ROOT}" for file in ${RPM_BUILD_ROOT}%{_bindir}/*.py; do mv $file `dirname $file`/`basename $file .py` done # We want the licenses but don't need this build file rm -f licenses/docutils.conf %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt %doc THANKS.txt licenses docs tools/editors %{_bindir}/* %{python_sitelib}/%{srcname}* %changelog * Thu Feb 21 2013 Michael Perzl - 0.10-1 - first version for AIX V5.1 and higher