dev-python/setuptools[${PYTHON_USEDEP}]
doc? (
${RDEPEND}
- app-portage/gentoolkit
>=dev-python/python-docs-2.7.6-r1:2.7
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
)
python_prepare_all() {
if use doc; then
- local PYTHON_DOC_INVENTORY=$(equery files python-docs | grep objects.inv | tail -n1)
- if [[ -z "${PYTHON_DOC_INVENTORY}" ]]
- then
- die "objects.inv not found in python-docs"
- fi
- PYTHON_DOC="${PYTHON_DOC_INVENTORY%%objects.inv}"
+ local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
+ local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
+ local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
+ local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
sed -i "s|'http://docs.python.org/': None|'${PYTHON_DOC}': '${PYTHON_DOC_INVENTORY}'|" docs/conf.py || die
fi
distutils-r1_python_prepare_all