summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rwxr-xr-xtest/PyUnitTests.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index b51bebb8..37b8f001 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,8 +216,8 @@ ledger.so: $(ledger_so_SOURCES) $(ledger_so_DEPENDENCIES)
CFLAGS="$(CPPFLAGS) -I$(srcdir) $(libpyledger_la_CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)" \
LDFLAGS="$(LDFLAGS) -L$$BUILD_DIR -L$$BUILD_DIR/.libs" \
ARCHFLAGS="$(ARCHFLAGS)" PYLIBS="$(PYLIBS)" \
- python python/setup.py build --build-lib=$$BUILD_DIR/ \
- --build-temp=$$BUILD_DIR/build -f)
+ $(PYTHON) python/setup.py build \
+ --build-lib=$$BUILD_DIR/ --build-temp=$$BUILD_DIR/build -f)
endif
@@ -260,6 +260,7 @@ EXTRA_DIST += test/python
PyUnitTests_SOURCES = test/__init__.py test/PyUnitTests.py test/UnitTests.py
+ESC_python=`echo "$(PYTHON)" | sed 's/\//\\\\\//g'`
ESC_srcdir=`echo "$(srcdir)" | sed 's/\//\\\\\//g'`
ESC_builddir=`echo "$(top_builddir)" | sed 's/\//\\\\\//g'`
ESC_distdir=`echo "$(distdir)" | sed 's/\//\\\\\//g'`
@@ -268,6 +269,7 @@ ESC_distdir=`echo "$(distdir)" | sed 's/\//\\\\\//g'`
# define an EXEEXT.
PyUnitTests: $(srcdir)/test/PyUnitTests.py
cat $(srcdir)/test/PyUnitTests.py \
+ | sed "s/%python%/$(ESC_python)/" \
| sed "s/%srcdir%/$(ESC_srcdir)/g" \
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
chmod 755 $@
diff --git a/test/PyUnitTests.py b/test/PyUnitTests.py
index 52671fbd..05dac4b4 100755
--- a/test/PyUnitTests.py
+++ b/test/PyUnitTests.py
@@ -2,4 +2,4 @@
PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \
DYLD_LIBRARY_PATH="%builddir%/.libs":$DYLD_LIBRARY_PATH \
- python "%srcdir%"/test/UnitTests.py
+ %python% "%srcdir%"/test/UnitTests.py