%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.13.1 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 BuildArch: noarch BuildRequires: python-devel >= 2.7.13-1 BuildRequires: python-setuptools >= 32.3.1-1 Requires: python >= 2.7.13-1 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 # Flash file is used for testing docutils but shouldn't be in the installed package mv docs/user/rst/images/biohazard.swf ./biohazard.swf %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 * Mon Jan 16 2017 Michael Perzl - 0.13.1-1 - updated to version 0.13.1 * Thu Feb 21 2013 Michael Perzl - 0.10-1 - first version for AIX V5.1 and higher