On Tue, 2010-02-23 at 23:23 +0100, Lukas Hetzenecker wrote:
> I patched pyinstaller with the patch attached to this ticket:
> http://www.pyinstaller.org/ticket/152

I'm happy to know it works. I don't specifically like the way the patch
is written, I will need to investigate the issue further.

> Now I get the following error when I try to run the executable:
> lukass-Mac:series60_remote Lukas$ ./series60_remote 
> Traceback (most recent call last):
>   File "<string>", line 14, in <module>
>   File "/Users/Lukas/pyinstaller/iu.py", line 436, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/Users/Lukas/pyinstaller/iu.py", line 521, in doimport
>     exec co in mod.__dict__
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/lib.device",
>  
> line 7, in <module>
>   File "/Users/Lukas/pyinstaller/iu.py", line 436, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/Users/Lukas/pyinstaller/iu.py", line 521, in doimport
>     exec co in mod.__dict__
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/devices.series60",
>  
> line 6, in <module>
>   File "/Users/Lukas/pyinstaller/iu.py", line 436, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/Users/Lukas/pyinstaller/iu.py", line 521, in doimport
>     exec co in mod.__dict__
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/lightblue",
>  
> line 160, in <module>
>   File "/Users/Lukas/pyinstaller/iu.py", line 436, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/Users/Lukas/pyinstaller/iu.py", line 521, in doimport
>     exec co in mod.__dict__
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/lightblue._lightblue",
>  
> line 23, in <module>
>   File "/Users/Lukas/pyinstaller/iu.py", line 436, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/Users/Lukas/pyinstaller/iu.py", line 521, in doimport
>     exec co in mod.__dict__
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/Foundation",
>  
> line 10, in <module>
>   File "/Users/Lukas/pyinstaller/iu.py", line 436, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/Users/Lukas/pyinstaller/iu.py", line 521, in doimport
>     exec co in mod.__dict__
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/CoreFoundation",
>  
> line 17, in <module>
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/objc._bridgesupport",
>  
> line 156, in initFrameworkWrapper
>   File "/Users/Lukas/series60-
> remote/trunk/pc/build/pyi.darwin/series60_remote.darwin/outPYZ1.pyz/objc._bridgesupport",
>  
> line 58, in _parseBridgeSupport
> ValueError: Unknown typestr: ^{__CFAllocator=}

This seems a problem with the way PyInstaller bundles pyobjc. Probably
this library requires some special support.

I gave a quick look at the source code (objc/_bridgesupport.py, function
initFrameworkWrapper). It looks like:

1) It uses pkg_resources, which is not supported by PyInstaller. This
might or might no be a blocking problem.

2) It searches for files *.bridgesupport in the file system. This file
should probably be copied over by PyInstaller as they should be part of
the final bundle.

So I would say that there is some work to do here. If you are willing to
investigate this together, I can give you some guidance. You will have
to study a little the internals of PyObjC (specifically, this
_bridgesupport module). Let me know if you are interested.

> Why is there a reference to my pyinstaller (/Users/Lukas/pyinstaller/iu.py) 
> and build directory (/Users/Lukas/series60-remote/trunk/pc/build/) in the 
> executable of the dist directory?

This is expected behavior. PyInstaller packs the .pyc files created on
your system, and those files contain your local paths. To fix this,
PyInstaller should apply a filter on them to remove part of the path.
This is currently not implemented; I don't think it can be done with a
string substitution in the binary .pyc/.pyo file; it probably requires
unmarshal + process the live structures in memory + marshal.

Again, I'm happy to provide some guidance if you're willing to pursue
this feature. Otherwise, it's not a priority at this point.

-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com


-- 
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