Skip to contentSkip to conversation

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

PATCH Superseded John Kacur 1 participant 1 message Feb 14, 2023 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

John Kacur

author
#0 lore raw

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

distutils is deprecated in python. Change the Makefile to use sysconfig instead

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 4df61ece123b..14c141dd56ab 100644
@@ -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},)
Signature · 1 line
2.39.1