Skip to content
Browse files

Merge pull request #1 from pigmej/patch-1

CTK works in virtualenv now
  • Loading branch information...
2 parents e75f53b + 5d7a424 commit 6ecc85260fe2e539574278876dce9dd0da77050b @alobbs alobbs committed Oct 25, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 CTK-run.pre
View
4 CTK-run.pre
@@ -15,12 +15,14 @@ def write_cherokee_conf (app_file, CTK_root, SCGI_port):
else:
app_file_path = os.path.join (os.getcwd(), app_file)
+ # Get python executable, to make CTK work in virtualenv for example
+ python_executable = sys.executable
# Write the custom configuration file
config = CONFIG_BASE[:]
config = config.replace ('vserver!10!document_root = /var/www',
'vserver!10!document_root = %s' %(CTK_root))
config = config.replace ('source!1!interpreter = /usr/bin/true',
- 'source!1!interpreter = python %s' %(app_file_path))
+ 'source!1!interpreter = %s %s' %(python_executable, app_file_path))
config = config.replace ('source!1!host = localhost:8000',
'source!1!host = localhost:%s' %(SCGI_port))
config = config.replace ('vserver!10!rule!200!document_root = /var/www/static',

0 comments on commit 6ecc852

Please sign in to comment.
Something went wrong with that request. Please try again.