pyenv / pyenv-installer

This tool is used to install `pyenv` and friends.
MIT License
3.96k stars 428 forks source link

Installation of specific version of pyenv #120

Closed Valt25 closed 2 years ago

Valt25 commented 2 years ago

Prelude

Our CI process use pre-built image with pyenv installed. Lucky we have no need to rebuild that image for half a year.

Problem

But this week I have need to make some minor changes in build-script, and after success build, I can not use that image, because pyenv have not been installed properly.

As I found out, it was because we have used installer to install pyenv: curl https://pyenv.run | bash

It is similar problem to: https://github.com/pyenv/pyenv-installer/issues/112 https://github.com/pyenv/pyenv-installer/issues/103

And simple fix was to add some path to PATH)

Key problem

But the key problem is that installer use last version of installer to install last version of pyenv. For half a year last version have been changed and installation process have follow it. It is ok for any product to develop, even with breaking changes.

Questions and discussion

It is not ok, depends on last commit in repository of one of several dependencies. In that case reproducability restricted by time between 2 breaking changes commits.

So my question is how can I install specific version of pyenv?

One of ad-hoc solution i have asked on stackoverflow: https://stackoverflow.com/questions/69887414/how-can-i-install-specific-version-of-pyenv/69888820#69888820

If there is no way to install specific version of pyenv using pyenv-installer(or even specific version of installer), then let this issue would be a start of disscussion wheather it is really necessary feature?

native-api commented 2 years ago

You can install any commit of Pyenv via a Git checkout.

Valt25 commented 2 years ago

You can install any commit of Pyenv via a Git checkout.

Yes, that is working solution, but in that case I can use out-of-the-box pyenv-installer