-
Notifications
You must be signed in to change notification settings - Fork 89
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
adapt to win32 Lib path. #124
base: master
Are you sure you want to change the base?
Conversation
Lib path of windows is different to others. virtualenv.path_locations() is useful for this. - win32 => "$VIRTUALENV_HOME/Lib/site-package" - others => "$VIRTUALENV_HOME/lib/pythonXX.X/site-package"
Hi, I like the idea of It looks like making win32 version of path can be done in one line. So why not do it without virtualenv? |
Actually, in environment which has not installed virtualenv, VIRTUAL_ENV is not set and add_virtualenv_path() returns before execute "import virturlenv". |
Consider this
|
sorry, I cannot image "/usr/bin/python -m virtualenv" => "No module named virtualenv". I think, before you create "/home/tkf/.virtualenvs/SOME-ENVIRONMENT", And to use virtualenv command, it is need to do "easy_install virtualenv" on "/usr/bin/python" environment. Following that way, "/usr/bin/python -m virtualenv" is callable. Another way to create ".virtualenvs/SOME-ENVIRONMENT" is by not using virtualenv command, (= manualy). |
Then read my comment by replacing |
another thing to consider: Is it a public Python API of virtualenv? |
virtualenv.pathlocations() is public. code of virtualenv.pathlocations():: I think, if there is virtualenv environment, we can assume virtualenv is installed on its parental python enviroment... virtualenv.path_locations's Lib-path treatment is better. If it is important to imprement without virtualenv library, |
Considering Pythonista's obsession about documentation, I'd say it's not public API if you can't find a documentation. Do you find one? I am not afraid of using internal API for testing. For production... that's a bit scary (though sometimes it's OK since "practicality beats purity").
I've been explaining the case you are using non-"parental" python executable to run jediepcserver.py. Consider:
This causes an import error, right? |
I've got understand. |
Is it ok to copy/paste from virtualenv.path_locations()'s code ? |
Ah, I guess we just have to add virtualenv to requirements.txt. Then we can always import virtualenv like you do and it's cleaner. The only concern is if it is public or not. If not... we should wrap it by |
Lib path of windows is different to others.
virtualenv.path_locations() is useful for this.