diff --git a/python3-docutils.changes b/python3-docutils.changes new file mode 100644 index 0000000..a49df8e --- /dev/null +++ b/python3-docutils.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Apr 23 12:00:49 UTC 2012 - toddrme2178@gmail.com + +- Add python 3 package + diff --git a/python3-docutils.spec b/python3-docutils.spec new file mode 100644 index 0000000..5aba5c6 --- /dev/null +++ b/python3-docutils.spec @@ -0,0 +1,61 @@ +# +# spec file for package python3-docutils +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: python3-docutils +Version: 0.8.1 +Release: 0 +License: public domain, Python, BSD-2-Clause, GPL (see COPYING.txt) +Summary: Python Documentation Utilities +Url: http://docutils.sourceforge.net/ +Group: Development/Languages/Python +Source: http://downloads.sourceforge.net/project/docutils/docutils/0.8.1/docutils-0.8.1.tar.gz +BuildRequires: python3 +BuildRequires: python3-2to3 +BuildRequires: python3-devel +BuildRequires: python3-xml +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires: python3-xml +Requires: python3 >= %{py3_ver} +BuildArch: noarch +%if 0%{?suse_version} <= 1140 +%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%endif + +%description +Docutils is a modular system for processing documentation into useful formats, +such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText, an +easy-to-read, what-you-see-is-what-you-get plaintext markup syntax. + +%prep +%setup -n docutils-%{version} + +%build +python3 setup.py build +sed -i "s|#!\s*\/usr\/bin\/env python3||g" docutils/{math/math2html,_string_template_compat,error_reporting,writers/xetex/__init__,math/latex2mathml}.py # Fix non-executable scripts + +%install +python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +for i in %{buildroot}%{_bindir}/rst*; do mv "$i" "${i/.py}-python%{py3_ver}"; done # Remove useless ".py" ending from executables and add -python3.x suffix + +%files +%defattr(-,root,root,-) +%doc COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/* licenses +%{_bindir}/rst*-python%{py3_ver} +%{python3_sitelib}/* + +%changelog