From 5314aa9de818185af484cc35d4f23af33b78beb0 Mon Sep 17 00:00:00 2001 From: Aalind Tyagi <42896179+Squid5678@users.noreply.github.com> Date: Tue, 1 Oct 2024 19:18:05 -0400 Subject: [PATCH] Remove Dependency on Deprecated Disutils (#2281) updated files --- install/setup.bash | 2 +- install/setup.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/setup.bash b/install/setup.bash index b84bbe02bab..6e2b3722020 100755 --- a/install/setup.bash +++ b/install/setup.bash @@ -34,7 +34,7 @@ _pythonpath_add() { # No direct replacement for the command exists, and in Ubuntu 22.04, # this script will produce a warning about this. We may need to find a # replacement library in the future. -_PYTHON_LIB_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${_INSTALL_PATH}'))") +_PYTHON_LIB_PATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))") _pythonpath_add "${_PYTHON_LIB_PATH}" unset _PYTHON_LIB_PATH diff --git a/install/setup.zsh b/install/setup.zsh index 4d6b7f16a21..db45a72c353 100644 --- a/install/setup.zsh +++ b/install/setup.zsh @@ -30,7 +30,7 @@ _pythonpath_add() { fi } -_PYTHON_LIB_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${_INSTALL_PATH}'))") +_PYTHON_LIB_PATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))") _pythonpath_add "${_PYTHON_LIB_PATH}" unset _PYTHON_LIB_PATH