summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJimmy Tang <jtang@tchpc.tcd.ie>2013-03-02 14:38:02 +0000
committerJimmy Tang <jtang@tchpc.tcd.ie>2013-03-02 14:38:02 +0000
commit785068df63dcb398b5b67663827d30ba26daf560 (patch)
tree8d02a565f4b4de0e0a09525202ec5d97e3db98b4 /Makefile
parent43ce2caa4fb94a686eec17c915255e47e35b0c4b (diff)
downloadansible-785068df63dcb398b5b67663827d30ba26daf560.tar.gz
Teach makefile to accept different versions of python
This commit makes the Makefile nicer for packagers so they can select versions of python. E.g. on a RHEL5 system with Python2.6 (installed from EPEL) make PYTHON=python2.6 install
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0d39dc1e37..79eef5cbf9 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,8 @@ ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $<
ASCII2HTMLMAN = a2x -D docs/html/man/ -d manpage -f xhtml
MANPAGES := docs/man/man1/ansible.1 docs/man/man1/ansible-playbook.1 docs/man/man1/ansible-pull.1 docs/man/man1/ansible-doc.1
-SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+PYTHON=python
+SITELIB = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
# VERSION file provides one place to update the software version
VERSION := $(shell cat VERSION)
@@ -114,13 +115,13 @@ clean:
rm -rf docs/js
python:
- python setup.py build
+ $(PYTHON) setup.py build
install:
- python setup.py install
+ $(PYTHON) setup.py install
sdist: clean docs
- python setup.py sdist -t MANIFEST.in
+ $(PYTHON) setup.py sdist -t MANIFEST.in
rpmcommon: sdist
@mkdir -p rpm-build