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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup-env is looking in limited places for pyenv-virtualenv #243

Open
arcsector opened this issue May 17, 2023 · 0 comments
Open

setup-env is looking in limited places for pyenv-virtualenv #243

arcsector opened this issue May 17, 2023 · 0 comments
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use

Comments

@arcsector
Copy link
Contributor

馃悰 Summary

./setup-env script needs to look for pyenv-virtualenv in all places it's setup to be detected, not just the MacOS location.

To reproduce

Steps to reproduce the behavior:

  1. Install pyenv and pyenv-virtualenv on WSL2 as described in https://github.com/pyenv/pyenv and https://github.com/pyenv/pyenv-virtualenv, installing pyenv-virtualenv as a plugin as the docs describe
  2. Place necessary configs in ~/.bashrc and reload shell
  3. Attempt to run ./setup-env
  4. Observe the check for pyenv-virtualenv failing, even though one can run pyenv virtualenvs with a space just fine

Expected behavior

The check needs to detect the pyenv-virtualenv binary in the correct directory or check for the existence of pyenv virtualenv with a space instead. The easiest way to do this would be to check in the locations that pyenv-virtualenv describes to install it:

  1. $(pyenv root)/bin
  2. $(pyenv root)/plugins/pyenv-virtualenv/bin

You could also detail that users may need to symlink or otherwise add the plugin's bin to their path in their bashrc:

echo "export PATH="$PATH:$HOME/.pyenv/plugins/pyenv-virtualenv/bin" >> ~/.bashrc

Any helpful log output or screenshots

Output of setup-env test before adding to path:

> command -v pyenv-virtualenv

>

Output of setup-env test after adding to path:

> command -v pyenv-virtualenv
/home/user/.pyenv/plugins/pyenv-virtualenv/bin/pyenv-virtualenv
@dav3r dav3r added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
None yet
Development

No branches or pull requests

2 participants