ronaldoussoren / py2app

py2app is a Python setuptools command which will allow you to make standalone Mac OS X application bundles and plugins from Python scripts.
Other
340 stars 36 forks source link

BUGFIX: rpath for all architectures #502

Closed Tokarak closed 12 months ago

Tokarak commented 12 months ago

Fix an oversight which has exited since #315

Untested (as-of), but this has to be the solution — #482 also mentions that they are on Apple Silicon, like me.

Closes: #482 #286 #472

edit: Testing done; congruent with #315

          cmd LC_RPATH
      cmdsize 48
         path @executable_path/../Frameworks (offset 12)
Tokarak commented 12 months ago

Testing further suggests that the Frameworks folder is already in @rpath, meaning this pr may be a complete dud. The libffi issue still persists. My interpretation is that this isn't an issue with the rpath variable at all; it's an issue with macholib, because libffi is not copied. Manually copying libffi.8.dylib to Frameworks fixes it (I also had to switch from python 3.11 to 3.8).

macholib fails somehow and defaults to a hardcoded python dylib in order for basic functionality to work https://github.com/ronaldoussoren/py2app/blob/e9c7a88f34d79c41a3a344ccc14cd97c24904b9f/src/py2app/build_app.py#L853 I'm done for today, may move on to that tomorrow.

What to do with this PR? Technically it's closed. It may be better to revert #315 instead; but I'll leave it open, in order to be on par in logic in x86 architecture. (edit: scrap that)