tuned/tuned-2.19.0-python312-fix.patch
Jaroslav Škarvada cd5f1654b0 added fix for python-3.12
resolves: rhbz#2154801
2023-01-12 14:48:35 +01:00

14 lines
536 B
Diff

diff --git a/Makefile b/Makefile
index 8f83a44..d60aeb2 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ ifeq ($(PYTHON),python2)
PYLINT = pylint-2
endif
SHEBANG_REWRITE_REGEX= '1s|^\#!/usr/bin/\<python3\>|\#!$(PYTHON)|'
-PYTHON_SITELIB = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib());')
+PYTHON_SITELIB = $(shell $(PYTHON) -c 'from sysconfig import get_path; print(get_path("purelib"));')
ifeq ($(PYTHON_SITELIB),)
$(error Failed to determine python library directory)
endif