tuned/tuned-2.10.0-makefile-full-python-path.patch
2018-07-10 17:08:26 +02:00

19 lines
626 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -30,12 +30,12 @@ VERSIONED_NAME = $(NAME)-$(VERSION)$(GIT_PSUFFIX)
SYSCONFDIR = /etc
DATADIR = /usr/share
DOCDIR = $(DATADIR)/doc/$(NAME)
-PYTHON = python3
+PYTHON = /usr/bin/python3
PYLINT = pylint-3
ifeq ($(PYTHON),python2)
PYLINT = pylint-2
endif
-SHEBANG_REWRITE_REGEX= '1s/^(\#!\/usr\/bin\/)\<python\>/\1$(PYTHON)/'
+SHEBANG_REWRITE_REGEX= '1s|^\#!/usr/bin/\<python\>|\#!$(PYTHON)|'
PYTHON_SITELIB = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib());')
ifeq ($(PYTHON_SITELIB),)
$(error Failed to determine python library directory)