diff --git a/Makefile b/Makefile
index 227c88cfe96b7e4b5bdcca9e935cb46f91366b5d..d09add57ce6adfbf5cf202b2901e8f6740f411e3 100644
--- a/Makefile
+++ b/Makefile
@@ -1456,6 +1456,7 @@ showbuild:
 	@echo "PYTHONLIBDIR       = $(PYTHONLIBDIR)"
 	@echo "PYTHONLIB          = $(PYTHONLIB)"
 	@echo "PYTHONINCDIR       = $(PYTHONINCDIR)"
+	@echo "PYTHONEXE          = $(PYTHONEXE)"
 	@echo "RUBYLIBDIR         = $(RUBYLIBDIR)"
 	@echo "RUBYLIB            = $(RUBYLIB)"
 	@echo "RUBYINCDIR         = $(RUBYINCDIR)"
diff --git a/config/Makefile.in b/config/Makefile.in
index 895e410cfcbe7ec6039067b672230bc13ed5d4fd..4231dc640f8c54661e727ce5b0a6e9f24cfb4bd2 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -303,6 +303,7 @@ PYTHONLIBDIR   := @pythonlibdir@
 PYTHONLIB      := @pythonlib@
 PYTHONINCDIR   := $(filter-out /usr/include, @pythonincdir@)
 PYTHONLIBFLAGS := @pythonlibflags@
+PYTHONEXE      := @pythonexe@
 
 BUILDRUBY      := @buildruby@
 RUBYLIBDIR     := @rubylibdir@
diff --git a/configure b/configure
index 21b1b089cb108cec08fea38c5e7804a7a2817662..6bc758792d369b1f189d7c00858270689bb8b04a 100755
--- a/configure
+++ b/configure
@@ -7772,6 +7772,7 @@ sed -e "s|@globusincdir@|$globusincdir|"        \
     -e "s|@pythonlibdir@|$pythonlibdir|"        \
     -e "s|@pythonincdir@|$pythonincdir|"        \
     -e "s|@pythonlibflags@|$pythonlibflags|"    \
+    -e "s|@pythonexe@|$pythonexe|"              \
     -e "s|@rubylib@|$rubylib|"                  \
     -e "s|@rubylibdir@|$rubylibdir|"            \
     -e "s|@rubyincdir@|$rubyincdir|"            \
diff --git a/main/python/Module.mk b/main/python/Module.mk
index 8fc174c839657f5d761a6db7113d4eff0dca1037..20abfee95cc070107fb2b171a7583bdadd937da1 100644
--- a/main/python/Module.mk
+++ b/main/python/Module.mk
@@ -28,10 +28,12 @@ ALLEXECS     += $(CMDTOOLSPY)
 .PHONY:         all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
 
 bin/%:          $(CMDTOOLSDIR)/%.py
-		cp $< $@
+		#cp $< $@
+		sed "s#@python@#$(PYTHONEXE)#" $< > $@
 
 $(LPATH)/%.py:  $(CMDTOOLSDIR)/%.py
-		cp $< $@
+		#cp $< $@
+		sed "s#@python@#$(PYTHONEXE)#" $< > $@
 
 #%.pyc: %.py;    python -c 'import py_compile; py_compile.compile( "$<" )'
 #%.pyo: %.py;    python -O -c 'import py_compile; py_compile.compile( "$<" )'