-
-
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
Fix activation paths in cygwin using cygpath #1973
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1973 +/- ##
==========================================
+ Coverage 87.45% 89.70% +2.25%
==========================================
Files 174 87 -87
Lines 8496 4245 -4251
==========================================
- Hits 7430 3808 -3622
+ Misses 1066 437 -629
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to fix the CI
@@ -36,12 +36,8 @@ def replacements(self, creator, dest_folder): | |||
current_platform = sysconfig.get_platform() | |||
platforms = ["mingw", "cygwin", "msys"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move this variable inline, and make it a tuple? 😊 And end it with a coma to have each name on it's own line to make it merge friendly? Thanks!
virtual_env = "/" + match.group(1).lower() + match.group(2) | ||
else: | ||
virtual_env = str(creator.dest) | ||
code, out, err = run_cmd(["cygpath", str(creator.dest)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also use _ and __ for the variable names you don't need/use; though you should raise here in error if the code is not zero, not? with the out and error attached to the error
Per #1970 (comment) the regex we have works fine, the issue is different so we can save the subprocess call for now. |
Hi @gaborbernat @danyeaw, there are two issues here I think:
We are in group (2) unfortunately, so it's actually a bit difficult for me to test the change you made on this PR. I've tried installing some of the Cygwin Python packages, but it always seems to pick the main Windows Python interpreter when I run virtualenv, and I'm not too sure how to make it pick the Cygwin one. The change looks good to me though! I suspect you will need something like this to support other Cygwin folks, even if it doesn't work for us due to the second issue. |
This PR fixes #1969. It removes use of a regex to transform the path when using cygwin or MSYS2 and instead makes use of the cygpath utility.
@davidcoghlan would you be able to test in cygwin please?
Thanks for contributing, make sure you address all the checklists (for details on how see
development documentation)!
tox -e fix_lint
)docs/changelog
folder