From: W. Trevor King Date: Sun, 14 Sep 2014 18:52:09 +0000 (-0700) Subject: dev-python/flask-cors: Use best_version instead of equery X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4a9c2d54d0622dfe81a423f38ef3e02e059df12;p=wtk-overlay.git dev-python/flask-cors: Use best_version instead of equery To find the location of the installed python-docs. Zero_Chaos suggested the best_version approach on #gentoo-python just now. The installed version of these docs may soon change, with the python-docs package shifting to a per-slot naming scheme that more closely matches the upstream Python naming scheme [1]. [1]: https://bugs.gentoo.org/show_bug.cgi?id=522794 Thanks-to: Rick Farina (Zero_Chaos) --- diff --git a/flask-cors-9999.ebuild b/flask-cors-9999.ebuild index ca2ab58..7076ba3 100644 --- a/flask-cors-9999.ebuild +++ b/flask-cors-9999.ebuild @@ -32,7 +32,6 @@ DEPEND=" 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}] ) @@ -45,12 +44,10 @@ S="${WORKDIR}/${MY_P}" 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