On Mon, 2010-04-26 at 14:10 +0200, Florian Höch wrote:
> pygst lies directly in site-packages and basically just contains the
> require() function. So in a script you always do `import pygst`,
> `pygst.require(version)` and it will add the correct gst-<version>
> directory (there can be several concurrent different versions) to
> sys.path. Then, you do `import gst`.
Ah, the joy of pkg_resources and its runtime magic :)
I think another workaround is to add import pygst; pygst.require("...")
within the spec file itself. Not beautiful, but still better than
hardcoding its full path in pathex.
I think the best solution for PyInstaller would be to:
1) Detect calls to pkgname.require() (not easy)
2) Create and invoke a wrapper script that does something like:
import pygst
pygst.require("whatever")
print sys.path
3) Dynamically add the new paths to the pathex
Last post: Grey on black: combining greylisting with blacklists