[PATCH evemu 01/11] Make it possible to overwrite python binary via env

Daniel Martin consume.noise at gmail.com
Thu Jan 2 13:47:51 PST 2014


This makes it possible to overwrite the python binary to use via the
environment variable PYTHON.

That's usefull when testing the code with different python binaries,
i.e.:
    PYTHON=/usr/bin/python2.7 ./configure
or
    make PYTHON=/usr/bin/python3.3 check

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
 python/evemu-test-runner.in | 4 +++-
 src/Makefile.am             | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/python/evemu-test-runner.in b/python/evemu-test-runner.in
index 2d5d28c..cec3801 100644
--- a/python/evemu-test-runner.in
+++ b/python/evemu-test-runner.in
@@ -1,4 +1,6 @@
 #!/bin/sh
 
-PYTHONPATH=@builddir@:@srcdir@ LD_LIBRARY_PATH=@top_builddir@/src/.libs @python@ -m evemu.testing.runner
+PYTHON=${PYTHON:- at python@}
+
+PYTHONPATH=@builddir@:@srcdir@ LD_LIBRARY_PATH=@top_builddir@/src/.libs $PYTHON -m evemu.testing.runner
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 45f0ec3..9d30e30 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -21,7 +21,7 @@ libevemuincludedir = $(includedir)
 libevemuinclude_HEADERS = evemu.h
 
 event_names.py: Makefile make-event-names.py
-	$(srcdir)/make-event-names.py --output=python > $@
+	$(PYTHON) $(srcdir)/make-event-names.py --output=python > $@
 
 EXTRA_DIST = $(version_script) make-event-names.py convert-old-dumps-to-1.1.py
 CLEANFILES = event_names.py event_names.pyc
-- 
1.8.5.2



More information about the Input-tools mailing list