Sisyphus repositório
Última atualização: 18 setembro 2019 | SRPMs: 17444 | Visitas: 15117956
en ru br
ALT Linux repositórios
S:0.14-alt2
5.0: 0.4-alt1.1
4.1: 0.4-alt1.1
4.0: 0.4-alt1

Group :: Desenvolvimento/Python
RPM: python-module-docutils

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define oname docutils
%def_with python3

Summary: Docutils -- Python Documentation Utilities
Version: 0.13.1
Release: alt2
%setup_python_module %oname
Name: %packagename
# git://repo.or.cz/docutils.git
Source0: https://pypi.python.org/packages/05/25/7b5484aca5d46915493f1fd4ecb63c38c333bd32aa9ad6e19da8d08895ae/%{oname}-%{version}.tar.gz
License: public domain, Python, BSD, GPL (see COPYING.txt)
Group: Development/Python
BuildArch: noarch
URL: http://docutils.sourceforge.net/
Packager: Python Development Team <python at packages.altlinux.org>
Conflicts: Zope-docutils
Patch: docutils-ALT-disable_assert.patch

%if_with python3
BuildRequires(pre): rpm-build-python3
BuildRequires: python3-devel python-tools-2to3
%add_python3_req_skip pygments
%endif
%add_python_req_skip pygments

%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.

%if_with python3
%package -n python3-module-%oname
Summary: Docutils -- Python 3 Documentation Utilitie
Group: Development/Python3

%description -n python3-module-%oname
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.

%package -n python3-module-%oname-tests
Summary: Tests for Docutils -- Python 3 Documentation Utilitie
Group: Development/Python3
Requires: python3-module-%oname = %version-%release

%description -n python3-module-%oname-tests
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.

This package contains tests for Docutils.
%endif

%prep
%setup -q -n %{oname}-%{version}
%patch -p2

%if_with python3
rm -rf ../python3
cp -a . ../python3
%endif

%build
%python_build
%if_with python3
pushd ../python3
find -type f -name '*.py' -exec 2to3 -w '{}' +
find -type f -name '*.py' -exec sed -i 's|%_bindir/python|%_bindir/python3|' -- '{}' +
find -type f -name '*.py' -exec sed -i 's|%_bindir/env python|%_bindir/python3|' -- '{}' +
%python3_build
popd
%endif

%install
%if_with python3
pushd ../python3
%python3_install
popd
pushd %buildroot%_bindir
for i in *; do
mv $i py3_$i
done
popd
%endif
%python_install --optimize=2
mkdir -p %buildroot%_datadir/%modulename
cp -a tools %buildroot%_datadir/%modulename

#install -p -m644 docutils/utils/roman.py \

# %buildroot%python_sitelibdir

%check
#export LC_ALL=en_US.UTF-8
#python test/alltests.py
#if_with python3
%if 0
pushd ../python3
python3 %buildroot%python3_sitelibdir/test/alltests.py
popd
%endif

%files
%doc docs *.txt
%_datadir/%modulename
%python_sitelibdir/*
%_bindir/rst*
%if_with python3
%exclude %_bindir/py3_*

%files -n python3-module-%oname
%_bindir/py3_*
%python3_sitelibdir/*
#exclude %python3_sitelibdir/test
%exclude %python3_sitelibdir/%modulename/examples.py*
#exclude %python3_sitelibdir/tools/editors/emacs/tests
#exclude %python3_sitelibdir/tools/test

%files -n python3-module-%oname-tests
%python3_sitelibdir/%modulename/examples.py*
#python3_sitelibdir/tools/editors/emacs/tests
#python3_sitelibdir/tools/test
%endif

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009