-
Notifications
You must be signed in to change notification settings - Fork 106
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
Make mkvirtualenv WORKON_HOME environment variable aware #21
Comments
How do you know it's only
Apparently it's because it works by modifying shebang line which is not normally supported on Windows (unless you install pylauncher). I guess we should first ask what's the reason |
It would be much easier if the You'll see in my code for Modifying the first few lines via search & replace sounds like a fun DOS batch script homework assignment. Let me know if you find a solution! Feel free to submit a pull request if you figure out a good way to do this! |
Was the above answer directed to me or the OP? |
OP. I haven't kept up on virtualenv on Windows. I wrote this project a long time ago and use Linux for pretty much all my programming now. |
Seems like this is was issue #49 in virtualenv (pypa/virtualenv#49), but is marked as closed. Would that address this issue? |
This will not work due to a bug in virtualenv - see pypa/virtualenv#9.
Nice find! Not by itself but it appears it's very much needed, yes. The problem with relocation is it's regarded as a misfeature by some of maintainers of virtualenv so I guess it's not high priority. |
@piotr-dobrogost VIRTUAL_ENV usage works fine, because I modify both Edit: I've removed the line that adds unsetting VIRTUAL_ENV in deactivate.bat because the 1.9.x branch of virtualenv now does this (Pitor added it). |
Update: --relocatable is still not yet working in virtualenv. See the latest comments in pypa/virtualenv#49 |
On a related note, what do you guys think of a directory-relative launcher? i.e. the system .py launcher would walk up the executed script's parent directories looking for a I think this would:
|
Relocatable isn't working with the latest virtualenv
Based on my reading of the virtualenv issues mentioning relocatable (https://github.com/pypa/virtualenv/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20relocatable) I wouldn't expect any support coming from that camp. I think the best thing we can do is implement #65 I'm closing this as a wontfix.. |
When creating a new virtual environment it creates an activate.bat file with a hardcoded pathname at the top:
This is because
WORKON_HOME
is set toC:\Dropbox\virtualenvs
. However on other machines Dropbox may be located elsewhere, for exampleF:\Dropbox\virtualenvs
, which breaks the activation script.Is it possible to change the virtualenv creation to use the environment variable instead? That is, change the above to:
The text was updated successfully, but these errors were encountered: