blob: 18748a08d78da77e294f1a254c5ab0932a174d86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/mwlib/mwlib-0.14.3.ebuild,v 1.1 2013/01/11 05:53:19 patrick Exp $
EAPI=4
PYTHON_DEPEND="2:2.6"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-pypy-* *-jython"
DISTUTILS_SRC_TEST=py.test
inherit distutils eutils
DESCRIPTION="Tools for parsing Mediawiki content to other formats"
HOMEPAGE="http://code.pediapress.com/wiki/wiki http://pypi.python.org/pypi/mwlib"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"
RDEPEND="dev-python/lxml
=dev-python/odfpy-0.9*
dev-python/pyPdf
virtual/pyparsing
dev-python/timelib
virtual/latex-base
>=dev-python/simplejson-2.5
dev-python/gevent
dev-python/bottle
dev-python/apipkg
dev-python/qserve
dev-python/roman
dev-python/py
dev-python/sqlite3dbm"
DEPEND="${RDEPEND}
dev-python/setuptools
app-arch/unzip
doc? ( dev-python/sphinx )"
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
DOCS="changelog.rst"
src_prepare() {
# mwlib.apipkg is actually used.
sed -e 's/, "apipkg"//' -i setup.py || die
# Execute odflint script.
sed \
-e "/def _get_odflint_module():/,/odflint = _get_odflint_module()/d" \
-e "s/odflint.lint(path)/os.system('odflint %s' % path)/" \
-i tests/test_odfwriter.py || die
distutils_src_prepare
# Disable test which requires installed mw-zip script.
rm -f tests/test_{nuwiki,redirect,zipwiki}.py
# Disable render test that fails for no apparent reason
rm -f tests/test_render.py
}
src_compile() {
distutils_src_compile
if use doc; then
emake -C docs html
fi
}
src_test() {
distutils_src_test tests
}
src_install() {
distutils_src_install
if use doc; then
dohtml -r docs/_build/html/
fi
}
|