-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
relocatable activate for bash, dash, zsh, ksh, fish, Windows #236
Conversation
Wow this is exactly what I need for one of my project when will this make it in to the official dev branch? |
I'm really not a fan of this. I don't like One of the most difficult bits of keeping virtualenv maintained is maintaining all of the activation scripts. I'd like to be finding ways to simplify them, but this does the opposite - it makes them significantly more complex and makes it harder to verify their correctness. I guess in the end I'm a -0 here. I'm not going to merge it, but I won't stand in the way if @jezdez wants to. |
I should have also added that regardless, I very much appreciate the contribution and the time that went into it! Thank you. |
Thanks. I actually agree fully that the activate.sh stuff is messy (Windows and fish were pretty straightforward). I was hoping there was a nice portable solution, but it seems every shell handles it differently, which is a shame. I have a specific case where I have a need for relocatable, but normally I don't use it either. Still these changes should be transparent if you are NOT using the relocatable stuff. |
Yeah, they should be transparent, but just the added complexity alone worries me - I don't know what other bugs we might be introducing that we won't find out about until later, or maintenance difficulties down the road. Interested to know what @jezdez thinks. |
Yeah, I agree with @carljm that the complexity of the activation scripts is bothersome. |
Here is another suggestion for making activate.bat more relocatable: virtualenv.py | 9 +++++---- diff --git a/virtualenv.py b/virtualenv.py ##file activate.bat ##file deactivate.bat if not defined PROMPT ( set _OLD_VIRTUAL_PROMPT=%PROMPT% if defined PYTHONHOME ( |
Can you ensure this is mergeable and I'll take another look. |
Any traction on this? |
+1 |
+1 for this feature, it is very useful when you need to copy the virtual environment to another directory. |
I'm with @carljm I'm afraid. I don't like |
+1 |
It's really uncomfortable that this fairly complex behavioral change doesn't necessitate any changes to the test suite =/ |
@bukzor you could call the test suite fairly non-existent atm, which is why :( |
d33e617
to
1682ed6
Compare
+1 |
Hello! As part of an effort to ease the contribution process and adopt a more standard workflow pip has switched to doing development on the If you do nothing, this Pull Request will be automatically closed by @BrownTruck since it cannot be merged. If this pull request is still valid, please rebase it against If you choose to rebase/merge and resubmit this Pull Request, here is an example message that you can copy and paste:
|
This Pull Request was closed because it cannot be automatically reparented to the Please feel free to re-open it or re-submit it if it is still valid and you have rebased it onto |
Updated activate.bat, activate.fish, and activate.sh that set VIRTUAL_ENV based on where the the activate.* file is sourced or executed from.
See: #11
Also contains tempfile -> mktemp change from #8 since I needed to in order to verify the activate.fish change.