<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>I'm coming across a 
lot of packages that use the distutils "scripts" keyword to identify scripts 
(rather than the console_scripts entry-point).&nbsp; Unfortunately these don't 
work with buildout, although they are installed with 
easy_install.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>I think this should 
be a solvable problem with a recipe that extends zc.recipe.egg.&nbsp; For 
instance buildbot creates the "buildbot" script.&nbsp; When I create a buildout 
with:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008>=====================</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>[buildout]<BR>parts 
= buildbot</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>[buildbot]<BR>recipe 
= zc.recipe.egg<BR>interpreter = 
python<BR>=====================</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>I can then run the 
script with</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>$ bin/python -c 
"import pkg_resources; pkg_resources.working_set.run_script('buildbot', 
'buildbot')"</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>although I can't 
send it any arguments.&nbsp; Also the following hand-crafted script 
works:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008>==================</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>&nbsp; 
#!/usr/bin/python<BR>&nbsp; import sys<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp; 
sys.path[0:0] = [<BR>&nbsp; &nbsp; 
'/crypt/home/spascoe/expt/buildbot/eggs/buildbot-0.7.9-py2.5.egg',<BR>&nbsp;&nbsp; 
&nbsp;'/crypt/home/spascoe/expt/buildbot/eggs/Twisted-8.1.0-py2.5-linux-i686.egg',<BR>&nbsp;&nbsp;&nbsp; 
'/crypt/home/spascoe/expt/buildbot/eggs/zope.interface-3.5.0-py2.5-linux-i686.egg',<BR>&nbsp;&nbsp;&nbsp; 
'/usr/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg',<BR>&nbsp;&nbsp; 
&nbsp;]</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>&nbsp; import 
pkg_resources<BR>&nbsp; pkg_resources.working_set.run_script('buildbot', 
'buildbot')<BR>==================</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=950372612-12122008>Can anyone think of 
a catch that would make this not work in general?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008>Cheers,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008>Stephen.</SPAN></FONT><FONT face=Arial size=2><SPAN 
class=950372612-12122008></DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008>&nbsp;</DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN 
class=950372612-12122008></SPAN></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2>---</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Stephen Pascoe&nbsp; +44 (0)1235 
445980</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>British Atmospheric Data 
Centre</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Rutherford Appleton 
Laboratory</FONT></DIV>
<DIV>&nbsp;</DIV>
<br><p>-- 
<BR>Scanned by iCritical.
</p>
<br></BODY></HTML>