-
Notifications
You must be signed in to change notification settings - Fork 74
unable to run bootrap file using py2app and python3.4 #104
Comments
I assumed python could not find some libraries, so I copied everything from the second level folder Contents into the first level folder Contents.
Now when I run exe_esky, I get this:
|
@rfk , any idea ? We are kind of stuck here :) |
@JPFrancoia easiest might be to link or email me a tarball of the frozen app itself, that way I can poke around in its internals and see if I can see what's going on. I'll also try to repro locally. |
(Wow, it's been a while since I actually tried to run this stuff myself) With python3.4.3, py2app 0.9 I get the following error when trying to freeze an app:
Have you seen this before? Suggestion for a workaround? |
Nope, but there is a fix here I guess: I'll email you that right away. |
No luck on tracking down the problem with encodings module, but I suspect this subsequent error:
May be because of the way we're writing bytecode in the py2app freezer here: https://github.com/cloudmatrix/esky/blob/master/esky/bdist_esky/f_py2app.py#L138 Changing this to use the new |
The encodings modules are in the zipfile at:
Does copying this into the equivalent location in the top-level |
I had to copy both
and
Into the he equivalent location in the top-level Contents directory, otherwise I get this error:
When I do so, I go back to the error:
I tried to change the line: f.write(marshal.dumps(compile("", "site.py", "exec"))) to f.write(esky.util.compile_to_bytecode("", "site.py")) But I still get the bad marshal data error. Did I made the proper modifications ? Do I have to make more ? |
It should replace both the |
Ok. I made the changes, but got:
|
Hmm, I guess the behaviour of py2app must have changed in newer versions, either of it or of python3. To debug, I suggest replacing the
Which will hopefully (1) allow the bootstrapping exe to continue to load the real frozen app, and (2) tell us what's in environ so we might re-create the old behaviour. |
Here we go:
|
Interesting, is the matching
Aha, they values here are bytes rather than strings, that's probably what caused the |
Yep, the boostrap exe and the real exe are both marked as executable. Yes they are bytes. Shall we convert the values before we use them ? Also, is
A correct path ? Shouldn't it be
|
The extra
No, I think it's OK to use them as bytes, but the
|
I changed the extra_bootstrap_code as you required:
|
Ugh, bytes. @JPFrancoia try this one:
Sorry, I haven't managed to find the time to get py2app up and running and make a fresh build myself yet, so I can't try it out myself. |
Woohoo, with all of:
I can successfully run the top-level script for the compiled app that you sent me! Hopefully it will also work for you. If so, we can work backwards to figure out what to change in esky itself to make this all work by default. |
Paring lib-dynload down to the following still works:
|
Paring the contents of
AFAICT this is the minimal set of modules required for python3 to start up successfully. So if this works for you @JPFrancoia, the fixes we need to make are:
|
WOUHOUHOU :) It also works for me guys. For now, I did:
as @rfk suggested. Now we should make everything look good, and everything is in the pocket :) @timeyyy , I can' find your email address, can you PM it to me ? |
@JPFrancoia thanks so much for sticking with this to work through the issue; I think the discoveries here will also help unblock #131 and related issues. |
I'll try to patch Esky with what you guys suggested. @rfk , if I set the content of python35.zip down to the following:
I get the
error. Did you do something else to your zip file ? (I also set the the contents of lib-dynload to what you said). Also, why copying to the bootstrap env ? Wouldn't a link work (something like ln -s) ? |
Did you include all the contents of the "encodings" directory in the zipfile as well? |
Yes, here is what I have in the top level Resources folder (I unzipped the python35 archive):
|
Hi again,
I can successfully run a simple hello world program using py2app, esky and python 2, python 3 however fails..
Running the second-level exe (not the boostrap one) works, the program runs smoothly. The issue seems to be related to #72.
The text was updated successfully, but these errors were encountered: