Index: configure.ac
===================================================================
--- configure.ac	(revision 7150854fe66d2de013c8f0b6c46e3a3158927d58)
+++ configure.ac	(revision 2d31e15adb589e255571178413b29360fb148592)
@@ -56,4 +56,5 @@
 
 # Python (for boost::python)
+AM_PATH_PYTHON([2.2])
 AX_PYTHON
 
@@ -258,4 +259,5 @@
 	tests/regression/atlocal 
 	tests/regression/Makefile])
+AC_CONFIG_FILES([tests/regression/Python/run], [chmod +x tests/regression/Python/run])
 AC_CONFIG_FILES([tests/regression/molecuilder], [chmod +x tests/regression/molecuilder])
 
Index: src/Actions/hello.cpp
===================================================================
--- src/Actions/hello.cpp	(revision 7150854fe66d2de013c8f0b6c46e3a3158927d58)
+++ src/Actions/hello.cpp	(revision 2d31e15adb589e255571178413b29360fb148592)
@@ -27,5 +27,5 @@
 }
 
-BOOST_PYTHON_MODULE(libPythontest)
+BOOST_PYTHON_MODULE(Pythontest)
 {
     boost::python::def("greet", greet);
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 7150854fe66d2de013c8f0b6c46e3a3158927d58)
+++ src/Makefile.am	(revision 2d31e15adb589e255571178413b29360fb148592)
@@ -5,4 +5,5 @@
 lib_LTLIBRARIES =
 noinst_LTLIBRARIES =
+pyexec_LTLIBRARIES =
 bin_PROGRAMS =
 
@@ -259,8 +260,9 @@
 molecuilder_DATA = Element/elements.db Element/valence.db Element/orbitals.db Element/Hbonddistance.db Element/Hbondangle.db
 
-lib_LTLIBRARIES += libPythontest.la
-libPythontest_la_SOURCES = Actions/hello.cpp
-libPythontest_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(PYTHON_INCLUDE_DIR)
-libPythontest_la_LIBADD = \
+pyexec_LTLIBRARIES += Pythontest.la
+Pythontest_la_SOURCES = Actions/hello.cpp
+Pythontest_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(PYTHON_INCLUDE_DIR)
+Pythontest_la_LDFLAGS = -module -avoid-version -shared
+Pythontest_la_LIBADD = \
 	$(BOOST_PYTHON_LDFLAGS) $(BOOST_PYTHON_LIBS) \
 	-l$(PYTHON_LIB)
Index: tests/regression/Makefile.am
===================================================================
--- tests/regression/Makefile.am	(revision 7150854fe66d2de013c8f0b6c46e3a3158927d58)
+++ tests/regression/Makefile.am	(revision 2d31e15adb589e255571178413b29360fb148592)
@@ -169,5 +169,5 @@
 max_jobs = 4
  
-check-local: atconfig atlocal $(TESTSUITE)
+check-local: atconfig atlocal Python/run $(TESTSUITE)
 	nrjobs=; \
 	for flag in $$MAKEFLAGS; do \
@@ -194,5 +194,5 @@
 
 AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): $(srcdir)/testsuite.at package.m4 $(TESTSCRIPTS)
+$(TESTSUITE): $(srcdir)/testsuite.at Python/run package.m4 $(TESTSCRIPTS)
 	$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
 	mv $@.tmp $@
Index: tests/regression/Python/run.in
===================================================================
--- tests/regression/Python/run.in	(revision 2d31e15adb589e255571178413b29360fb148592)
+++ tests/regression/Python/run.in	(revision 2d31e15adb589e255571178413b29360fb148592)
@@ -0,0 +1,26 @@
+# This it taken from project GetSpot http://spot.lip6.fr/wiki/GetSpot, also see here 
+# http://stackoverflow.com/questions/5056606/how-to-use-autotools-to-build-python-interface-at-same-time-as-library
+
+# Darwin needs some help in figuring out where non-installed libtool
+# libraries are (on this platform libtool encodes the expected final
+# path of dependent libraries in each library).
+modpath='../.libs:@abs_top_builddir@/src/.libs'
+
+# .. is for the *.py files, and ../.libs for the *.so.  We used to
+# rely on a module called ltihooks.py to teach the import function how
+# to load a Libtool library, but it started to cause issues with
+# Python 2.6.
+pypath='..:../.libs:@abs_srcdir@/..:@abs_srcdir@/../.libs:$PYTHONPATH'
+
+test -z "$1" &&
+  PYTHONPATH=$modpath DYLD_LIBRARY_PATH=$modpath LD_LIBRARY_PATH=$modpath exec @PYTHON@
+
+case $1 in
+  *.py)
+    PYTHONPATH=$modpath DYLD_LIBRARY_PATH=$modpath LD_LIBRARY_PATH=$modpath exec @PYTHON@ "$@";;
+  *.test)
+    exec sh -x "$@";;
+  *)
+    echo "Unknown extension" >&2
+    exit 2;;
+esac
Index: tests/regression/Python/testsuite-python.at
===================================================================
--- tests/regression/Python/testsuite-python.at	(revision 7150854fe66d2de013c8f0b6c46e3a3158927d58)
+++ tests/regression/Python/testsuite-python.at	(revision 2d31e15adb589e255571178413b29360fb148592)
@@ -4,9 +4,9 @@
 AT_KEYWORDS([python])
 AT_DATA([pythontest.py], [[
-import libPythontest
-print libPythontest.greet()
+import Pythontest
+print Pythontest.greet()
 ]])
-AT_CHECK([cp -f ${abs_top_builddir}/src/.libs/libPythontest.so .], 0, [ignore], [ignore])
-AT_CHECK([python pythontest.py], 0, [stdout], [ignore])
+#AT_CHECK([cp -f ${abs_top_builddir}/src/.libs/Pythontest.so .], 0, [ignore], [ignore])
+AT_CHECK([../../Python/run pythontest.py], 0, [stdout], [ignore])
 AT_CHECK([fgrep "hello, this is MoleCuilder." stdout], 0, [ignore], [ignore])
 AT_CLEANUP
