On Mon, Dec 14, 2020 at 11:28 PM Timothy M. Shead <
t...@shead-custom-design.com> wrote:

> > How was Python build?
>
> The Python executable and all dependencies are installed using Conda:
>
> Python 3.8.5 (default, Sep  4 2020, 02:22:02)
> [Clang 10.0.0 ] :: Anaconda, Inc. on darwin
>

Note that the conda build of Python on OS-X is a "plain *nix" build. which
may be the source of your issues. I'm not sure what the difference is other
than the app bundle wrapper (pythonw), but I wouldn't be supposed if
there's a difference that will break py2app.

HTH,
 -CHB



> >> And when I look at the main executable, the second rpath looks
> questionable:
> >>
> >>    $ otool -l dist/hello.app/Contents/MacOS/hello
> >>    …
> >>    Load command 16
> >>              cmd LC_RPATH
> >>          cmdsize 32
> >>             path @loader_path/../lib (offset 12)
> >>    Load command 17
> >>              cmd LC_RPATH
> >>          cmdsize 48
> >>             path @loader_path/../../../../../ (offset 12)
> >
> > Was this file created by py2app, or did you change it afterwards?  The
> stub executable in current releases of py2app should not contain LC_RPATH
> entries at all.
>
> This is the executable built by py2app, with no meddling from me:
>
> $ rm -rf build dist
> $ python setup.py py2app
> $ otool -l dist/hello.app/Contents/MacOS/hello
>
> >> What is the right approach to address this?  Manually copy the missing
> .dylib files into dist/hello.app/Contents/lib?  I’m too new to know what to
> expect from py2app, but I’m surprised that it would be necessary for
> something as ubiquitous as zlib?
> >
> > Py2app, or rather the macholib library used by py2app, does not process
> @rpath correctly. The code is older than the introduction of this feature
> and is not easily adjusted for it because some information needed for
> correctly dealing with @rpath and @loader_path is lost before the code that
> should use the information is active.  I have rewriting that code on my too
> long todo list.
> >
> > Note that this works for me, with the Python.org installation of Python.
>
> Many thanks,
> Tim
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG
>


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to