Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:

FYI: In pythonv, the build_scripts functionality provides identical support for 
dotted callables to what Éric proposed, while preserving existing functionality 
for ordinary script files. Thus:

scripts = demo1
  demo2 = amodule.main
  demo3 = apackage.asubpackage.main gui

copies demo1 (adjusting its shebang) and creates demo2 and demo3 from the 
dotted callables (using the appropriate shebang).

While working on this, I came up against a problem with build_scripts in 
virtual environments: if I install a project into virtual env 1, then scripts 
are built with shebangs pointing to that env. If I then install the same 
project into virtual env 2, then the scripts are not re-created, so they would 
be installed into virtual env 2 with shebangs referencing virtual env 1. One 
solution is to set the force flag for virtual environments, but then if you 
later install into the system Python, then files with wrong shebangs could be 
installed there. I think the force flag should default to True for 
build_scripts; the extra script build time would be negligible except in 
pathological cases. Do you agree?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12394>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to