diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2021-11-17 13:14:10 -0800 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2021-11-17 13:14:30 -0800 |
commit | 63270710f13af10808aac980795128db127153f5 (patch) | |
tree | 47543066b122486ffb6e2c3b150c20906caf54bd /libcxx/src/algorithm.cpp | |
parent | 95741660b4938a0f6f9effd8575d1e0fe77bfbed (diff) | |
download | llvm-63270710f13af10808aac980795128db127153f5.zip llvm-63270710f13af10808aac980795128db127153f5.tar.gz llvm-63270710f13af10808aac980795128db127153f5.tar.bz2 |
[lldb] remove usage of distutils, fix python path on debian/ubuntu
distutils is deprecated and will be removed, so we shouldn't be
using it.
We were using it to compute LLDB_PYTHON_RELATIVE_PATH.
Discussing a similar issue
[at python.org](https://bugs.python.org/issue41282), Filipe LaĆns said:
If you are relying on the value of distutils.sysconfig.get_python_lib()
as you shown in your system, you probably don't want to. That
directory (dist-packages) should be for Debian provided packages
only, so moving to sysconfig.get_path() would be a good thing,
as it has the correct value for user installed packages on your
system.
So I propose using a relative path from `sys.prefix` to
`sysconfig.get_path("platlib")` instead.
On Mac and windows, this results in the same paths as we had before,
which are `lib/python3.9/site-packages` and `Lib\site-packages`,
respectively.
On ubuntu however, this will change the path from
`lib/python3/dist-packages` to `lib/python3.9/site-packages`.
This change seems to be correct, as Filipe said above, `dist-packages`
belongs to the distribution, not us.
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D114106
Diffstat (limited to 'libcxx/src/algorithm.cpp')
0 files changed, 0 insertions, 0 deletions