Thanks, I&#39;ll keep cx/bb-Freeze in mind if pyinstaller doesn&#39;t work out. I did get some tips from one of our internal guys;  they had built a project successfully with Twisted &amp; pyinstaller some time back. I&#39;m trying to figure out the details of what went on there. Seems that they made an &lt;appname&gt;.py which imported Twisted&#39;s UnixApplicationRunner() which then imported what had been the .tac file (renamed to &lt;appname&gt;tac.py) to launch the server. Still working out the details, imports, etc., but appears that &lt;appname&gt;.py took over much of the functionality that twistd was providing and made it into more of a straightforward python app. We&#39;ll see how this goes.<br>

Ken<br><br><div class="gmail_quote">On Wed, Jan 6, 2010 at 5:03 AM, Paul Thomas <span dir="ltr">&lt;<a href="mailto:spongelavapaul@googlemail.com">spongelavapaul@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im"><br>
On 5 Jan 2010, at 20:48, Ken MacDonald wrote:<br>
<br>
&gt; Hi, we&#39;re trying to using pyinstaller to create single-directory<br>
&gt; distributions of our Twisted/python server on Linux. Wondering if<br>
&gt; anyone has accomplished this? I googled and checked the archives,<br>
&gt; but there seems to be no concrete information available.<br>
<br>
</div>Sorry to be negative, but I&#39;ve not managed to get pyinstaller working<br>
with twisted.<br>
<br>
The reason I&#39;m posting is that I have managed to get bbfreeze and<br>
cx_freeze working. This is all about 6 months old, so newer versions<br>
might be different, but to summarise:<br>
<br>
cx_Freeze put everything into an executable zip file so you are left<br>
with one main binary and a handful of .so objects for python C modules<br>
(unless you patch the Python build to build static). I had to switch<br>
to bbfreeze because I needed to use Nevow and there were too many<br>
hoops to jump through to make it work with the data files accessed<br>
relative to __file__.<br>
<br>
bbfreeze works with eggs, so it works with Nevow or anything else that<br>
uses data files, but the down side is that the result isn&#39;t zipped up<br>
into one executable.<br>
<br>
I&#39;m about to reopen the whole freezing thing for a new project, so I<br>
may be able to report back in a few weeks.<br>
<div class="im"><br>
<br>
&gt;<br>
&gt; I&#39;m real new to pyinstaller and not really familiar with twisted<br>
&gt; internals, so not sure where to start with this, particularly<br>
&gt; whether to package our_server.tac, or the twistd script, or the<br>
&gt; our_server.py as the starting point to bundle all of this stuff<br>
&gt; together. If anyone&#39;s done this successfully, or failed miserably,<br>
&gt; would be interested in getting details.<br>
<br>
</div>I dropped the tac file to make it easier to specify the entrypoint. To<br>
do this while still getting all the twistd goodness requires some<br>
hacking, but it isn&#39;t really necessary. You can use the tac file<br>
(better to change the extension to .py though) and put a few imports<br>
in the file that are only there to pull in dependencies that the<br>
freezing program can&#39;t find. It&#39;s basically an iterative thing - build<br>
it, note the missing dependencies, import them, repeat.<br>
<br>
Good luck.<br>
<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br>