dev-lang/python: Fix epython.py module first install

Fix the issues in obtaining sitedir for epython.py module install when
dev-lang/python is not yet installed.
This commit is contained in:
Michał Górny
2015-11-12 17:03:16 +01:00
parent 7c7e9a2dfa
commit bc46e49ff6
13 changed files with 78 additions and 51 deletions
+6 -4
View File
@@ -286,16 +286,18 @@ src_install() {
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
# for python-exec
python_export python${SLOT} EPYTHON PYTHON
export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
local vars=( EPYTHON PYTHON_SITEDIR )
# if not using a cross-compiler, use the fresh binary
if ! tc-is-cross-compiler; then
local PYTHON=./python
local -x PYTHON=./python
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
else
vars=( PYTHON "${vars[@]}" )
fi
echo "EPYTHON='${EPYTHON}'" > epython.py
python_export "python${PYVER}" "${vars[@]}"
echo "EPYTHON='${EPYTHON}'" > epython.py || die
python_domodule epython.py
}