Gentoo Archives: gentoo-commits

From: "Dirkjan Ochtman (djc)" <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/docutils: docutils-0.8.1.ebuild ChangeLog
Date: Sun, 04 Sep 2011 07:23:11
Message-Id: 20110904072301.023FE20051@flycatcher.gentoo.org
1 djc 11/09/04 07:23:00
2
3 Modified: ChangeLog
4 Added: docutils-0.8.1.ebuild
5 Log:
6 Version bump docutils to 0.8.1.
7
8 (Portage version: 2.1.10.12/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.136 dev-python/docutils/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/docutils/ChangeLog?rev=1.136&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/docutils/ChangeLog?rev=1.136&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/docutils/ChangeLog?r1=1.135&r2=1.136
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-python/docutils/ChangeLog,v
20 retrieving revision 1.135
21 retrieving revision 1.136
22 diff -u -r1.135 -r1.136
23 --- ChangeLog 6 Aug 2011 16:34:39 -0000 1.135
24 +++ ChangeLog 4 Sep 2011 07:23:00 -0000 1.136
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-python/docutils
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/ChangeLog,v 1.135 2011/08/06 16:34:39 hwoarang Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/ChangeLog,v 1.136 2011/09/04 07:23:00 djc Exp $
30 +
31 +*docutils-0.8.1 (04 Sep 2011)
32 +
33 + 04 Sep 2011; Dirkjan Ochtman <djc@g.o> +docutils-0.8.1.ebuild:
34 + Version bump to 0.8.1.
35
36 *docutils-0.8 (06 Aug 2011)
37
38
39
40
41 1.1 dev-python/docutils/docutils-0.8.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/docutils/docutils-0.8.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/docutils/docutils-0.8.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: docutils-0.8.1.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/docutils-0.8.1.ebuild,v 1.1 2011/09/04 07:23:00 djc Exp $
51
52 EAPI="3"
53 SUPPORT_PYTHON_ABIS="1"
54
55 inherit distutils eutils
56
57 DESCRIPTION="Docutils - Python Documentation Utilities"
58 HOMEPAGE="http://docutils.sourceforge.net/ http://pypi.python.org/pypi/docutils"
59 if [[ "${PV}" == *_pre* ]]; then
60 SRC_URI="mirror://gentoo/${P}.tar.xz"
61 else
62 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
63 fi
64 SRC_URI+=" glep? ( mirror://gentoo/glep-0.4-r1.tbz2 )"
65
66 LICENSE="BSD-2 GPL-3 PSF-2 public-domain"
67 SLOT="0"
68 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
69 IUSE="emacs glep"
70
71 DEPEND="dev-python/setuptools"
72 RDEPEND=""
73 # Avoid circular dependency.
74 PDEPEND="emacs? ( || ( >=app-emacs/rst-0.4 >=virtual/emacs-23 ) )"
75
76 DOCS="*.txt"
77 PYTHON_MODNAME="docutils roman.py"
78
79 GLEP_SRC="${WORKDIR}/glep-0.4-r1"
80
81 src_prepare() {
82 # Fix installation of extra modules.
83 epatch "${FILESDIR}/${PN}-0.6-extra_modules.patch"
84
85 sed -e "s/from distutils.core/from setuptools/" -i setup.py || die "sed setup.py failed"
86 }
87
88 src_compile() {
89 distutils_src_compile
90
91 # Generate html docs from reStructured text sources.
92
93 # Make roman.py available for process of building of documentation.
94 ln -s extras/roman.py
95
96 # Place html4css1.css in base directory to ensure that the generated reference to it is correct.
97 cp docutils/writers/html4css1/html4css1.css .
98
99 pushd tools > /dev/null
100
101 echo PYTHONPATH="../build-$(PYTHON -f --ABI)/lib" "$(PYTHON -f)" $([[ -f ../build-$(PYTHON -f --ABI)/lib/tools/buildhtml.py ]] && echo ../build-$(PYTHON -f --ABI)/lib/tools/buildhtml.py || echo ../tools/buildhtml.py) --input-encoding=utf-8 --stylesheet-path=../html4css1.css --traceback ../docs
102 PYTHONPATH="../build-$(PYTHON -f --ABI)/lib" "$(PYTHON -f)" $([[ -f ../build-$(PYTHON -f --ABI)/lib/tools/buildhtml.py ]] && echo ../build-$(PYTHON -f --ABI)/lib/tools/buildhtml.py || echo ../tools/buildhtml.py) --input-encoding=utf-8 --stylesheet-path=../html4css1.css --traceback ../docs || die "buildhtml.py failed"
103
104 popd > /dev/null
105
106 # Clean up after building of documentation.
107 rm roman.py html4css1.css
108 }
109
110 src_test() {
111 testing() {
112 echo PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" $([[ -f build-${PYTHON_ABI}/lib/test/alltests.py ]] && echo build-${PYTHON_ABI}/lib/test/alltests.py || echo test/alltests.py)
113 PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" $([[ -f build-${PYTHON_ABI}/lib/test/alltests.py ]] && echo build-${PYTHON_ABI}/lib/test/alltests.py || echo test/alltests.py)
114 }
115 python_execute_function testing
116 }
117
118 install_txt_doc() {
119 local doc="${1}"
120 local dir="txt/$(dirname ${doc})"
121 docinto "${dir}"
122 dodoc "${doc}"
123 }
124
125 src_install() {
126 distutils_src_install
127
128 postinstallational_preparation() {
129 # Install tools.
130 mkdir -p "${T}/images/${PYTHON_ABI}${EPREFIX}/usr/bin"
131 pushd $([[ -d build-${PYTHON_ABI}/lib/tools ]] && echo build-${PYTHON_ABI}/lib/tools || echo tools) > /dev/null
132 cp buildhtml.py quicktest.py "${T}/images/${PYTHON_ABI}${EPREFIX}/usr/bin"
133 popd > /dev/null
134
135 # Delete useless files, which are installed only with Python 3.
136 rm -fr "${ED}$(python_get_sitedir)/"{test,tools}
137 }
138 python_execute_function -q postinstallational_preparation
139 python_merge_intermediate_installation_images "${T}/images"
140
141 # Install documentation.
142 dohtml -r docs tools
143
144 # Install stylesheet file.
145 insinto /usr/share/doc/${PF}/html
146 doins docutils/writers/html4css1/html4css1.css
147 local doc
148 for doc in $(find docs tools -name "*.txt"); do
149 install_txt_doc "${doc}"
150 done
151
152 # Install Gentoo GLEP tools.
153 if use glep; then
154 dobin "${GLEP_SRC}/glep.py" || die "dobin failed"
155
156 installation_of_glep_tools() {
157 insinto $(python_get_sitedir)/docutils/readers
158 newins "${GLEP_SRC}/glepread.py" glep.py || die "newins reader failed"
159 insinto $(python_get_sitedir)/docutils/transforms
160 newins "${GLEP_SRC}/glepstrans.py" gleps.py || die "newins transform failed"
161 insinto $(python_get_sitedir)/docutils/writers
162 doins -r "${GLEP_SRC}/glep_html" || die "doins writer failed"
163 }
164 python_execute_function --action-message 'Installation of GLEP tools with $(python_get_implementation_and_version)...' installation_of_glep_tools
165 fi
166 }