From abbecf450f367022a2848dc55c4e809e8d94d344 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Fri, 4 May 2012 17:18:46 +0200 Subject: Fix python Requires in Fedora 17 build When python's distutils build process prepares python scripts, it use current Python interpreter in an updated shebang for python scripts. Since Makefile did not use absolute path to python interpreter, it may be translated to "/bin/python" in Fedora 17 which is then taken by rpmbuild as freeipa-admintools dependency. This can break of F-17 python package which provides just "/usr/bin/python" This patch updates Makefile to use a correct absolute path to python interpreter which is then filled to freeipa scripts shebang and rpm Requires list. The value is taken from RPM __python macro so that we do not hardcode it. https://fedorahosted.org/freeipa/ticket/2727 --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 102559115..32a46cacb 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,8 @@ ifneq ($(DEVELOPER_MODE),0) LINT_OPTIONS=--no-fail endif +PYTHON ?= $(shell rpm -E %__python) + all: bootstrap-autogen server @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ @@ -74,9 +76,9 @@ client-install: client client-dirs done cd install/po && $(MAKE) install || exit 1; if [ "$(DESTDIR)" = "" ]; then \ - python setup-client.py install; \ + $(PYTHON) setup-client.py install; \ else \ - python setup-client.py install --root $(DESTDIR); \ + $(PYTHON) setup-client.py install --root $(DESTDIR); \ fi client-dirs: @@ -132,13 +134,13 @@ version-update: release-update fi server: version-update - python setup.py build + $(PYTHON) setup.py build server-install: server if [ "$(DESTDIR)" = "" ]; then \ - python setup.py install; \ + $(PYTHON) setup.py install; \ else \ - python setup.py install --root $(DESTDIR); \ + $(PYTHON) setup.py install --root $(DESTDIR); \ fi archive: -- cgit