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 )
12 DESCRIPTION="Fast, pure-Python full text indexing, search and spell checking library"
13 HOMEPAGE="https://bitbucket.org/mchaput/whoosh/wiki/Home/ https://pypi.org/project/Whoosh/"
14 SRC_URI="mirror://pypi/W/${MY_PN}/${MY_PN}-${PV}.zip"
16 DEPEND="app-arch/unzip
17 dev-python/setuptools[${PYTHON_USEDEP}]
18 test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
24 RESTRICT="!test? ( test )"
26 S="${WORKDIR}/${MY_PN}-${PV}"
28 python_prepare_all() {
29 # (backport from upstream)
30 sed -i -e '/cmdclass/s:pytest:PyTest:' setup.py || die
32 # Prevent un-needed download during build
33 sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
35 distutils-r1_python_prepare_all
38 python_compile_all() {
39 # https://bitbucket.org/mchaput/whoosh/issue/403/
40 use doc && sphinx-build -b html -c docs/source/ docs/source/ docs/source/build/html
47 python_install_all() {
48 local DOCS=( README.txt )
49 use doc && local HTML_DOCS=( docs/source/build/html/. )
50 distutils-r1_python_install_all