Update script executions to use realpath instead of abspath

This allows scripts to be executed via symlinks and still work
This commit is contained in:
2010-10-13 11:16:54 +01:00
parent f34f45c2b5
commit 7d88b20d02
3 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ import os
os.nice(20) os.nice(20)
# Activate the virtualenv # Activate the virtualenv
path = os.path.dirname(os.path.abspath( __file__ )) path = os.path.dirname(os.path.realpath( __file__ ))
activate_this = os.path.join(path, 'env/bin/activate_this.py') activate_this = os.path.join(path, 'env/bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this)) execfile(activate_this, dict(__file__=activate_this))

View File

@@ -4,7 +4,7 @@
import os import os
# Activate the virtualenv # Activate the virtualenv
path = os.path.dirname(os.path.abspath( __file__ )) path = os.path.dirname(os.path.realpath( __file__ ))
os.chdir(path) os.chdir(path)
activate_this = os.path.join(path, 'env/bin/activate_this.py') activate_this = os.path.join(path, 'env/bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this)) execfile(activate_this, dict(__file__=activate_this))

View File

@@ -7,7 +7,7 @@ import os
os.nice(20) os.nice(20)
# Activate the virtualenv # Activate the virtualenv
path = os.path.dirname(os.path.abspath( __file__ )) path = os.path.dirname(os.path.realpath( __file__ ))
activate_this = os.path.join(path, 'env/bin/activate_this.py') activate_this = os.path.join(path, 'env/bin/activate_this.py')
execfile(activate_this, dict(__file__=activate_this)) execfile(activate_this, dict(__file__=activate_this))