[issue38583] The activate script in Windows is not correct for venvs created in git-bash
Steve Dower
report at bugs.python.org
Fri Oct 25 16:06:48 EDT 2019
Steve Dower <steve.dower at python.org> added the comment:
I agree this would be better, though it may not be that easy to do.
If you're running Windows Python from WSL, then your "bash style" path should be "/mnt/c/some/path", not "/c/some/path". So the answer isn't as simple as .replace('\\', '/').
I did some quick testing with posixpath and pathlib and neither has an obvious conversion from a Windows path to a POSIX path, though pathlib.PurePosixPath(pathlib.PureWindowsPath(p)) comes closest.
Perhaps the best approach here is to improve `activate` to determine its path when run, like we did for `activate.ps1`? Then we don't need to substitute the path in at creation time.
----------
versions: +Python 3.9 -Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38583>
_______________________________________
More information about the Python-bugs-list
mailing list