dnl author: Fabian Groffen <grobian a gentoo.org>
AC_DEFUN([GENTOO_PATH_PYTHON],
[
- AC_PATH_PROG([HERE_PORTAGE_PYTHON], [python], no, $2)
- dnl Portage's ebuild.sh defines PORTAGE_PYTHON itself now :(
- PORTAGE_PYTHON="$HERE_PORTAGE_PYTHON"
+ AC_PATH_PROG([PREFIX_PORTAGE_PYTHON], [python], no, $2)
dnl is is there at all?
- if test "$PORTAGE_PYTHON" = "no" ; then
+ if test "$PREFIX_PORTAGE_PYTHON" = "no" ; then
AC_MSG_ERROR([no python found in your path])
fi
dnl is it the version we want?
- ver=`$PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]]'`
- AC_MSG_CHECKING([whether $PORTAGE_PYTHON $ver >= $1])
- cmp=`$PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]] >= "$1"'`
+ ver=`$PREFIX_PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]]'`
+ AC_MSG_CHECKING([whether $PREFIX_PORTAGE_PYTHON $ver >= $1])
+ cmp=`$PREFIX_PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]] >= "$1"'`
if test "$cmp" = "True" ; then
AC_MSG_RESULT([yes])
else
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# Ripped from HP and updated from Debian
# Update by Gentoo to support unicode output
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}
PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}
PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
- "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
+ "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
ret=$?
[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}
PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}
PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
- exec "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/portageq" "$@"
+ exec "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/portageq" "$@"
PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
- exec "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@"
+ exec "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@"
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
fi
PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
- "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" "$@"
+ "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" "$@"
}
"
fi
- "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
+ "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
}
# @FUNCTION: preprocess_ebuild_env
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 2009-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# vim: noet :
from __future__ import print_function
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 2006-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 2008-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
[[ $PORTAGE_LOG_FILE = *.gz ]] && cat_cmd=zcat
[[ $reset_debug = 1 ]] && set -x
f=$($cat_cmd "${PORTAGE_LOG_FILE}" | \
- "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
+ "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
if [[ -n ${f} ]] ; then
# In the future this will be a forced "die". In preparation,
$PORTAGE_BZIP2_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
assert "failed to pack binary package: '$PORTAGE_BINPKG_TMPFILE'"
PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
- "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \
+ "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \
"$PORTAGE_BINPKG_TMPFILE" "$PORTAGE_BUILDDIR/build-info"
if [ $? -ne 0 ]; then
rm -f "${PORTAGE_BINPKG_TMPFILE}"
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
exec_prefix = @exec_prefix@
sysconfdir = @sysconfdir@
libdir = @libdir@
-PYTHON = @PORTAGE_PYTHON@
+PYTHON = @PREFIX_PORTAGE_PYTHON@
srcdir=@srcdir@
top_builddir=@top_builddir@
exit_status="0"
for version in ${PYTHON_VERSIONS}; do
- if [[ -x @PORTAGE_PYTHON@${version} ]]; then
+ if [[ -x @PREFIX_PORTAGE_PYTHON@${version} ]]; then
echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
- if ! @PORTAGE_PYTHON@${version} pym/portage/tests/runTests; then
+ if ! @PREFIX_PORTAGE_PYTHON@${version} pym/portage/tests/runTests; then
echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
exit_status="1"
fi
-e "s,${at}PORTAGE_FIND${at},@PORTAGE_FIND@,g"
-e "s,${at}PORTAGE_GREP${at},@PORTAGE_GREP@,g"
-e "s,${at}PORTAGE_MV${at},@PORTAGE_MV@,g"
- -e "s,${at}PORTAGE_PYTHON${at},@PORTAGE_PYTHON@,g"
+ -e "s,${at}PORTAGE_PYTHON${at},@PREFIX_PORTAGE_PYTHON@,g"
-e "s,${at}PORTAGE_RM${at},@PORTAGE_RM@,g"
-e "s,${at}PORTAGE_SED${at},@PORTAGE_SED@,g"
-e "s,${at}PORTAGE_WGET${at},@PORTAGE_WGET@,g"
./tabcheck.py $(
find ./ -name .git -o -name .hg -prune -o -type f ! -name '*.py' -print \
- | xargs grep -l "#\!@PORTAGE_PYTHON@"
+ | xargs grep -l "#\!@PREFIX_PORTAGE_PYTHON@"
find ./ -name .git -o -name .hg -prune -o -type f -name '*.py' -print
)