distutils has been deprecated in Python 3.12
baldurmen opened this issue · 3 comments
baldurmen commented
Hi!
Python 3.12 has dropped distutils
. This isn't the end of the world for whipper, as it's only used here:
https://github.com/whipper-team/whipper/blob/develop/whipper/command/main.py#L42-L45
Even so, this code will fail on 3.12 and should be replaced by something else.
MerlijnWajer commented
Seems like we can do this to replace get_python_lib
:
import sysconfig
sysconfig.get_path('platlib')
MerlijnWajer commented
That was added in Python 3.2, so we could probably just rely on it.
MerlijnWajer commented
Actually 'purelib' might be a better path/place for some of the plugins, but I haven't yet found a way to use /usr/local
through sysconfig
.