Re: [Pythonmac-SIG] Universal build launches as Intel on M1

2022-03-28 Thread Ned Deily
On 28 Mar 2022, at 10:08, Aivar Annamaa  wrote:
> I have an app bundle, with embedded python.org's universal build of Python 
> 3.10.2 framework and a Tkinter-based GUI 
> (https://github.com/thonny/thonny/releases/tag/v4.0.0b1)
> 
> I've used IDLE's approach in the Info.plist, and the launcher script. 
> Functionally all is working fine, but a M1 user reported, that when opened 
> from Finder, the app is launched in "Intel" mode. When the launcher is 
> invoked in Terminal (/Applications/Thonny.app/Contents/MacOS/thonny), the app 
> gets run in AMD64 mode. I don't have a M1 myself, so I haven't reproduced it 
> myself.
> 
> The same user now said that latest IDLE (3.10.4) runs in AMD64 mode even when 
> launched from Finder.
> 
> Any ideas what to check or try in order to make my app run in native mode?
> 
> My launcher script template is here: 
> https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/MacOS/thonny
>  (shebang becomes gets set to 
> .../Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python
>  by the postinstall script)
> 
> Info.plist template is here: 
> https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/Info.plist


It looks the problem is in your Distribution.plist; change the 
hostArchitectures to "arm64,x86_64".  Otherwise, the macOS installer assumes 
your app can only run as an Intel binary.

https://github.com/thonny/thonny/blob/a9d12ba961eac875dc4a77ac1fb226baf5c3acc9/packaging/mac/Distribution.plist#L9

--
  Ned Deily
  n...@python.org -- []

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Universal build launches as Intel on M1

2022-03-28 Thread jack . jansen
I can’t check right now (I don’t have a universal Python installed, just to 
separate intel and M1 pythons), but if you use Finder “Get Info” on the 
application bundle: does it show the “Open using Rosetta” checkbox?

If it does: ensure it is unchecked.
--
Jack Jansen, , http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman



> On 28 Mar 2022, at 10:08, Aivar Annamaa  wrote:
> 
> Hi!
> 
> I have an app bundle, with embedded python.org 's 
> universal build of Python 3.10.2 framework and a Tkinter-based GUI 
> (https://github.com/thonny/thonny/releases/tag/v4.0.0b1 
> )
> 
> I've used IDLE's approach in the Info.plist, and the launcher script. 
> Functionally all is working fine, but a M1 user reported, that when opened 
> from Finder, the app is launched in "Intel" mode. When the launcher is 
> invoked in Terminal (/Applications/Thonny.app/Contents/MacOS/thonny), the app 
> gets run in AMD64 mode. I don't have a M1 myself, so I haven't reproduced it 
> myself.
> 
> The same user now said that latest IDLE (3.10.4) runs in AMD64 mode even when 
> launched from Finder.
> 
> Any ideas what to check or try in order to make my app run in native mode?
> 
> My launcher script template is here: 
> https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/MacOS/thonny
>  
> 
>  (shebang becomes gets set to 
> .../Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python
>  by the postinstall script)
> 
> Info.plist template is here: 
> https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/Info.plist
>  
> 
> 
> Best regards,
> Aivar
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] Universal build launches as Intel on M1

2022-03-28 Thread Aivar Annamaa
Hi!

I have an app bundle, with embedded python.org's universal build of Python
3.10.2 framework and a Tkinter-based GUI (
https://github.com/thonny/thonny/releases/tag/v4.0.0b1)

I've used IDLE's approach in the Info.plist, and the launcher script.
Functionally all is working fine, but a M1 user reported, that when opened
from Finder, the app is launched in "Intel" mode. When the launcher is
invoked in Terminal (/Applications/Thonny.app/Contents/MacOS/thonny), the
app gets run in AMD64 mode. I don't have a M1 myself, so I haven't
reproduced it myself.

The same user now said that latest IDLE (3.10.4) runs in AMD64 mode even
when launched from Finder.

Any ideas what to check or try in order to make my app run in native mode?

My launcher script template is here:
https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/MacOS/thonny
(shebang becomes gets set
to 
.../Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python
by the postinstall script)

Info.plist template is here:
https://github.com/thonny/thonny/blob/master/packaging/mac/Thonny.app.initial_template/Contents/Info.plist

Best regards,
Aivar
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG