installer icon indicating copy to clipboard operation
installer copied to clipboard

Expose a utility function to use for sysconfig/distutils paths+scheme handling like pip

Open pradyunsg opened this issue 3 years ago • 3 comments

xref: https://github.com/pypa/pip/issues/11585

Basically, the idea is to mimic the logic in pip's locations subpackage, and expose that via a single function to end users.

pradyunsg avatar Nov 09 '22 01:11 pradyunsg

Does the locations subpackage do anything other than handling vendor patching?

FFY00 avatar Nov 09 '22 01:11 FFY00

Yes.

See https://github.com/pypa/pip/blob/90f51db1a32592430f2e4f6fbb9efa7a3a249423/src/pip/_internal/locations/_sysconfig.py#L124 and the distutils equivalent for some of the details.

There's also logic to handle the underlying sysconfig/distutils migration, which may be worth mirroring here (depending on how complex that would be).

pradyunsg avatar Nov 09 '22 01:11 pradyunsg

From #146, we should probably also expose this in the CLI.

pradyunsg avatar May 29 '23 18:05 pradyunsg