-
-
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
Cygwin and msys2 bash activator compatibility #1940
Comments
c:\...
I am also having this issue. I would be glad to submit a PR if someone could help point me in the right direction. It seems like the creator is correctly building the virtualenv, but we need to modify the path only for setting the VIRTUAL_ENV in the activate script. |
You probably want to massage around here https://github.com/pypa/virtualenv/blob/master/src/virtualenv/activation/via_template.py#L36-L39 |
Closes #1940. In cygwin and MSYS2, the path is in POSIX format. This PR converts the Windows path to POSIX format using a regex so that it is added to the bash activation script in the correct format.
Issue
Run the following via msys2:
The content of
/tmp/tmp.uw7eZfvJIO/Scripts/activate
containsVIRTUAL_ENV='C:\tools\msys64\tmp\tmp.uw7eZfvJIO'
, but it's expected to beVIRTUAL_ENV='/c/tools/msys64/tmp/tmp.uw7eZfvJIO'
, thus it can't locatepython
.I believe the legacy version handles this correctly here:
virtualenv/virtualenv.py
Lines 1742 to 1748 in 4c9899f
which contains:
VIRTUAL_ENV="$(if [ "$OSTYPE" "==" "cygwin" ]; then cygpath -u 'C:\tools\msys64\tmp\tmp.uw7eZfvJIO'; else echo '/C/tools/msys64/tmp/tmp.uw7eZfvJIO'; fi;)"
Environment
Provide at least:
The text was updated successfully, but these errors were encountered: