-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
Add new --python3 flag to st2 pack install CLI command #4016
Conversation
When this parameter is True, python3 binary is used when creating a virtual environment for a pack.
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.
I'd rather python3
be python_version
, but it's not a blocker. Meaning I'd rather this code be able to handle future versions of python too with minimal changes...but I don't know the likelihood of that being a thing.
@bigmstone Yeah that might change in the future when whole StackStorm platform supports and runs under Python 3 :) |
actionrunner.python3_binary config option.
@tonybaloney Hopefully this PR will work as a good compromise until we have the whole platform to run on Python 3 :) |
👍 |
…m:StackStorm/st2 into pack_install_use_python3_binary_parameter
This pull request adds new
--python3
flag to `st2 pack install`` command.When this flag is provided, virtual environment which is created for a pack uses python3 binary (based on the value of
actionrunner.python3_binary
config option).Underneath, it adds
python3
parameter topacks.{install,setup_virtualenv}
actions.This pull request builds on top of @tonybaloney's idea in #3922.
We couldn't come up to a consensus in that PR. I thought that approach in that PR is still a bit too invasive until we have CI, etc. in place for packs so we can verify end to end that pack also (or only) works with Python 3.
This pull request goes with a more incremental middle of the ground opt-in approach. If user wishes to use Python 3 for a particular pack they can opt-in. And if things don't go well (stuff doesn't work under Python 3), they can easily recreate virtualenv / reinstall pack with default Python 2 binary.
In the future, we can also build on top of this approach and perhaps utilize
pack.yaml
metadata attribute to signal if pack additionally / only works with Python 3 as suggested in #3922.TODO