Hi,
That's correct. This is a limitation in zc.recipe.egg; we're open to patches
that improve the generated interpreter script.
Thanks for confirming, I wasn't sure if it was like that for a reason.
I attach a patch that fixes up some other parameters so the generated
interpreter script's behaviour is less distinguis matches what you get
when you start the python interpreter more exactly. Works for me, but
I'd appreciate some more eyes...
Miles
Index: zc.buildout/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/src/zc/buildout/easy_install.py (revision 78190)
+++ zc.buildout/src/zc/buildout/easy_install.py (working copy)
@@ -896,11 +896,17 @@
py_script_template = '''\
#!%(python)s
import sys
-
+import os
+
sys.path[0:0] = [
+ '',
%(path)s,
]
+abs__file__ = os.path.abspath( __file__ )
+sys.executable = abs__file__
+del ( __file__ )
+
_interactive = True
if len(sys.argv) > 1:
import getopt
@@ -914,7 +920,12 @@
if _args:
sys.argv[:] = _args
- execfile(sys.argv[0])
+ f = sys.argv[0]
+ absf = os.path.abspath(f)
+ p = os.path.split( absf )[0]
+ sys.path[0] = os.path.join( p )
+ __file__ = absf
+ execfile( f )
if _interactive:
import code
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig