-
Notifications
You must be signed in to change notification settings - Fork 133
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
pyenv integration #141
Comments
Doesn't pipenv suggest the use of pipsi to do its installation? Isn't that a bit like a chicken and egg problem? Also pipenv is all for developers and managing dependencies, whereas pipsi is about installing a tool and making it available in a stable bin path with managed virtualenvs. You don't need 90% of what pipenv provides in pipsi. |
@bertjwregeer that's a good point. Now you mention it, I think I got carried away getting to Does that sound a little more sensible? |
I just came across this thinking that I'd be able to type/think less in the future if |
@bertjwregeer @jamesstidard I don't think it's a chicken/egg problem.
I personally think Pyenv, Pipsi, and Pipenv serve different purposes and should be installed as "siblings". One manages Python installations, another is a secondary package manager for system-wide Python applications, and the third is a virtual environment manager. All three are "top-level" in my mind, just below the system package manager in terms of management authority. |
pyenv integration is tricky - it needs support in both the package and the installer + a new release - im not familiar with pyenv myself and dont use it |
@RonnyPfannschmidt what do you mean by that? Currently you have: Lines 310 to 316 in 16b6820
In this case you would change it to something like if isinstance(python, int):
python_version = python
python_exe = get_executable_name(python_version)
python = get_executable_path(python_exe)
if not python:
raise ValueError('Can not find {} in PATH'.format(python_exe))
elif python == 'auto':
python_version = get_minimum_python_version(package)
executable_name = get_executable_name(python_version)
python = get_executable_path(executable_name)
elif python and PYENV_INSTALLED:
pyenv = Pyenv()
pyenv_installed = pyenv.list_installed()
if not check_if_in_path(python) and python not in pyenv_installed:
pyenv.install(python, ask_confirmation=True)
python = pyenv_installed[python].get_path()
else:
python = sys.executable Pyenv is just shell scripts. The hardest part would be writing wrapper methods to that parse its output. |
i wouldn't change it at all since i'm not at all fluent in pyenv and dont use it myself - this has to come from someone that knows the details enough not to make a broken mess |
That's fine. When I have some more time maybe I can experiment with this. I will have to figure out testing, I've never written any tests for a piece of software like this before. |
I currently use
pyenv
andpipenv
on my machine to manage python versions and package dependencies - I assume people that usepipsi
are quite likely to do the same. I feel like it would be nice to build the virtual environment for installed packages usingpipenv
- if it's present on the system.pipenv
already has an integration withpyenv
where it'll download the python interpreter viapyenv
, if it's not already. Currently you can specify a specific python interpreter with--python
, but before this you need to:pyenv
--python
argumentI think by using
pipenv
to create the virtual environment on install and updatepipsi
could remove those steps as well as automatically upgrade python interpreters for each application as a package owner depreciates them.Would there be anything inherently sinful about this feature? I'm happy to have a go at implementing this if this seems like a feature
pipsi
would benefit from.The text was updated successfully, but these errors were encountered: