Re: "pythonw" in a Unix build

Christopher Barker <[email protected]> Mon, 18 Jan 2021 17:23:21 -0800
Newsgroups gmane.comp.python.apple
Message-ID <CALn7ch_Anq_vOmOLJZ3xLuwO5w6UYeRfqjq7VXSUmewzdrQkLA@mail.gmail.com>
--===============3903417569895847685==
Content-Type: multipart/alternative; boundary="0000000000003581c705b936ac20"

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

On Mon, Jan 18, 2021 at 4:33 PM Jack Jansen <[email protected]> wrote:

> it still isn't clear to me _why_ you wouldn=E2=80=99t want to use a frame=
work
> build=E2=80=A6
>

on a personal level, it's because the conda folks really want to use a
plain vanilla unix build -- and I want things to work with conda.

As to why conda wants to do that, my thoughts:

conda manages not just Python, but also a full set of other libraries, and
even other languages (R, Julia, Java).

In that way, it's a bit like homebrew or macports.

However, It also tries to be as platform-neutral as possible, so anything
that works one way on conda works that same way on all platforms.

And in practice, it solves a LOT of problems, problems that were a pain in
the neck for years on the Mac.

Also in practice, treating OS-X as "just another unix" works quite well in
almost all ways -- there are a few addicted here than there, though those
are mostly about clang than OS-X per se. But most things "just work".


> The whole exercise feels a bit like discussions from 15 years ago, with
> Unix wizards who wanted MacOS to behave as if it was plain vanilla Unix
> without all the things Apple changed. And that is much less true today th=
an
> it was then=E2=80=A6
>

Another practical consideration is that the vast majority of Python
developers that use Macs use them like a Unix system: data analysis, web
development, etc, etc. It's only desktop GUI software that poses any
issues, and this is the only issue (that I know of) for that.

There was an experiment with using a Framework build in conda a while back
-- it immediately ran into the issue that it would be incompatible with all
existing conda-python packages, so that's not good. It could be that that
could be addressed with appropriate symlinks, but not one did a thorough
testing.

Another issue is that conda now supports platform-independent Python
packages -- and that would get a lot harder with a Framework build. (though
again, maybe a full set of links could solve that)

It's also the case that using a Framework build inside conda buys us
absolutely nothing -- it just makes things gratuitously different from the
other *nix systems for no gain. I appreciate the idea of frameworks, but a)
I don't think Frameworks were really designed for things like python
anyway, and b) conda is solving all the problems that Frameworks solve but
-- in a different, and platform independent way.

In short: building python as a framework in conda would create an
incompatibility with no gain. The only reason to do it would be to get the
"pythonw" executable, and that doesn't actually require a Framework --
"just" some new build scripts.

Anyway, if the folks that want this do the work, it looks like it can
happen, and if not, then I guess we won't get it.

Fair enough.

-Chris


On  18-Jan-2021, at 18:38 , Christopher Barker <[email protected]> wrote:
>
> On Mon, Jan 18, 2021 at 1:34 AM Ronald Oussoren <[email protected]>
> wrote:
>
>> As mentioned on python-dev adding the =E2=80=9Cpythonw=E2=80=9D function=
ality to the unix
>> build is not very hard. I expect that integrating with the build system
>> (Makefile/configure script) will be the hardest part due to introducing
>> different behaviour for the macOS platform.
>>
>
> Thanks Ronald, that confirms my suspicions that this is really an autocon=
f
> issue. Which makes it an utter mystery to me :-(
>
>> And we already have a work around in the core python code, it's just tha=
t
>> the build system needs to be set up to build it outside of a Framework.
>>
>> The framework build does not have a workaround for these problems, it ha=
s
>> a proper solution ;-).
>>
>
> Glad to hear that -- in earlier conversations, I got the impression that
> you thought the executable wrapper was kind of a hack :-).
>
> Anyway -- if any of you have autoconf expertise and the inclination, I'd
> love to see this get done, and would be glad to help as best I can.
>
> -CHB
>
> --
> Christopher Barker, PhD (Chris)
>
> Python Language Consulting
>   - Teaching
>   - Scientific Software Development
>   - Desktop GUI and Web Development
>   - wxPython, numpy, scipy, Cython
>
>
> --
>
> 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
>
>
>
>

--=20
Christopher Barker, PhD (Chris)

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

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

<div dir=3D"ltr"><div dir=3D"ltr">On Mon, Jan 18, 2021 at 4:33 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;"><div>it still isn&=
#39;t clear to me _why_ you wouldn=E2=80=99t want to use a framework build=
=E2=80=A6</div></div></blockquote><div><br></div><div>on a personal level, =
it&#39;s because the conda folks really want to use a plain vanilla unix bu=
ild -- and I want things to work with conda.</div><div><br></div><div>As to=
 why conda wants to do that, my thoughts:</div><div><br></div><div>conda ma=
nages not just=C2=A0Python, but also a full set of other libraries, and eve=
n other languages (R, Julia, Java).=C2=A0</div><div><br></div><div>In that =
way, it&#39;s a bit like homebrew or macports.</div><div><br></div><div>How=
ever, It also tries to be as platform-neutral as possible, so anything that=
 works one way on conda works that same way on all platforms.</div><div><br=
></div><div>And in practice, it solves a LOT of problems, problems that wer=
e a pain in the neck for years on the Mac.</div><div><br></div><div>Also in=
 practice, treating OS-X as &quot;just another=C2=A0unix&quot; works quite =
well in almost all ways -- there are a few addicted=C2=A0here than there, t=
hough those are mostly about clang than OS-X per se. But most things &quot;=
just work&quot;.</div><div>=C2=A0<br></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"><div style=3D"overflow-wrap: break-word;"><div>The whole =
exercise feels a bit like discussions from 15 years ago, with Unix wizards =
who wanted MacOS to behave as if it was plain vanilla Unix without all the =
things Apple changed. And that is much less true today than it was then=E2=
=80=A6=C2=A0</div></div></blockquote><div><br></div><div>Another practical =
consideration is that the vast majority of Python developers that use Macs =
use them like a Unix system: data analysis, web development, etc, etc. It&#=
39;s only desktop GUI software that poses any issues, and this is the only =
issue (that I know of) for that.</div><div><br></div><div>There was an expe=
riment with using a Framework build in conda a while back -- it immediately=
 ran into the issue that it would be incompatible with all existing conda-p=
ython packages, so that&#39;s not good. It could be that that could be addr=
essed with appropriate=C2=A0symlinks, but not one did a thorough testing.</=
div><div><br></div><div>Another issue is that conda now supports platform-i=
ndependent=C2=A0Python packages -- and that would get a lot harder with a F=
ramework build. (though again, maybe a full set of links could solve that)<=
/div><div><br></div><div><div>It&#39;s also the case that using a Framework=
 build inside conda buys us absolutely nothing -- it just makes things grat=
uitously different from the other *nix systems for no gain. I appreciate th=
e idea of frameworks, but a) I don&#39;t think Frameworks were really desig=
ned for things like python anyway, and b) conda is solving all the problems=
 that Frameworks solve but -- in a different, and platform independent way.=
</div><div><br></div><div>In short: building=C2=A0python as a framework in =
conda would create an incompatibility with no gain. The only reason to do i=
t would be to get the &quot;pythonw&quot; executable, and that doesn&#39;t =
actually require a Framework -- &quot;just&quot;=C2=A0some new build script=
s.</div><div><br></div><div>Anyway, if the folks that want this do the work=
, it looks like it can happen, and if not, then I guess we won&#39;t get it=
.=C2=A0</div><div><br></div><div>Fair enough.</div><div><br></div><div>-Chr=
is</div><div><br></div><div><br></div></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div style=3D"overflow-wrap: break-word;"><div><div><blo=
ckquote type=3D"cite"><div>On =C2=A018-Jan-2021, at 18:38 , Christopher Bar=
ker &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">pythonchb@=
gmail.com</a>&gt; wrote:</div><br><div><div dir=3D"ltr"><div dir=3D"ltr">On=
 Mon, Jan 18, 2021 at 1:34 AM Ronald Oussoren &lt;<a href=3D"mailto:ronaldo=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<br=
></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex"><div><div>As mentioned on python-dev adding the =E2=80=9Cpythonw=
=E2=80=9D functionality to the unix build is not very hard. I expect that i=
ntegrating with the build system (Makefile/configure script) will be the ha=
rdest part due to introducing different behaviour for the macOS platform.=
=C2=A0</div></div></blockquote><div><br></div><div>Thanks Ronald, that conf=
irms my suspicions that this is really an autoconf issue. Which makes it an=
 utter mystery to me :-(</div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex"><div><div><blockquote type=3D"cite"><div><div dir=3D"ltr" style=3D"fon=
t-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:norma=
l;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px=
;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:no=
ne"><div class=3D"gmail_quote"><div>And we already have a work around in th=
e 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></div></div></blockquote>The=
 framework build does not have a workaround for these problems, it has a pr=
oper solution ;-).=C2=A0</div></div></blockquote><div><br></div><div>Glad t=
o hear that -- in earlier conversations, I got the impression that you thou=
ght the executable wrapper was kind of a hack :-).</div><div><br></div><div=
>Anyway -- if any of you have autoconf expertise=C2=A0and the inclination, =
I&#39;d love to see this get done, and would be glad to help as best I can.=
</div><div><br></div><div>-CHB</div><div>=C2=A0</div></div>-- <br><div dir=
=3D"ltr"><div dir=3D"ltr">Christopher Barker, PhD (Chris)<br><br> Python La=
nguage Consulting<br>=C2=A0 - Teaching<br>=C2=A0 - Scientific Software Deve=
lopment<br>=C2=A0 - Desktop GUI and Web Development<br>=C2=A0 - wxPython, n=
umpy, scipy, Cython<br></div></div></div>
</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 =
face=3D"Helvetica" size=3D"3" style=3D"font:12px Helvetica">--</font></p><p=
 style=3D"margin:0px"><font face=3D"Helvetica" size=3D"3" style=3D"font:12p=
x Helvetica">Jack Jansen, &lt;<a href=3D"mailto:[email protected]" target=
=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"margin=
:0px"><font face=3D"Helvetica" size=3D"3" style=3D"font:12px Helvetica">If =
I can&#39;t dance I don&#39;t want to be part of your revolution -- Emma Go=
ldman</font></p><br></div></span><br>
</div>
<br></div></div></blockquote></div><br clear=3D"all"><div><br></div>-- <br>=
<div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr">Christopher Bar=
ker, PhD (Chris)<br><br> Python Language Consulting<br>=C2=A0 - Teaching<br=
>=C2=A0 - Scientific Software Development<br>=C2=A0 - Desktop GUI and Web D=
evelopment<br>=C2=A0 - wxPython, numpy, scipy, Cython<br></div></div></div>

--0000000000003581c705b936ac20--

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

--===============3903417569895847685==--