Re: py2app questions
Christopher Barker <[email protected]> Tue, 15 Dec 2020 09:17:50 -0800
| Newsgroups | gmane.comp.python.apple |
|---|---|
| Message-ID | <CALn7ch9B7PnJ4wf9idUBCARXAk004QaYPnyiC1EDPrUyocMvug@mail.gmail.com> |
--===============2221852449457393341== Content-Type: multipart/alternative; boundary="00000000000032b3e205b683ef88" --00000000000032b3e205b683ef88 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 14, 2020 at 11:28 PM Timothy M. Shead < [email protected]> 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 > >> =E2=80=A6 > >> 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=E2=80=99m too new to kn= ow what to > expect from py2app, but I=E2=80=99m 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 th= at > should use the information is active. I have rewriting that code on my t= oo > long todo list. > > > > Note that this works for me, with the Python.org installation of Python= . > > Many thanks, > Tim > > _______________________________________________ > Pythonmac-SIG maillist - [email protected] > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG > --=20 Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython --00000000000032b3e205b683ef88 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Mon, Dec 14, 2020 at 11:28 PM Timothy = M. Shead <<a href=3D"mailto:[email protected]">tim@shead-custo= m-design.com</a>> wrote:<br></div><div class=3D"gmail_quote"><blockquote= class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so= lid rgb(204,204,204);padding-left:1ex">> How was Python build?<br> <br> The Python executable and all dependencies are installed using Conda:<br> <br> Python 3.8.5 (default, Sep=C2=A0 4 2020, 02:22:02) <br> [Clang 10.0.0 ] :: Anaconda, Inc. on darwin<br></blockquote><div><br></div>= <div>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=C2=A0if there's a difference that will break py2app.</di= v><div><br></div><div>HTH,</div><div>=C2=A0-CHB</div><div><br></div><div>= =C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0= .8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>> And = when I look at the main executable, the second rpath looks questionable:<br= > >> <br> >>=C2=A0 =C2=A0 $ otool -l dist/hello.app/Contents/MacOS/hello<br> >>=C2=A0 =C2=A0 =E2=80=A6<br> >>=C2=A0 =C2=A0 Load command 16<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmd LC_RPATH<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmdsize 32<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0path @loader_path/.= ./lib (offset 12)<br> >>=C2=A0 =C2=A0 Load command 17<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmd LC_RPATH<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cmdsize 48<br> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0path @loader_path/.= ./../../../../ (offset 12)<br> > <br> > Was this file created by py2app, or did you change it afterwards?=C2= =A0 The stub executable in current releases of py2app should not contain LC= _RPATH entries at all.<br> <br> This is the executable built by py2app, with no meddling from me:<br> <br> $ rm -rf build dist<br> $ python setup.py py2app<br> $ otool -l dist/hello.app/Contents/MacOS/hello<br> <br> >> What is the right approach to address this?=C2=A0 Manually copy th= e missing .dylib files into dist/hello.app/Contents/lib?=C2=A0 I=E2=80=99m = too new to know what to expect from py2app, but I=E2=80=99m surprised that = it would be necessary for something as ubiquitous as zlib?<br> > <br> > Py2app, or rather the macholib library used by py2app, does not proces= s @rpath correctly. The code is older than the introduction of this feature= and is not easily adjusted for it because some information needed for corr= ectly dealing with @rpath and @loader_path is lost before the code that sho= uld use the information is active.=C2=A0 I have rewriting that code on my t= oo long todo list.<br> > <br> > Note that this works for me, with the Python.org installation of Pytho= n.<br> <br> Many thanks,<br> Tim<br> <br> _______________________________________________<br> Pythonmac-SIG maillist=C2=A0 -=C2=A0 <a href=3D"mailto:Pythonmac-SIG@python= .org" target=3D"_blank">[email protected]</a><br> <a href=3D"https://mail.python.org/mailman/listinfo/pythonmac-sig" rel=3D"n= oreferrer" target=3D"_blank">https://mail.python.org/mailman/listinfo/pytho= nmac-sig</a><br> unsubscribe: <a href=3D"https://mail.python.org/mailman/options/Pythonmac-S= IG" rel=3D"noreferrer" target=3D"_blank">https://mail.python.org/mailman/op= tions/Pythonmac-SIG</a><br> </blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"= class=3D"gmail_signature">Christopher Barker, PhD<br><br> Python Language = Consulting<br>=C2=A0 - Teaching<br>=C2=A0 - Scientific Software Development= <br>=C2=A0 - Desktop GUI and Web Development<br>=C2=A0 - wxPython, numpy, s= cipy, Cython<br></div></div> --00000000000032b3e205b683ef88-- --===============2221852449457393341== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pythonmac-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG --===============2221852449457393341==--