Skip to content
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 Python version modularity in venv scripts #1504

Merged
merged 5 commits into from
Dec 11, 2022
Merged

Add Python version modularity in venv scripts #1504

merged 5 commits into from
Dec 11, 2022

Conversation

charlesbvll
Copy link
Member

What does this implement/fix? Explain your changes.

The dev/venv-create.sh and baselines/dev/venv-create.sh scripts didn't work with versions of Python that were not 3.7.12. Now the scripts will also install the right Python version through pyenv install $version before creating the virtual environment.

By default the Python version used is 3.7.12, but an other version can be given as argument of the script, for example :

./dev/create-venv.sh 3.8.10 will create the virtual environment flower-3.8.10 using Python 3.8.10.

Note that the dev/venv-delete.sh and baselines/dev/venv-delete.sh will work in the same fashion. By default, it will delete the virtual environment that is using Python 3.7.12 but an argument can be given to delete a virtual environment that uses another version. If we continue with our previous example,

./dev/delete-venv.sh 3.8.10 will delete the virtual environment flower-3.8.10 that we created with the previous command.

Any other comments?

This page of the docs would need to be updated accordingly (even though the changes shouldn't break the explained steps) .

Copy link
Member

@tanertopal tanertopal left a comment

Choose a reason for hiding this comment

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

@charlesbvll I like it! I just suggested adding two comments so it's easier to understand what's happening. We can merge it after you apply the suggested changes. Feel free to rewrite the comments, though.

baselines/dev/venv-create.sh Show resolved Hide resolved
dev/venv-create.sh Show resolved Hide resolved
charlesbvll and others added 3 commits December 11, 2022 19:04
Co-authored-by: Taner Topal <taner@adap.com>
Co-authored-by: Taner Topal <taner@adap.com>
@danieljanes danieljanes enabled auto-merge (squash) December 11, 2022 19:19
@danieljanes danieljanes merged commit dcd6657 into main Dec 11, 2022
@danieljanes danieljanes deleted the venv_script branch December 11, 2022 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants