summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Bicking <ianb@colorstudy.com>2008-08-28 09:24:03 -0500
committerIan Bicking <ianb@colorstudy.com>2008-08-28 09:24:03 -0500
commit77d928a0817412d83f8f72968de39dd20db33a5c (patch)
treef97988505ccf1e2817dfe770840abe5388a86b3e
parent6d57853b4aa5c490cdfe72b945db04db67938fa2 (diff)
downloadvirtualenv-77d928a0817412d83f8f72968de39dd20db33a5c.tar.gz
[svn r3561] fix --python
-rwxr-xr-xvirtualenv.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/virtualenv.py b/virtualenv.py
index e5f93bc..4b5e05c 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -363,6 +363,9 @@ def main():
else:
logger.notify('Running virtualenv with interpreter %s' % interpreter)
env['VIRTUALENV_INTERPRETER_RUNNING'] = 'true'
+ file = __file__
+ if file.endswith('.pyc'):
+ file = file[:-1]
os.execvpe(interpreter, [interpreter, __file__] + sys.argv[1:], env)
if not args: