%global srcname docutils Name: python3-%{srcname} Version: 0.12 Release: 0.8.20140510svn7747%{?dist} Summary: System for processing plaintext documentation # 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 # Sometimes we need snapshots. Instructions below: # svn co -r 7687 svn://svn.code.sf.net/p/docutils/code/trunk/docutils # cd docutils # python setup.py sdist # The tarball is in dist/docutils-VERSION.tar.gz Source0: %{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python-tools %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. %package -n python%{python3_pkgversion}-%{srcname} Summary: System for processing plaintext documentation for python %{python3_version} # This isn't yet packaged for EPEL, but it should mostly work without it #Requires: python%{python3_pkgversion}-pillow %description -n python%{python3_pkgversion}-%{srcname} 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. This package contains the module, ported to run under python %{python3_version}. %package doc Summary: Documentation for python-%{srcname} %description doc Documentation for python-%{srcname} %prep %setup -q -n %{srcname}-%{version} # Remove shebang from library files for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py,smartquotes.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file done iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp mv tmp tools/editors/emacs/IDEAS.rst %build %py3_build %install %py3_install # docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib. rm -rf %{buildroot}%{python3_sitelib}/test for file in %{buildroot}/%{_bindir}/*.py; do mv $file `dirname $file`/`basename $file .py`-%{python3_version} 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 %check mv biohazard.swf docs/user/rst/images/biohazard.swf %{__python3} test3/alltests.py rm docs/user/rst/images/biohazard.swf rm -r tools/editors/emacs/tests %files -n python%{python3_pkgversion}-%{srcname} %license COPYING.txt licenses %doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt %doc THANKS.txt tools/editors %{_bindir}/* %{python3_sitelib}/* %files doc %license COPYING.txt licenses %doc docs/* %changelog * Sun Nov 27 2016 Orion Poplawski - 0.12-0.8.20140510svn7747 - Use %%license for COPYING.txt - Make separate doc sub-package * Wed Nov 2 2016 Orion Poplawski - 0.12-0.7.20140510svn7747 - Initial EPEL package