diff mbox series

rt-tests: Makefile: Use sysconfig instead of distutils for PYLIB

Message ID 20230214194023.30946-1-jkacur@redhat.com
State New
Headers show
Series rt-tests: Makefile: Use sysconfig instead of distutils for PYLIB | expand

Commit Message

John Kacur Feb. 14, 2023, 7:40 p.m. UTC
distutils is deprecated in python. Change the Makefile to use sysconfig
instead

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 4df61ece123b..14c141dd56ab 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@  CFLAGS ?= -Wall -Wno-nonnull -Wextra
 CPPFLAGS += -D_GNU_SOURCE -Isrc/include
 LDFLAGS ?=
 
-PYLIB  ?= $(shell python3 -c 'import distutils.sysconfig;  print (distutils.sysconfig.get_python_lib())')
+PYLIB  ?= $(shell python3 -c "import sysconfig;  print(sysconfig.get_path('platlib'))")
 
 # Check for errors, such as python3 not available
 ifeq (${PYLIB},)