-
Notifications
You must be signed in to change notification settings - Fork 386
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
WIP: [python] Introduce packages
option
#768
base: main
Are you sure you want to change the base?
WIP: [python] Introduce packages
option
#768
Conversation
- Create `utils.sh` files; - Move `sudo_if` to utils.sh`; - Replace `install_user_package` with `install_python_package` and move function to utils.sh`; - Add logic to handle `packages` input;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks amazing, thanks for adding the new Feature option. Left some minor comments.
@@ -22,6 +22,11 @@ | |||
"default": "os-provided", | |||
"description": "Select a Python version to install." | |||
}, | |||
"additionalVersions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We intentionally did not publicize this option just because it was experimental. Also, it was meant only to be used by universal
image.
However, if it works great in different test scenarios then it is worth publicizing 🎉
* install gpg2.22 on centos 7 when installing python * RHEL support, exisiting tests pass, new RHEL tests pass. * add tests, cleanup install organization * update testing to include RHEL tests * update testing to include RHEL tests * undo addition of installing additional pip modules * fix errors installing os-provided Python on recent Debian systems and on Mariner systems * adjust to properly use newly installed python (PYTHON_SRC) instead of assuming "python" will work * When installing pipx, check if python is marked as externally managed. If so, add "--break-system-packages" to the pip install flags. This does not really breack system packages due to the setting of PYTHONUSERBASE during the install of pipx, but does get us past checks for installing python packages into the system python install. * merge from main * update check for managed python install. pass all tests. * add "packages" option from PR #768 * remove "packages" option * Address PR feedback, passes all tests locally. * fix install error on centos --------- Co-authored-by: Jeff Putsch <[email protected]>
General info
Feature name:
Attached related issue:
Description:
This PR introduces a new option -
packages
. The new option receives a comma-spread string as input. The input contains packages that should be installed during the feature installation process.User experience
The user can specify a package version that would be installed. Usage examples:
Example 1:
Note: In this example, the feature installs the latest versions available in PIP.
Example 2:
Note: In this case, the feature install versions were explicitly pointed out in the
devcontainer.json
.Installation process
The feature already contains the
install_user_package
function. Considering new functionality, the function should be updated, and the installation process should be split into two steps:The installation folder will be resolved based on the user under which the feature is installed:
site-packages
folder;site-packages
folder;Changelog
Added info about
packages
andadditionalVersions
inputs;Introduced the
packages
option:packages
input;install_python_package
function to replace theinstall_user_package
function;sudo_if
function moved to theutils.sh
file;Added tests to cover new functionality;
Checklist: