2012-04-24 09:18:46 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
2012-10-29 15:35:43 +00:00
|
|
|
|
2012-04-24 09:18:46 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
2012-10-29 15:35:43 +00:00
|
|
|
|
2012-11-20 19:35:54 +00:00
|
|
|
Name: python3-docutils
|
2012-05-18 12:07:51 +00:00
|
|
|
Version: 0.9
|
2012-04-24 09:18:46 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Python Documentation Utilities
|
2012-05-18 12:07:51 +00:00
|
|
|
License: Python-2.0 and BSD-2-Clause and GPL-2.0+ and GPL-3.0+ and SUSE-Public-Domain
|
2012-04-24 09:18:46 +00:00
|
|
|
Group: Development/Languages/Python
|
2012-05-18 12:07:51 +00:00
|
|
|
Url: http://docutils.sourceforge.net/
|
2012-11-20 19:35:54 +00:00
|
|
|
Source: http://downloads.sourceforge.net/project/docutils/docutils/%{version}/docutils-%{version}.tar.gz
|
2012-10-29 15:35:43 +00:00
|
|
|
# patch from upstream: r7486 Fix [3541369] Relative __import__ also with Python 3.3
|
|
|
|
|
Patch0: r7486-python33-compat.patch
|
2012-04-24 09:18:46 +00:00
|
|
|
BuildRequires: python3
|
|
|
|
|
BuildRequires: python3-2to3
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-xml
|
|
|
|
|
Requires: python3-xml
|
2012-11-20 19:35:54 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-04-30 11:52:42 +00:00
|
|
|
BuildArch: noarch
|
2012-04-24 09:18:46 +00:00
|
|
|
|
|
|
|
|
%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
|
2012-11-20 19:35:54 +00:00
|
|
|
%setup -n docutils-%{version}
|
2012-10-29 15:35:43 +00:00
|
|
|
%patch0 -p2
|
2012-11-20 19:35:54 +00:00
|
|
|
# Fix non-executable scripts:
|
|
|
|
|
sed -i "s|#!.*||g" docutils/{math/math2html,_string_template_compat,error_reporting,writers/xetex/__init__,math/latex2mathml}.py docutils/utils/{code_analyzer,punctuation_chars}.py
|
|
|
|
|
# Remove useless ".py" ending from executables:
|
|
|
|
|
for i in tools/rst*; do mv "$i" "${i/.py}-%{py3_ver}"; done
|
|
|
|
|
sed -i "s|'tools/\(rst.*\)\.py'|'tools/\1-%{py3_ver}'|" setup.py
|
|
|
|
|
|
2012-04-24 09:18:46 +00:00
|
|
|
%build
|
|
|
|
|
python3 setup.py build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2012-11-20 19:35:54 +00:00
|
|
|
# Remove unneeded directories:
|
2012-05-18 12:07:51 +00:00
|
|
|
rm -r %{buildroot}%{python3_sitelib}/test/
|
|
|
|
|
rm -r %{buildroot}%{python3_sitelib}/tools/
|
2012-04-24 09:18:46 +00:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/* licenses
|
2012-11-20 19:35:54 +00:00
|
|
|
%{_bindir}/rst*-%{py3_ver}
|
|
|
|
|
%{python3_sitelib}/docutils/
|
|
|
|
|
%{python3_sitelib}/docutils-%{version}-py%{py3_ver}.egg-info
|
2012-04-24 09:18:46 +00:00
|
|
|
|
|
|
|
|
%changelog
|