Accepting request 115138 from home:TheBlackCat:branches:devel:languages:python

Added python 3 package.  Please create a link from python-docutils to python3-docutils

OBS-URL: https://build.opensuse.org/request/show/115138
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=8
This commit is contained in:
Sascha Peilicke 2012-04-24 09:18:46 +00:00 committed by Git OBS Bridge
parent ca9dca7322
commit b2adf4b1b1
2 changed files with 66 additions and 0 deletions

5
python3-docutils.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Mon Apr 23 12:00:49 UTC 2012 - toddrme2178@gmail.com
- Add python 3 package

61
python3-docutils.spec Normal file
View File

@ -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