Bundling application and dependencies with pynsist
<p>I'm a python newbie so please bear with me.</p>

<p>I'm trying to bundle a PyQt4 application with pynsist. I want to import module A which depends on module B, C, and D, but specifying module A in the installer.cfg file does not bundle B, C, and D. Do I need to specify <strong>ALL</strong> the modules my application depends on in the installer.cfg file, and if so is there a good method of finding out what they are?</p>

<p>You need to specify all of the modules or packages to be bundled.</p>

<p>If these are modules you are writing yourself, you can put them all in one package, so you import them as <code>import mypkg.A</code> or <code>import mypkg.B</code>. Then you can ask it to bundle <code>mypkg</code> as a whole.</p>

<p>You can see what modules your program has loaded by putting this code at the end:</p>

<pre><code>import sys
print(sorted(sys.modules))
</code></pre>

<p>That will show you every module that it's loaded, including standard library modules (which are always bundled).</p>

python python-packaging pynsist