Reputation: 3235
For the purposes of this question, I have a simple Python GUI (wx) application which I am building on an M1 Macbook Pro using Py2app. Latest setup tools (72.2.0) produces an error on M1/M2, so as per this (https://github.com/ronaldoussoren/py2app/issues/531), I have rolled back to Setuptools version 71.0.0. At the end of the build, I can see there is a 'Segmentation Fault 11' reported. The resulting .app opens and runs on the build machine, but moving this to anotehr M2 mac, results in a crash with Segmentation Fault 11. Any suggestions would be great.
Example app:
import wx
import wx.stc as stc
class MainWindow(wx.Frame):
def __init__(self, parent, id, title):
messageFile = "message.txt"
wx.Frame.__init__(self, parent, id, title, size=(410, 208), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
self.panel = wx.Panel(self, wx.ID_ANY)
self.logWindow = wx.stc.StyledTextCtrl(self.panel, -1, pos=(10, 5), size=(390, 145), style=wx.TE_MULTILINE | wx.TE_PROCESS_ENTER)
self.logWindow.SetMarginWidth(1, 0)
self.logWindow.StyleClearAll()
self.Centre()
self.Show()
with open(messageFile) as f:
lines = f.readlines()[0]
wx.CallAfter(self.logWindow.AppendText, lines)
app = wx.App()
MainWindow(None, -1, 'My App')
app.MainLoop()
Example setup.py:
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['Test_App.py']
OPTIONS = {
'iconfile':'Test_App.icns'
}
setup(
app=APP,
name='Test_App',
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
Upvotes: 0
Views: 65