diff options
-rw-r--r-- | vars/build.vars | 1 | ||||
-rw-r--r-- | vars/python2_host.vars | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/vars/build.vars b/vars/build.vars index b09553e0..b99d0b0b 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -826,6 +826,7 @@ patch patchutils perl python2 python3 ruby smallbasic tcl"; : ${PKG_PYTHON2_VERSION:=2.7.14}; : ${PKG_PYTHON2_URL:=https://www.python.org/ftp/python/${PKG_PYTHON2_VERSION}/Python-${PKG_PYTHON2_VERSION}.tgz}; : ${PKG_PYTHON2_CONFIGURE_ARGS:="--build=x86_64 -C --enable-ipv6 --enable-shared --host=${DEFAULT_TARGET} --prefix=${PREFIX_NATIVE}"}; +: ${PKG_PYTHON2_ENV_VARS_EXTRA:="PYTHON_FOR_BUILD=${PREFIX}/bin/python2.7.wrapper"}; : ${PKG_PYTHON3_SHA256SUM:=687e067d9f391da645423c7eda8205bae9d35edc0c76ef5218dcbe4cc770d0d7}; : ${PKG_PYTHON3_VERSION:=3.5.1}; : ${PKG_PYTHON3_URL:=https://www.python.org/ftp/python/${PKG_PYTHON3_VERSION}/Python-${PKG_PYTHON3_VERSION}.tgz}; diff --git a/vars/python2_host.vars b/vars/python2_host.vars new file mode 100644 index 00000000..097c1965 --- /dev/null +++ b/vars/python2_host.vars @@ -0,0 +1,16 @@ +# +# set -o errexit -o noglob are assumed. +# + +pkg_python2_host_install_make_post() { + if ex_rtl_fileop test "${PKG_DESTDIR}/bin/python2.7.wrapper"; then + ex_rtl_fileop rm "${PKG_DESTDIR}/bin/python2.7.wrapper"; + fi; + cat > "${PKG_DESTDIR}/bin/python2.7.wrapper" <<EOF +#!/bin/sh +env LD_LIBRARY_PATH="${PREFIX}/lib" "${PREFIX}/bin/python2.7" "\${@}"; +EOF + chmod +x "${PKG_DESTDIR}/bin/python2.7.wrapper"; +}; + +# vim:filetype=sh |