summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-05-04 17:18:46 +0200
committerMartin Kosek <mkosek@redhat.com>2012-05-15 10:43:39 +0200
commitabbecf450f367022a2848dc55c4e809e8d94d344 (patch)
treeb9dc137e0d0ab79a33d017e58c3f6dccd79e42e5 /Makefile
parent4640f957ade4615972a9b857a8f2e1b97e524d01 (diff)
downloadfreeipa-abbecf450f367022a2848dc55c4e809e8d94d344.tar.gz
freeipa-abbecf450f367022a2848dc55c4e809e8d94d344.tar.xz
freeipa-abbecf450f367022a2848dc55c4e809e8d94d344.zip
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
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: