pyenv icon indicating copy to clipboard operation
pyenv copied to clipboard

Separate installation and initialization in `pyenv_user_install` resource

Open tilne opened this issue 5 years ago • 6 comments

:person_frowning: Problem Statement

The installation and activation of pyenv_user_install resources is currently inseparable. This makes it impossible to create an environment without also activating it.

:grey_question: Possible Solution

The pyenv_user_install resource should have an attribute (something along the lines of activate?) that can be used to prevent activation of the newly created resource.

tilne avatar Feb 05 '20 01:02 tilne

Could you PR this new property in with the default being to keep existing behaviour,

At some point in future we should split them out but that is more work

xorima avatar Feb 05 '20 13:02 xorima

@Xorima sure.

tilne avatar Feb 05 '20 15:02 tilne

Are you still open to the idea of this change? How long would it take from submitting a PR to releasing a new version containing the change?

tilne avatar Jun 03 '20 20:06 tilne

after merge about 10 mins if myself or another board member.

I don't like waiting for the change to go live.

xorima avatar Jun 04 '20 13:06 xorima

Could you explain what you mean by activate a resource? I've mostly seen activate used with regard to virtual environments. The resource does a pyenv init, but so does the installed pyenv.sh script in /etc/profile.d. It's not clear what is wanted here.

MarkGibbons avatar Jul 26 '20 17:07 MarkGibbons

My guess @MarkGibbons is that creation of a python environment and activation of that virtual env should be split in some form?

@tilne Can you confirm if I am inline with what you want?

xorima avatar Jul 27 '20 09:07 xorima