-
-
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
Labels
Comments
gaborbernat
changed the title
On Windows using msys2, the bash Scripts/activate seems to be broken due to VIRTUAL_ENV starts with
Cygwin bash activator compatibility
Sep 12, 2020
c:\...
yilei
changed the title
Cygwin bash activator compatibility
Cygwin and msys2 bash activator compatibility
Sep 14, 2020
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 |
This was referenced Sep 22, 2020
gaborbernat
pushed a commit
that referenced
this issue
Sep 30, 2020
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.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: