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


-- 
Giovanni Bajo   ::  [email protected]
Develer S.r.l.  ::  http://www.develer.com

My Blog: http://giovanni.bajo.it
Last post: Grey on black: combining greylisting with blacklists

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to