diff --git a/mac_osx_app/__boot__.py b/mac_osx_app/__boot__.py index e398a24b..5e8e9f00 100644 --- a/mac_osx_app/__boot__.py +++ b/mac_osx_app/__boot__.py @@ -4,7 +4,7 @@ import re os.environ["ARGVZERO"] = sys.argv[0] os.environ["RESOURCEPATH"] = os.path.split(__file__)[0] -PYTHON = 'python3.11' +PYTHON = 'python3.13' def _reset_sys_path(): # Clear generic sys.path[0] @@ -96,12 +96,12 @@ def _setup_ctypes(): _setup_ctypes() -def _boot_tkinter(): - import os - - resourcepath = os.environ["RESOURCEPATH"] - os.putenv("TCL_LIBRARY", os.path.join(resourcepath, "lib/tcl8")) - os.putenv("TK_LIBRARY", os.path.join(resourcepath, "lib/tk8.6")) +#def _boot_tkinter(): +# import os +# +# resourcepath = os.environ["RESOURCEPATH"] +# os.putenv("TCL_LIBRARY", os.path.join(resourcepath, "lib/tcl8")) +# os.putenv("TK_LIBRARY", os.path.join(resourcepath, "lib/tk8.6")) #_boot_tkinter() diff --git a/mac_osx_app/release.py b/mac_osx_app/release.py index 01cfaf10..672fbb36 100755 --- a/mac_osx_app/release.py +++ b/mac_osx_app/release.py @@ -9,15 +9,14 @@ from subprocess import check_call, call, Popen, PIPE from math import ceil from check_target import TkChecker -APP_PYTHON = 'python3.11' -PYTHON_ZIP = 'python311.zip' +APP_PYTHON = 'python3.13' +PYTHON_ZIP = 'python313.zip' # Make sure that we have our frameworks. if not os.path.exists('Frameworks.tgz'): print("Please build the frameworks for SnapPy.app first.") sys.exit(1) -# Disable M1 builds until we can test. os.environ['_PYTHON_HOST_PLATFORM'] = 'macosx-10.9-universal2' os.environ['ARCHFLAGS'] = '-arch arm64 -arch x86_64' @@ -170,7 +169,7 @@ def do_release(python, dmg_name, freshen=True): nmd_python_dir = os.environ['HOME'] + '/pkgs/pythons' if os.path.exists(nmd_python_dir): print('Using virtualenv Pythons') - python3 = nmd_python_dir + '/py311/bin/python' + python3 = nmd_python_dir + '/py313/bin/python' else: python3 = APP_PYTHON freshen = '--no-freshen' not in sys.argv diff --git a/mac_osx_app/setup.py b/mac_osx_app/setup.py index 20c8d5ce..4987cc5f 100644 --- a/mac_osx_app/setup.py +++ b/mac_osx_app/setup.py @@ -1,47 +1,17 @@ -""" -This is a setup.py script generated by py2applet - -Usage: - python setup.py py2app - -Building everything from scratch: - -Download and install Python 2.6.2 binary installer : http://www.python.org/download/releases/2.6.2/ -Download and install Tcl/Tk 8.5 binaries : http://www.activestate.com/activetcl/ -Download Python 2.6.2 source : http://www.python.org/download/releases/2.6.2/ - - -tar xjf Python-2.6.2.tar.bz2 -cd Python-2.6.2 -./configure --enable-framework --enable-universalsdk -make -cp build/lib.macosx-10.3-fat-2.6/_tkinter.so /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/ - - -python ~/work/bin/ez_setup.py -cd ~/work/plink; python setup.py install - -python -m easy_install ipython -python -m easy_install py2app -sudo touch /Library/Frameworks/Python.framework/Versions/2.6/Resources/version.plist -python -m easy_install mercurial -python -m easy_install sphinx -python -m easy_install pyx==0.12.1 -.... - - -Note for 8.4.19 one needs to rebuild libToGL. -For 8.5.7.... -""" - from setuptools import setup, Command import os, sys, glob, plistlib from py2app import __version__ as py2app_version +import py2app.util + +def codesign_adhoc(bundle): + print('Monkey patching py2app to prevent codesigning, since we do this ourselves at the end') +py2app.util.codesign_adhoc = codesign_adhoc + from snappy.version import version as SnapPy_version try: import pyx except ImportError: - raise ValueError('Please install PyX. (For python 2.7 use version 0.12.1.)') + raise ValueError('Please install PyX.') class clean(Command): user_options = []