dev-python/setuptools[${PYTHON_USEDEP}]
doc? (
${RDEPEND}
+ dev-python/python-docs[${PYTHON_USEDEP}]
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
)
test? (
S="${WORKDIR}/${MY_P}"
+python_prepare_all() {
+ if use doc; then
+ local PYTHON_DOC_INVENTORIES=$(ls "${EROOT}usr/share/doc"/python-docs-*/html/objects.inv)
+ local PYTHON_DOC_INVENTORY="${PYTHON_DOC_INVENTORIES##*
+}"
+ local PYTHON_DOC="${PYTHON_DOC_INVENTORY##${ROOT%/}}"
+ PYTHON_DOC="${PYTHON_DOC%%objects.inv}"
+ if [[ -z "${PYTHON_DOC}" ]]
+ then
+ die "python-docs not found in ${EROOT}usr/share/doc"
+ fi
+ sed -i "s|'http://docs.python.org/': None|'${PYTHON_DOC}': '${PYTHON_DOC_INVENTORY}'|" docs/conf.py || die
+ fi
+ distutils-r1_python_prepare_all
+}
+
python_compile_all() {
use doc && emake -C docs html
}