2011-09-21 12:04:49 +02:00
|
|
|
#
|
2011-09-23 12:27:18 +02:00
|
|
|
# spec file for package python-docutils
|
2011-09-21 12:04:49 +02:00
|
|
|
#
|
|
|
|
# Copyright (c) 2011 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.
|
2011-09-23 12:27:18 +02:00
|
|
|
|
2011-09-21 12:04:49 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-docutils
|
|
|
|
Version: 0.8.1
|
|
|
|
Release: 0
|
|
|
|
Url: http://docutils.sourceforge.net/
|
|
|
|
Summary: Python Documentation Utilities
|
|
|
|
License: public domain, Python, BSD-2-Clause, GPL (see COPYING.txt)
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Source: http://downloads.sourceforge.net/project/docutils/docutils/0.8.1/docutils-0.8.1.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: python-devel
|
2011-09-23 12:27:18 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-09-21 12:04:49 +02:00
|
|
|
BuildRequires: python-xml
|
|
|
|
Requires: python-xml
|
2011-09-23 12:27:18 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
BuildRequires: pyxml
|
|
|
|
Requires: pyxml
|
|
|
|
%endif
|
2011-09-21 12:04:49 +02:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
%py_requires
|
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
Provides: docutils = %{version}
|
|
|
|
Obsoletes: docutils < %{version}
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
|
|
|
|
%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
|
|
|
|
python setup.py build
|
|
|
|
sed -i "1d" docutils/{math/math2html,_string_template_compat,error_reporting,writers/xetex/__init__,math/latex2mathml}.py # Fix non-executable scripts
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
for i in %{buildroot}%{_bindir}/rst*; do mv "$i" "${i/.py}"; done # Remove useless ".py" ending from executables
|
|
|
|
|
2011-09-23 12:27:18 +02:00
|
|
|
# Tests break SLE and Mandriva builds
|
|
|
|
%if ! 0%{?sles_version} && ! 0%{?mandriva_version}
|
|
|
|
|
2011-09-21 12:04:49 +02:00
|
|
|
%check
|
|
|
|
cd test && python alltests.py
|
2011-09-21 12:17:05 +02:00
|
|
|
%endif
|
2011-09-21 12:04:49 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/* licenses
|
|
|
|
%{_bindir}/rst*
|
|
|
|
%python_sitelib/*
|
|
|
|
|
|
|
|
%changelog
|