-
Notifications
You must be signed in to change notification settings - Fork 2.4k
utils/envs: fix envs in MSYS2 always broken #3713
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -879,9 +879,13 @@ class Env(object): | |||||||||||
|
|
||||||||||||
| def __init__(self, path: Path, base: Optional[Path] = None) -> None: | ||||||||||||
| self._is_windows = sys.platform == "win32" | ||||||||||||
| self._is_mingw = sysconfig.get_platform() == "mingw" | ||||||||||||
|
|
||||||||||||
| if not self._is_windows or self._is_mingw: | ||||||||||||
| bin_dir = "bin" | ||||||||||||
| else: | ||||||||||||
| bin_dir = "Scripts" | ||||||||||||
|
Comment on lines
+884
to
+887
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Would this be slightly better maintainable considering we only care about exceptions?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't work:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given msys seems to only patch |
||||||||||||
| self._path = path | ||||||||||||
| bin_dir = "bin" if not self._is_windows else "Scripts" | ||||||||||||
| self._bin_dir = self._path / bin_dir | ||||||||||||
|
|
||||||||||||
| self._base = base or path | ||||||||||||
|
|
||||||||||||
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.
This should work here, right? Would be good to keep the usage consistent. I am not too familiar with using mingw, would be good to get a confirmation.
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.
@abn Thanks for the review, I really appreciate it!
No that won't work: