clarete / curdling

Concurrent package manager for Python
http://clarete.li/curdling
GNU General Public License v3.0
276 stars 19 forks source link

globally installed curdling should be able to install things inside of a virtual env #27

Open gabrielfalcao opened 11 years ago

gabrielfalcao commented 11 years ago

How to reproduce:

# install curdling globally (outside of any venv)
# install virtualenvwrapper
change the $HOME/.virtualenvs/postmkvirtualenv to do: curd install curdling
mkvirtualenv foobar
which curd  # should return $HOME/.virtualenvs/foobar/bin/curd but actually points to
# /usr/local/bin/curd
ionelmc commented 11 years ago

This is very annoying, it should be fixed somehow. However, virtualenv bundles a sdist of pip - it is not reusing the globally installed one.

clarete commented 11 years ago

So, it's kinda hard to fix this issue.

That's why we actually have virtualenv anyway. To change the place python reads the installed packages, virtualenv has to have its own python binary because there's a check for the os.py module inside of the C source that determines if you're in the right import path or not.

It's crazy but that's how python works and that's why virtualenv exists. We could certainly find a workaround for that, but besides that, I'll keep marching towards the gates of the import system and extend that part to work better with multiple environments.

That's actually an old idea in my mind that starts to make even more sense now that use cases are so outstanding.

Thank you guys for coming up with such an important issue.

Thank you @gabrielfalcao for just providing us a workaround for this problem. I'll add that to the main documentation website.

rafaelcaricio commented 10 years ago

Could you post the link for the workaround provided by @gabrielfalcao ?