diff --git a/tinyipa/build-tinyipa.sh b/tinyipa/build-tinyipa.sh index 029abf8..201be84 100755 --- a/tinyipa/build-tinyipa.sh +++ b/tinyipa/build-tinyipa.sh @@ -76,10 +76,7 @@ cd $IPA_SOURCE_DIR rm -rf *.egg-info pwd -PYTHON_COMMAND="python" -if [[ $USE_PYTHON3 == "True" ]]; then - PYTHON_COMMAND="python3" -fi +PYTHON_COMMAND="python3" $PYTHON_COMMAND setup.py sdist --dist-dir "$BUILDDIR/tmp/localpip" --quiet ls $BUILDDIR/tmp/localpip || true @@ -150,10 +147,7 @@ cp $WORKDIR/build_files/fakeuname $BUILDDIR/tmp/overides/uname sudo cp $WORKDIR/build_files/ntpdate $BUILDDIR/bin/ntpdate -PY_REQS="buildreqs_python2.lst" -if [[ $USE_PYTHON3 == "True" ]]; then - PY_REQS="buildreqs_python3.lst" -fi +PY_REQS="buildreqs_python3.lst" # NOTE(rpittau) change ownership of the tce info dir to prevent writing issues sudo chown $TC:$STAFF $BUILDDIR/usr/local/tce.installed @@ -162,10 +156,7 @@ while read line; do sudo chroot --userspec=$TC:$STAFF $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy tce-load -wci $line done < <(paste $WORKDIR/build_files/$PY_REQS $WORKDIR/build_files/buildreqs.lst) -TINYIPA_PYTHON_EXE="python" -if [[ $USE_PYTHON3 == "True" ]]; then - TINYIPA_PYTHON_EXE="python3.9" -fi +TINYIPA_PYTHON_EXE="python3.9" PIP_COMMAND="$TINYIPA_PYTHON_EXE -m pip" diff --git a/tinyipa/build_files/buildreqs_python2.lst b/tinyipa/build_files/buildreqs_python2.lst deleted file mode 100644 index cc75492..0000000 --- a/tinyipa/build_files/buildreqs_python2.lst +++ /dev/null @@ -1,2 +0,0 @@ -python.tcz -python-dev.tcz \ No newline at end of file diff --git a/tinyipa/build_files/finalreqs_python2.lst b/tinyipa/build_files/finalreqs_python2.lst deleted file mode 100644 index c298884..0000000 --- a/tinyipa/build_files/finalreqs_python2.lst +++ /dev/null @@ -1 +0,0 @@ -python.tcz \ No newline at end of file diff --git a/tinyipa/common.sh b/tinyipa/common.sh index 579f521..f59a77d 100755 --- a/tinyipa/common.sh +++ b/tinyipa/common.sh @@ -9,7 +9,6 @@ PIP_VERSION="21.3.1" TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false} TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true} -USE_PYTHON3=${USE_PYTHON3:-True} # PYTHON_EXTRA_SOURCES_DIR_LIST is a csv list of python package dirs to include PYTHON_EXTRA_SOURCES_DIR_LIST=${PYTHON_EXTRA_SOURCES_DIR_LIST:-} diff --git a/tinyipa/finalise-tinyipa.sh b/tinyipa/finalise-tinyipa.sh index 924ddd7..594f87f 100755 --- a/tinyipa/finalise-tinyipa.sh +++ b/tinyipa/finalise-tinyipa.sh @@ -90,10 +90,7 @@ cp $WORKDIR/build_files/fakeuname $FINALDIR/tmp/overides/uname sudo cp $WORKDIR/build_files/ntpdate $FINALDIR/bin/ntpdate sudo chmod 755 $FINALDIR/bin/ntpdate -PY_REQS="finalreqs_python2.lst" -if [[ $USE_PYTHON3 == "True" ]]; then - PY_REQS="finalreqs_python3.lst" -fi +PY_REQS="finalreqs_python3.lst" # NOTE(rpittau) change ownership of the tce info dir to prevent writing issues sudo chown $TC:$STAFF $FINALDIR/usr/local/tce.installed @@ -140,12 +137,8 @@ fi # Ensure tinyipa picks up installed kernel modules $CHROOT_CMD depmod -a `$WORKDIR/build_files/fakeuname -r` -PIP_COMMAND="pip" -TINYIPA_PYTHON_EXE="python" -if [[ $USE_PYTHON3 == "True" ]]; then - PIP_COMMAND="pip3" - TINYIPA_PYTHON_EXE="python3" -fi +PIP_COMMAND="pip3" +TINYIPA_PYTHON_EXE="python3" # Install pip # NOTE(rpittau): pip MUST be the same version used in the build script or