-
-
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 does not point activate script to the correct path #11
Comments
sorry for the poor formatting....bitbucket tricked me again :(
|
And
|
I think it's a good idea, a patch would be great.
|
|
Here is a better version for bash:
And for (t)csh:
|
This is what I am using:
$BASH_SOURCE)))" or with the short options
|
And an option for those still using tcsh: set sourced=($_) |
I have made a pull request for this change (which implements the bash script only): |
For windows, in ACTIVATE_BAT you can replace:
with:
This is better than just setting it to |
Adding a reference to the newest issue #1067 related to this to help consolidate efforts on solving this half-decade old problem with the activation scripts. |
Using |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions. |
Using Ubuntu 10.04, --relocatable works if I directly invoke the python binary or the setuptools-generated scripts. However, bin/activate still reflects the old path:
This is because VIRTUAL_ENV is set to an absolute path in the script. Instead, this should be made relative when --relocatable is called.
Since the activate script must be sourced, it is a bit more complicated to get the path than just (e.g.)
dirname $0
. The following seems to work in bash:If this meets with your approval, Ian, I'm glad to write a patch.
The text was updated successfully, but these errors were encountered: