Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #811 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] detect correct python binary in start-<project>.py

Reported by: fgiunchedi@… Owned by: jorge.vargas
Priority: normal Milestone: 1.0b1
Component: TurboGears Version: 0.9a5
Severity: normal Keywords:


Hi, just after tg-admin quickstart <project> the <project>/start-<project>.py ends up with:

#!/usr/bin/env python

while this can't be true, for example when more than version of python is installed. The correct solution, IMO, is to detect which binary runs tg-admin and use that while generating the start-<project>.py script

thanks in advance - turbogears is great! filippo

Change History

comment:1 Changed 13 years ago by Matt Good <tg@…>

This is relatively straightforward:

  • turbogears/qstemplates/quickstart/start-+package+.py_tmpl

    1 #!/usr/bin/env python 
    22import pkg_resources 
  • turbogears/command/quickstart.py

    2222        vars.setdefault('einame', vars['project'].replace('-', '_')) 
    2323        vars.setdefault('turbogearsversion', 
    2424                pkg_resources.get_distribution('turbogears').version) 
     25        vars.setdefault('sys_executable', os.path.normpath(sys.executable)) 
    2526        super(TGTemplate, self).run(command, output_dirs, vars) 
    2728class BaseTemplate(TGTemplate): 

comment:2 Changed 13 years ago by Matt Good <tg@…>

  • Summary changed from detect correct python binary in start-<project>.py to [PATCH] detect correct python binary in start-<project>.py

comment:3 Changed 13 years ago by jorge.vargas

  • Owner changed from anonymous to jorge.vargas
  • Milestone changed from 0.8 to 1.0b1

comment:4 Changed 13 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed

committed in [1566]. thanks!

Note: See TracTickets for help on using tickets.