Skip to content

Convert to using python binary directly instead of alternatives #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 22, 2025

Conversation

kdvalin
Copy link
Member

@kdvalin kdvalin commented Apr 1, 2025

Description

This PR updates the script to use the python binary directly instead of going through update-alternatives. This is useful since the script will not touch what the default python interpreter is on a system.

As a result, we may need to get pip through the ensurepip module, since sometimes pip is not packaged for a python version (usually for RHEL-based OS's only the python3 package has support for installing pip via the package manager), this PR adds a way for pip to be installed via ensurepip (disabled by default).

Before/After Comparison

Before

If an alternative python interpreter is needed, we would use update-alternatives so it would become the system's default interpreter.

After

A python binary would be specified and used directly.

Clerical Stuff

This closes #25 and will fix #21 .

Relates to JIRA: RPOPC-250
Relates to JIRA: RPOPC-251

@kdvalin kdvalin requested a review from a team April 1, 2025 15:23
Copy link

github-actions bot commented Apr 1, 2025

This relates to RPOPC-250

Copy link
Contributor

@dvalinrh dvalinrh left a comment

Choose a reason for hiding this comment

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

LGTM

@dvalinrh dvalinrh added the group_review_lgtm Indicates approval after a group review meeting label Apr 22, 2025
@kdvalin kdvalin merged commit cd75e9b into main Apr 22, 2025
2 checks passed
@kdvalin kdvalin deleted the feat/python-binary branch April 22, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group_review_lgtm Indicates approval after a group review meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid Using update-alternative --python_exec updates wrong alternative
2 participants