1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7} )
10 DESCRIPTION="Python library to create spreadsheet files compatible with Excel"
11 HOMEPAGE="https://pypi.org/project/xlwt/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
17 IUSE="doc examples test"
18 RESTRICT="!test? ( test )"
21 dev-python/setuptools[${PYTHON_USEDEP}]
23 >=dev-python/sphinx-1.3.1[${PYTHON_USEDEP}]
24 dev-python/pkginfo[${PYTHON_USEDEP}]
26 test? ( dev-python/nose[${PYTHON_USEDEP}] )"
28 # Prevent d'loading in the doc build
29 PATCHES=( "${FILESDIR}/${PN}-1.3.0-no-intersphinx.patch" )
31 python_prepare_all() {
32 # Don't install documentation and examples in site-packages directories.
33 sed -e "/package_data/d" -i setup.py || die
35 distutils-r1_python_prepare_all
38 python_compile_all() {
39 use doc && emake -C docs html
43 nosetests tests || die "tests failed under ${EPYTHON}}"
46 python_install_all() {
47 use doc && local HTML_DOCS=( docs/_build/html/. )
50 docompress -x /usr/share/doc/${PF}
52 distutils-r1_python_install_all