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

Include pyenv and Python 3.9 to 3.12 in the kitchen sink image #232

Merged
merged 10 commits into from
Aug 26, 2024

Conversation

julienp
Copy link
Contributor

@julienp julienp commented Jul 31, 2024

Use pyenv to install Python 3.9 to 3.12 in the image. The default version remains 3.9.

This is enough to make .python-version files work when they match the preinstalled versions, however it will fail to run python if the user specifies a patch version that is not installed, for example 3.9.0 (note that leaving out the patch version works, for example 3.9). We need to include support for installing these versions on demand in pulumi install.

Ref #222

Fixes #232
Fixes #222

@julienp julienp changed the title Include Python 3.9 to 3.12 in the kitchen sink Include pyenv and Python 3.9 to 3.12 in the kitchen sink image Jul 31, 2024
julienp added a commit to pulumi/pulumi that referenced this pull request Aug 1, 2024
We use pyenv to support python version selection inside docker
containers. To enable pyenv support, we need:

 * pyenv installed
 * .python-version file in the current directory or any of its parents
 * PULUMI_LANGUAGE_VERSION_FILES environment variable set to true

See pulumi/pulumi-docker-containers#232
julienp added a commit to pulumi/pulumi that referenced this pull request Aug 9, 2024
We use pyenv to support python version selection inside docker
containers. To enable pyenv support, we need:

 * pyenv installed
 * .python-version file in the current directory or any of its parents
 * PULUMI_LANGUAGE_VERSION_FILES environment variable set to true

See pulumi/pulumi-docker-containers#232
github-merge-queue bot pushed a commit to pulumi/pulumi that referenced this pull request Aug 19, 2024
Adds the flag `--use-language-version-tools` to `pulumi install`. When
passed, and `pyenv` is installed, and a `.python-version` file is in the
project directory or any of its parent directories, Pulumi will install
the requested python version if it is not already installed.

`LanguageRuntime.InstallDependencies` now takes a struct
`InstallDependenciesRequest` as argument to make it easier to extend
this call with options.

See pulumi/pulumi-docker-containers#232

---------

Co-authored-by: Thomas Gummerer <[email protected]>
docker/pulumi/Dockerfile Outdated Show resolved Hide resolved
docker/pulumi/Dockerfile Outdated Show resolved Hide resolved
Use pyenv to install Python 3.9 to 3.12 in the image. The default
version remains 3.9.

Once the `pulumi install` command understands .python-version files,
this will allow users to pick the Python version.
@julienp julienp force-pushed the julienp/pyenv branch 2 times, most recently from 38dc8c9 to c4fa4e9 Compare August 20, 2024 17:38
docker/pulumi/Dockerfile Outdated Show resolved Hide resolved
@julienp julienp requested a review from a team August 23, 2024 08:46
@julienp julienp marked this pull request as ready for review August 26, 2024 07:53
@julienp julienp merged commit 91e4378 into main Aug 26, 2024
28 checks passed
@julienp julienp deleted the julienp/pyenv branch August 26, 2024 10:49
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.

Make python version selectable with a .python-version file
2 participants