Skip to content

Add Python setup scripts for os specific install test#4328

Closed
arvindcheru wants to merge 2 commits into
mainfrom
users/acheruva/setup_python_cmd_apr3
Closed

Add Python setup scripts for os specific install test#4328
arvindcheru wants to merge 2 commits into
mainfrom
users/acheruva/setup_python_cmd_apr3

Conversation

@arvindcheru
Copy link
Copy Markdown
Contributor

Motivation

This pull request introduces a new script, set_python_cmd.py, to the build_tools/packaging/linux directory. The script standardizes how the appropriate Python interpreter command is resolved and optionally installed for different Linux distributions in CI and packaging workflows. It supports multiple output formats and can install the correct Python runtime using the native package manager.

Technical Details

Python runtime resolution and installation:

  • Adds set_python_cmd.py, which maps an --os-profile argument to the correct Python interpreter command (e.g., python3.12 for Ubuntu/Debian, python3.13 for SLES) and can install the required Python and pip packages using apt, zypper, or dnf, depending on the OS profile.

Improved CI workflow reliability:

  • Allows CI workflows to reliably install and export the correct PYTHON_CMD, reducing dependency on pre-installed Python versions and improving reproducibility across different Linux distributions.

Test Plan

Test Result

Submission Checklist

@arvindcheru arvindcheru requested review from frepaul and nunnikri April 3, 2026 06:20
@arvindcheru arvindcheru force-pushed the users/acheruva/setup_python_cmd_apr3 branch from 5b33b87 to d11e425 Compare April 6, 2026 14:29
Copy link
Copy Markdown
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by comment.

Comment thread build_tools/packaging/linux/set_python_cmd.py Outdated
@arvindcheru arvindcheru force-pushed the users/acheruva/setup_python_cmd_apr3 branch from 21acf00 to 9074dab Compare April 8, 2026 16:38
@arvindcheru
Copy link
Copy Markdown
Contributor Author

#3126 will support the changes for python install scripts. So will close this PR.
Thanks for the review.

@arvindcheru arvindcheru marked this pull request as draft April 10, 2026 06:17
@arvindcheru
Copy link
Copy Markdown
Contributor Author

To avoid duplication - This PR is closing the changes available in #3126

@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Apr 16, 2026
@arvindcheru arvindcheru deleted the users/acheruva/setup_python_cmd_apr3 branch April 16, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants