Re: Need M1 Mac to Test

[email protected] Thu, 13 Jan 2022 01:36:58 +0100
Newsgroups gmane.comp.python.apple
Message-ID <[email protected]>
--===============4038116380165362551==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_A6AFFB9B-FE1F-47A5-9CA3-63C7F1D2E387"


--Apple-Mail=_A6AFFB9B-FE1F-47A5-9CA3-63C7F1D2E387
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

No worries, you can do Python development during the Intel->Arm =
transition. And then in umpteen years during the Arm->RiscV transition, =
and after that: who knows=E2=80=A6.

(And you probably weren=E2=80=99t born for the 68000->PowerPC =
transition)

:-)
--
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 =
Goldman



> On 12 Jan 2022, at 23:56, Brian Herman <[email protected]> wrote:
>=20
> I wish i was doing python development during the PowerPC->Intel =
transition.
> I was in high school and into macs but not python at the time.
>=20
>=20
> On Wed, Jan 12, 2022 at 4:48 PM <[email protected] =
<mailto:[email protected]>> wrote:
>=20
>> On 12 Jan 2022, at 22:54, Ned Deily <[email protected] =
<mailto:[email protected]>> wrote:
>>  In theory it is possible to select which architecture a multi-arch =
executable is to run under when there is more than one option by using =
the "arch" command, like here to force running in Intel emulation mode =
under Rosetta2 on an M1 Mac:
>>=20
>> arch -x86_64 /path/to/python3{x}
>>=20
>> But there is a big gotcha with that: if anything running under that =
non-default arch Python spins off another Python in a subprocess by =
using the value of sys.executable to find the running interpreter =
binary, the "arch -x86_64" is effectively lost and the interpreter in =
the subprocess will run in the default architecture. This happens, for =
instance, when running Python's own test suite: the top-level Python =
process running regrtest will be running in Intel emulation but tests =
running in subprocesses will still be running in the default arm64 arch, =
possibly giving errors or silently producing misleading results. Running =
the tests using python3{}-intel64 avoids that problem.
>=20
> Yeah, that=E2=80=99s why I=E2=80=99m staying away from universal =
builds for now. Often I have a situation where I run cmake which runs =
make which runs python to create a venv and then somebody higher up will =
use that venv to create something using =E2=80=9Cpython" that something =
else will then use to build something against. The chances of this =
working with =E2=80=9Carch -x86_64=E2=80=9D are slim, if that:-)
>=20
> Looking at the timeline of the PowerPC->Intel transition I think most =
of the problem will be solved in another year, because pretty much =
everything will be available for arm natively.
>=20
> --
> Jack Jansen, <[email protected] <mailto:[email protected]>>, =
http://www.cwi.nl/~jack <http://www.cwi.nl/~jack>
> If I can't dance I don't want to be part of your revolution -- Emma =
Goldman
>=20
>=20
>=20
> _______________________________________________
> Pythonmac-SIG maillist  -  [email protected] =
<mailto:[email protected]>
> https://mail.python.org/mailman/listinfo/pythonmac-sig =
<https://mail.python.org/mailman/listinfo/pythonmac-sig>
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG =
<https://mail.python.org/mailman/options/Pythonmac-SIG>
> _______________________________________________
> Pythonmac-SIG maillist  -  [email protected]
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG


--Apple-Mail=_A6AFFB9B-FE1F-47A5-9CA3-63C7F1D2E387
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">No =
worries, you can do Python development during the Intel-&gt;Arm =
transition. And then in umpteen years during the Arm-&gt;RiscV =
transition, and after that: who knows=E2=80=A6.<div class=3D""><br =
class=3D""></div><div class=3D"">(And you probably weren=E2=80=99t born =
for the 68000-&gt;PowerPC transition)<br class=3D""><div class=3D""><br =
class=3D""></div><div class=3D"">:-)<br class=3D""><div class=3D"">
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; =
font-style: normal; font-variant: normal; font-weight: normal; =
letter-spacing: normal; line-height: normal; orphans: 2; text-align: =
auto; text-indent: 0px; text-transform: none; white-space: normal; =
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0; "><div class=3D""><p =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; " class=3D""><font face=3D"Helvetica" size=3D"3" =
style=3D"font: normal normal normal 12px/normal Helvetica; " =
class=3D"">--</font></p><p style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; " class=3D""><font =
face=3D"Helvetica" size=3D"3" style=3D"font: normal normal normal =
12px/normal Helvetica; " class=3D"">Jack Jansen, &lt;<a =
href=3D"mailto:[email protected]" class=3D"">[email protected]</a>&gt;, =
<a href=3D"http://www.cwi.nl/~jack" =
class=3D"">http://www.cwi.nl/~jack</a></font></p><p style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " =
class=3D""><font face=3D"Helvetica" size=3D"3" style=3D"font: normal =
normal normal 12px/normal Helvetica; " class=3D"">If I can't dance I =
don't want to be part of your revolution -- Emma Goldman</font></p><br =
class=3D"Apple-interchange-newline"></div></span><br =
class=3D"Apple-interchange-newline">
</div>
<div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 12 Jan 2022, at 23:56, Brian Herman &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D"">I wish i was doing python development during the =
PowerPC-&gt;Intel transition.<div class=3D"">I was in high school and =
into macs but not python at the time.</div><div class=3D""><br =
class=3D""></div></div><br class=3D""><div class=3D"gmail_quote"><div =
dir=3D"ltr" class=3D"gmail_attr">On Wed, Jan 12, 2022 at 4:48 PM &lt;<a =
href=3D"mailto:[email protected]" class=3D"">[email protected]</a>&gt; =
wrote:<br class=3D""></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;" class=3D""><div class=3D""><br class=3D""></div><blockquote =
type=3D"cite" class=3D"">On 12 Jan 2022, at 22:54, Ned Deily &lt;<a =
href=3D"mailto:[email protected]" target=3D"_blank" =
class=3D"">[email protected]</a>&gt; wrote:</blockquote><blockquote =
type=3D"cite" class=3D"">&nbsp;In theory it is possible to select which =
architecture a multi-arch executable is to run under when there is more =
than one option by using the "arch" command, like here to force running =
in Intel emulation mode under Rosetta2 on an M1 Mac:<br class=3D""><br =
class=3D"">arch -x86_64 /path/to/python3{x}<br class=3D""><br =
class=3D"">But there is a big gotcha with that: if anything running =
under that non-default arch Python spins off another Python in a =
subprocess by using the value of sys.executable to find the running =
interpreter binary, the "arch -x86_64" is effectively lost and the =
interpreter in the subprocess will run in the default architecture. This =
happens, for instance, when running Python's own test suite: the =
top-level Python process running regrtest will be running in Intel =
emulation but tests running in subprocesses will still be running in the =
default arm64 arch, possibly giving errors or silently producing =
misleading results. Running the tests using python3{}-intel64 avoids =
that problem.<br class=3D""></blockquote><div class=3D""><br =
class=3D""></div>Yeah, that=E2=80=99s why I=E2=80=99m staying away from =
universal builds for now. Often I have a situation where I run cmake =
which runs make which runs python to create a venv and then somebody =
higher up will use that venv to create something using =E2=80=9Cpython" =
that something else will then use to build something against. The =
chances of this working with =E2=80=9Carch -x86_64=E2=80=9D are slim, if =
that:-)<div class=3D""><br class=3D""></div><div class=3D"">Looking at =
the timeline of the PowerPC-&gt;Intel transition I think most of the =
problem will be solved in another year, because pretty much everything =
will be available for arm natively.<br class=3D""><div class=3D""><br =
class=3D""></div><div class=3D"">
<span =
style=3D"border-collapse:separate;font-variant-ligatures:normal;font-varia=
nt-east-asian:normal;line-height:normal;border-spacing:0px" =
class=3D""><div class=3D""><div style=3D"margin: 0px;" class=3D""><font =
face=3D"Helvetica" size=3D"3" style=3D"font:12px Helvetica" =
class=3D"">--</font></div><div style=3D"margin: 0px;" class=3D""><font =
face=3D"Helvetica" size=3D"3" style=3D"font:12px Helvetica" =
class=3D"">Jack Jansen, &lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank" class=3D"">[email protected]</a>&gt;, <a =
href=3D"http://www.cwi.nl/~jack" target=3D"_blank" =
class=3D"">http://www.cwi.nl/~jack</a></font></div><div style=3D"margin: =
0px;" class=3D""><font face=3D"Helvetica" size=3D"3" style=3D"font:12px =
Helvetica" class=3D"">If I can't dance I don't want to be part of your =
revolution -- Emma Goldman</font></div><br class=3D""></div></span><br =
class=3D"">
</div>
<div class=3D""><br =
class=3D""></div></div></div>_____________________________________________=
__<br class=3D"">
Pythonmac-SIG maillist&nbsp; -&nbsp; <a =
href=3D"mailto:[email protected]" target=3D"_blank" =
class=3D"">[email protected]</a><br class=3D"">
<a href=3D"https://mail.python.org/mailman/listinfo/pythonmac-sig" =
rel=3D"noreferrer" target=3D"_blank" =
class=3D"">https://mail.python.org/mailman/listinfo/pythonmac-sig</a><br =
class=3D"">
unsubscribe: <a =
href=3D"https://mail.python.org/mailman/options/Pythonmac-SIG" =
rel=3D"noreferrer" target=3D"_blank" =
class=3D"">https://mail.python.org/mailman/options/Pythonmac-SIG</a><br =
class=3D"">
</blockquote></div>
_______________________________________________<br =
class=3D"">Pythonmac-SIG maillist &nbsp;- &nbsp;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a><br class=3D""><a =
href=3D"https://mail.python.org/mailman/listinfo/pythonmac-sig" =
class=3D"">https://mail.python.org/mailman/listinfo/pythonmac-sig</a><br =
class=3D"">unsubscribe: =
https://mail.python.org/mailman/options/Pythonmac-SIG<br =
class=3D""></div></blockquote></div><br =
class=3D""></div></div></body></html>=

--Apple-Mail=_A6AFFB9B-FE1F-47A5-9CA3-63C7F1D2E387--

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

--===============4038116380165362551==--