Closed andrewgross closed 8 years ago
So, to find the path to where the package sits, we use:
imp.find_module(get_package_name(pkg_path))[1]
--
find module SHOULD be able to handle wherever the virtualenv is (at least that's what I thought...)
Was it breaking for you?
I was looking at https://github.com/shaunvxc/envy/blob/master/envy/application.py#L46
Ah good point. Question though, is WORKON_HOME tied to .virtualenv wrapper? (obviously my current approach also assumes this sort of convention). I wonder if there is a better check we can make..?
@andrewgross do you think looking up in os.environ
would be reliable?
i.e.:
if 'VIRTUAL_ENV' in os.environ:
return os.environ['VIRTUAL_ENV'].split('/')[-1]`
else:
# default to the current check
@andrewgross version 0.0.6 (see 28e399cff74d7bf346a4c912bff9113555305726) should handle your case
Awesome, thanks!
Andrew Gross andrew.w.gross@gmail.com
On Thu, Feb 25, 2016 at 1:30 AM, Shaun Viguerie notifications@github.com wrote:
Closed #1 https://github.com/shaunvxc/envy/issues/1.
— Reply to this email directly or view it on GitHub https://github.com/shaunvxc/envy/issues/1#event-565028739.
You can check the
WORKON_HOME
environmental variable to see where the virtualenvs should be managed from. For some strange reason I set mine to~/.envs
which makes things break from time to time.