`pipsi` depends on an external `virtualenv` even after bootstrapping
#89 aperta il 20 gen 2017
Metriche repository
- Star
- (1994 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Problem
pipsi depends on an external virtualenv even after bootstrapping which means it's not fully encapsulated in its virtualenv.
Possible Solutions
- Have
pipsisymlink itsvirtualenvinto thebin_dir. - Have
pipsiuse a cross-platform wrapper to activate thevirtualenvwhen running a linked script. (activate-wrapper) - Have
pipsispecifically look up its ownvirtualenv. (pipsi-virtualenv)
I'd be happy to work on an implementation of any desired solution.
Context
I tried to install pipsi but the system python didn't have virtualenv,
$ curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2805 100 2805 0 0 5000 0 --:--:-- --:--:-- --:--:-- 20326
Installing pipsi
You need to have virtualenv installed to bootstrap pipsi.
I use pyenv so I don't "pollute" the system interpreter so I switch to my Python 2.7,
$ pyenv shell 2.7.12
$ curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python
...
pipsi is now installed.
It seems like the goal of pipsi is it make self-contained installations so at this point I would expect pipsi to no longer depend on an external virtualenv; however, it does,
$ pyenv shell system
$ ls ~/.local/venvs/pipsi/bin/virtualenv
/home/nnutter/.local/venvs/pipsi/bin/virtualenv
$ pipsi install X
pyenv: virtualenv: command not found
The `virtualenv' command exists in these Python versions:
2.7.12
3.5.1
Failed to create virtualenv. Aborting.
A really simple solution would be to have pipsi symlink its virtualenv into the bin_dir.
Edit 2017-01-20: Edited to add two additional solutions. Added links to example branches.