Re: "pythonw" in a Unix build

Christopher Barker <[email protected]> Thu, 14 Jan 2021 21:24:04 -0800
Newsgroups gmane.comp.python.apple
Message-ID <CALn7ch-a6Uzoy-6OZxENFTKkbmSagc5dDs-TBxSwvqhWuZ3rzA@mail.gmail.com>
--===============0579889987984853998==
Content-Type: multipart/alternative; boundary="0000000000000d6b9e05b8e9960d"

--0000000000000d6b9e05b8e9960d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 14, 2021 at 3:14 PM Jack Jansen <[email protected]> wrote:

> For example, the brew Python is installed into a framework tucked away
> deep in /usr/local/Cellar but you don=E2=80=99t notice this at all: you c=
an just
> use =E2=80=9Cpython foo.py=E2=80=9D and the moment the script does GUI ca=
lls it=E2=80=99ll get an
> icon in the doc and all that.
>
> What problem are you trying to solve?
>

It's interesting that brew python has decided to use a Framework build ....

But the problem at hand is conda python which used a plain unix build.

They have provided a shell script "pythonw" that re-directs to a python
inside an app bundle, and that works OK on the command line, but it does
not work with, e.g. setuptools entry points.

I could dig up the threads, but this has been discussed on this list, and
few gitHub issues.

In short, there are a few ways to work around these issues, but no one (the
conda people, the setuptools devs) wants to put the kludgy work around in
their code.

And we already have a work around in the core python code, it's just that
the build system needs to be set up to build it outside of a Framework.

-CHB




> Jack
>
> On  14-Jan-2021, at 23:07 , Chris Barker via Pythonmac-SIG <
> [email protected]> wrote:
>
> Ned suggested I bring this conversation over here from python-dev, so her=
e
> it is.
>
> What I'd like to see done is have the "pythonw" wrapper buildable in an
> otherwise non-framework build.
>
> I *think* there are no real technical show stoppers, but it would take
> some auto-conf magic, which I am fully unqualified to take on.
>
> Anyone interested in helping make this happen ?
>
> -CHB
>
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> [email protected]
> _______________________________________________
> Pythonmac-SIG maillist  -  [email protected]
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG
>
>
> --
>
> Jack Jansen, <[email protected]>, http://www.cwi.nl/~jack
>
> If I can't dance I don't want to be part of your revolution -- Emma Goldm=
an
>
>
>
> _______________________________________________
> 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 (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython

--0000000000000d6b9e05b8e9960d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Thu, Jan 14, 2021 at 3:14 PM Jack Jans=
en &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wro=
te:<br></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad=
ding-left:1ex"><div style=3D"overflow-wrap: break-word;">For example, the b=
rew Python is installed into a framework tucked away deep in /usr/local/Cel=
lar but you don=E2=80=99t notice this at all: you can just use =E2=80=9Cpyt=
hon foo.py=E2=80=9D and the moment the script does GUI calls it=E2=80=99ll =
get an icon in the doc and all that.<div><br></div><div>What problem are yo=
u trying to solve?</div></div></blockquote><div><br></div><div>It&#39;s int=
eresting that brew python has decided to use a Framework build ....</div><d=
iv><br></div><div>But the problem at hand is conda python which used a plai=
n unix build.</div><div><br></div><div>They have provided a shell script &q=
uot;pythonw&quot; that re-directs to a python inside an app bundle, and tha=
t works OK on the command line, but it does not work with, e.g. setuptools =
entry points.</div><div><br></div><div>I could dig up the threads, but this=
 has been discussed on this list, and few gitHub issues. <br></div><div><br=
></div><div>In short, there are a few ways to work around these issues, but=
 no one (the conda people, the setuptools devs) wants to put the kludgy wor=
k around in their code.</div><div><br></div><div>And we already have a work=
 around in the core python code, it&#39;s just that the build system needs =
to be set up to build it outside of a Framework.</div><div><br></div><div>-=
CHB</div><div><br></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 rg=
b(204,204,204);padding-left:1ex"><div style=3D"overflow-wrap: break-word;">=
<div>Jack</div><div><br><blockquote type=3D"cite"><div>On =C2=A014-Jan-2021=
, at 23:07 , Chris Barker via Pythonmac-SIG &lt;<a href=3D"mailto:pythonmac=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<=
/div><br><div><div dir=3D"ltr">Ned suggested I bring this conversation over=
 here from python-dev, so here it is.<div><br></div><div>What I&#39;d like =
to see done is have the &quot;pythonw&quot; wrapper buildable in an otherwi=
se non-framework build.</div><div><br></div><div>I *think* there are no rea=
l technical show stoppers, but it would take some auto-conf magic, which I =
am fully unqualified to take on.</div><div><br></div><div>Anyone interested=
 in helping make this happen ?</div><div><br></div><div>-CHB</div><div><br>=
</div><div><div><br></div>-- <br><div dir=3D"ltr"><br>Christopher Barker, P=
h.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&amp=
;R =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(206) 526-6959=C2=A0=C2=A0 voic=
e<br>7600 Sand Point Way NE =C2=A0=C2=A0(206) 526-6329=C2=A0=C2=A0 fax<br>S=
eattle, WA =C2=A098115 =C2=A0 =C2=A0 =C2=A0=C2=A0(206) 526-6317=C2=A0=C2=A0=
 main reception<br><br><a href=3D"mailto:[email protected]" target=3D"_=
blank">[email protected]</a></div></div></div>
_______________________________________________<br>Pythonmac-SIG maillist =
=C2=A0- =C2=A0<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a><br><a href=3D"https://mail.python.org/mailman=
/listinfo/pythonmac-sig" target=3D"_blank">https://mail.python.org/mailman/=
listinfo/pythonmac-sig</a><br>unsubscribe: <a href=3D"https://mail.python.o=
rg/mailman/options/Pythonmac-SIG" target=3D"_blank">https://mail.python.org=
/mailman/options/Pythonmac-SIG</a><br></div></blockquote></div><br><div>
<span style=3D"border-collapse:separate;color:rgb(0,0,0);font-family:Helvet=
ica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal=
;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:no=
ne;white-space:normal;word-spacing:0px"><div><p style=3D"margin:0px"><font =
style=3D"font:12px Helvetica" size=3D"3" face=3D"Helvetica">--</font></p><p=
 style=3D"margin:0px"><font style=3D"font:12px Helvetica" size=3D"3" face=
=3D"Helvetica">Jack Jansen, &lt;<a href=3D"mailto:[email protected]" targe=
t=3D"_blank">[email protected]</a>&gt;, <a href=3D"http://www.cwi.nl/~jack=
" target=3D"_blank">http://www.cwi.nl/~jack</a></font></p><p style=3D"margi=
n:0px"><font style=3D"font:12px Helvetica" size=3D"3" face=3D"Helvetica">If=
 I can&#39;t dance I don&#39;t want to be part of your revolution -- Emma G=
oldman</font></p><br></div></span><br>
</div>
<br></div>_______________________________________________<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"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr">Christopher Barker, PhD (Chris)<br><br> Py=
thon Language Consulting<br>=C2=A0 - Teaching<br>=C2=A0 - Scientific Softwa=
re Development<br>=C2=A0 - Desktop GUI and Web Development<br>=C2=A0 - wxPy=
thon, numpy, scipy, Cython<br></div></div></div>

--0000000000000d6b9e05b8e9960d--

--===============0579889987984853998==
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

--===============0579889987984853998==--