From dcc0f299be7b62837e06be09e89ff9aade1673ae Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Thu, 16 Jun 2022 02:29:25 -0600 Subject: [PATCH] Toolchain+Ports: Install host python into Local/python, not Local/$ARCH Following the pattern for qemu, mold, and clang, we should install the host python required to build the python port into its own install tree rather than forcing it into the GNU compiler's bindir. --- Ports/python3/package.sh | 2 ++ Toolchain/BuildPython.sh | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Ports/python3/package.sh b/Ports/python3/package.sh index 5ad82ee642..2b03a290c3 100755 --- a/Ports/python3/package.sh +++ b/Ports/python3/package.sh @@ -2,6 +2,8 @@ source version.sh +export PATH="${SERENITY_SOURCE_DIR}/Toolchain/Local/python/bin:${PATH}" + port=python3 version="${PYTHON_VERSION}" workdir="Python-${version}" diff --git a/Toolchain/BuildPython.sh b/Toolchain/BuildPython.sh index 0fb35f2749..a988d5ecda 100755 --- a/Toolchain/BuildPython.sh +++ b/Toolchain/BuildPython.sh @@ -5,9 +5,8 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -ARCH=${ARCH:-"i686"} -PREFIX_DIR="$DIR/Local/$ARCH" -BUILD_DIR="$DIR/Build/$ARCH" +PREFIX_DIR="$DIR/Local/python" +BUILD_DIR="$DIR/Build/python" TARBALLS_DIR="$DIR/Tarballs" # shellcheck source=/dev/null @@ -42,9 +41,9 @@ if [ -z "$MAKEJOBS" ]; then fi mkdir -p "${PREFIX_DIR}" -mkdir -p "${BUILD_DIR}/python" +mkdir -p "${BUILD_DIR}" -pushd "${BUILD_DIR}/python" +pushd "${BUILD_DIR}" "${TARBALLS_DIR}"/Python-"${PYTHON_VERSION}"/configure --prefix="${PREFIX_DIR}" make -j "${MAKEJOBS}" make install