cloudmatrix / esky

an auto-update framework for frozen python apps
BSD 3-Clause "New" or "Revised" License
362 stars 74 forks source link

Error packaging with py2app #70

Closed jazzycamel closed 8 years ago

jazzycamel commented 10 years ago

When trying to build a simple test app (EskyExample) using Python3.3.3 and PyQt5 on OSX 10.9.3 (Mavericks) I get the following error when running "python3 setup.py bdist_esky":

error: can't copy 'dist/EskyExample-0.0.1.macosx-10_6-intel/EskyExample-0.0.1.macosx-10_6-intel/EskyExample.app/Contents/Resources/lib/python3.3/config': doesn't exist or not a regular file

When I look in the directory there is a sub-directory called "config3.3m" which I'm guessing is the required object but with a different name.

Have I got something misconfigured somewhere or is this a bug when using Python3.3?

I'm using esky 0.9.8 and py2app 0.9, both installed via easy_install.

I would appreciate any help or advice you can give, thanks.

thijsdezoete commented 10 years ago

I can't really help you with this if there's no further stack trace. If you can, then please show the stacktrace. Also, it might be good to notify @rfk who's the most active developer here.

JPFrancoia commented 9 years ago

I do have the same issue, but with python 3.4 and esky 0.9.9. It seems that esky is not capable of identifying correctly the file (which is a directory actually) to copy. Has this issue been solved yet ?

Here is a full stack trace:

output.txt

I'm not totally sure about what I'm going to say, but it seems that py2app does its job correctly, but then esky fails to build the app.

timeyyy commented 9 years ago

unfortunately i don't have a mac, all i can is say is run the tests and go from there, ryan seems busy these days :( https://github.com/cloudmatrix/esky/wiki/Contributing

rfk commented 9 years ago

ryan seems busy these days

Unfortunately true; I do watch these issues but they tend to build up in my inbox for a while these days :-(

I suspect the problem here is just that newer versions of python/py2app have changed the file layout slightly, and esky hasn't been updated to keep up. The relevant code seems to be [1] if anyone has the time and resources to figure out a patch.

[1] https://github.com/cloudmatrix/esky/blob/master/esky/bdist_esky/f_py2app.py#L118

JPFrancoia commented 9 years ago

Yep, that's exactly what it is. I just came home and didn't got the time to post. I basically changed

copy_to_bootstrap_env("Contents/Resources/lib/"+pydir+"/config")

to

copy_to_bootstrap_env("Contents/Resources/lib/"+pydir+"/config-3.4m")

And it solved my issue. It took me some time to find the problematic line.

For now, I just have this dirty fix (it will only work for python 3.4), but I will try to make a PR soon, if no one more capable than me hasn't made it. We need to find a way to predict the part after the "-" in "/config-"

timeyyy commented 9 years ago

@JPFrancoia im sure you are capable enough ^^

JPFrancoia commented 8 years ago

Actually, esky with py2app will not work with python2 after this modification.