Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions compiler/one-cmds/one-prepare-venv
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE check if we can use python3.8 for Ubuntu 18.04.
# use +e as python3.8 may not exist in the system and 'command' will return error.
# NOTE check if we can use python3.10 for Ubuntu 20.04.
# use +e as python3.10 may not exist in the system and 'command' will return error.
set +e

PYTHON_CANDIDATES=("python3.12" "python3.10" "python3.8" "python3")
PYTHON_CANDIDATES=("python3.12" "python3.10" "python3")
for py in "${PYTHON_CANDIDATES[@]}"; do
PYTHON3_EXEC=$(command -v "$py")
if [[ -n "${PYTHON3_EXEC}" ]]; then
Expand Down Expand Up @@ -70,9 +70,7 @@ VER_NUMPY=1.24.3

PYTHON_VER=$(${PYTHON3_EXEC} -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')" )
echo "Setting package version for python $PYTHON_VER"
if [[ "$PYTHON_VER" == "3.8" ]]; then
: # use as is
elif [[ "$PYTHON_VER" == "3.10" ]]; then
if [[ "$PYTHON_VER" == "3.10" ]]; then
: # TODO change vesions
elif [[ "$PYTHON_VER" == "3.12" ]]; then
: # TODO change vesions
Expand Down