Skip to content

Commit

Permalink
fixup! python-utils-r1.eclass: Use wrapper scripts to fix cross-compi…
Browse files Browse the repository at this point in the history
…ling
  • Loading branch information
chewi committed Sep 13, 2018
1 parent da10c38 commit 6cedcf1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions eclass/python-utils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,9 @@ python_wrapper_setup() {
[[ ${workdir} ]] || die "${FUNCNAME}: no workdir specified."
[[ ${impl} ]] || die "${FUNCNAME}: no impl nor EPYTHON specified."

local EPYTHON
python_export "${impl}" EPYTHON

if [[ ! -x ${workdir}/bin/python ]]; then
_python_check_dead_variables

Expand All @@ -1011,9 +1014,6 @@ python_wrapper_setup() {
rm -f "${workdir}"/bin/2to3 || die
rm -f "${workdir}"/pkgconfig/python{,2,3}.pc || die

local EPYTHON
python_export "${impl}" EPYTHON

local pyver pyother
if python_is_python3; then
pyver=3
Expand Down Expand Up @@ -1082,11 +1082,12 @@ python_wrapper_setup() {
nonsupp+=( "${EPYTHON}" )
[[ ${EPYTHON} == python* ]] && nonsupp+=( "${EPYTHON}-config" )
done
EPYTHON=${orig_EPYTHON}

for x in "${nonsupp[@]}"; do
cat >"${workdir}"/bin/${x} <<-_EOF_ || die
#!/bin/sh
echo "${ECLASS}: ${FUNCNAME}: ${x} is not supported by ${orig_EPYTHON} (PYTHON_COMPAT)" >&2
echo "${ECLASS}: ${FUNCNAME}: ${x} is not supported by ${EPYTHON} (PYTHON_COMPAT)" >&2
exit 127
_EOF_
chmod +x "${workdir}"/bin/${x} || die
Expand Down

0 comments on commit 6cedcf1

Please sign in to comment.