classification
Title: distutils.util.convert_path mangles windows paths with forward slashes
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: LordAro, dstufft, eric.araujo, steve.dower
Priority: normal Keywords:

Created on 2019-05-01 14:01 by LordAro, last changed 2021-02-03 18:11 by steve.dower. This issue is now closed.

Messages (2)
msg341197 - (view) Author: Charles P (LordAro) * Date: 2019-05-01 14:01
https://github.com/python/cpython/blob/master/Lib/distutils/util.py#L106-L131

Due to the split('/') and os.path.join(), this function converts an absolute path of the form "C:/foobar" into a relative "C:foobar", which is likely to be entirely different

Usecase:

pip install --prefix=/home/charles/python foobar

within an MSYS2 terminal automagically converts the path to C:/Users/charles/python for some reason or another, but it's not exactly uncommon for users to use forward slashes on Windows regardless

I'm not entirely sure what the correct fix would be here, or even if it should be fixed at a higher level - in setuptools or pip
msg386292 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:11
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools
History
Date User Action Args
2021-02-03 18:11:00steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386292

resolution: out of date
stage: resolved
2019-05-01 14:01:56LordArocreate