diff --git a/kivy_ios/recipes/hostpython3/__init__.py b/kivy_ios/recipes/hostpython3/__init__.py index 9ffa195f..b9d1e37c 100644 --- a/kivy_ios/recipes/hostpython3/__init__.py +++ b/kivy_ios/recipes/hostpython3/__init__.py @@ -11,7 +11,7 @@ class Hostpython3Recipe(HostRecipe): - version = "3.11.6" + version = "3.12.6" url = "https://www.python.org/ftp/python/{version}/Python-{version}.tgz" depends = ["hostopenssl"] optional_depends = [] @@ -19,8 +19,8 @@ class Hostpython3Recipe(HostRecipe): def init_with_ctx(self, ctx): super().init_with_ctx(ctx) - self.set_hostpython(self, "3.11") - self.ctx.so_suffix = ".cpython-311m-darwin.so" + self.set_hostpython(self, "3.12") + self.ctx.so_suffix = ".cpython-312m-darwin.so" self.ctx.hostpython = join(self.ctx.dist_dir, "hostpython3", "bin", "python") self.ctx.hostpgen = join(self.ctx.dist_dir, "hostpython3", "bin", "pgen") logger.info("Global: hostpython located at {}".format(self.ctx.hostpython)) @@ -100,7 +100,7 @@ def install(self): self.ctx.dist_dir, "hostpython3", "lib", - "python3.11", + "python3.12", "site-packages", "setuptools", ), diff --git a/kivy_ios/recipes/python3/__init__.py b/kivy_ios/recipes/python3/__init__.py index 47e78066..f4ef1502 100644 --- a/kivy_ios/recipes/python3/__init__.py +++ b/kivy_ios/recipes/python3/__init__.py @@ -9,16 +9,16 @@ class Python3Recipe(Recipe): - version = "3.11.6" + version = "3.12.6" url = "https://www.python.org/ftp/python/{version}/Python-{version}.tgz" depends = ["hostpython3", "libffi", "openssl"] - library = "libpython3.11.a" + library = "libpython3.12.a" pbx_libraries = ["libz", "libbz2", "libsqlite3"] def init_with_ctx(self, ctx): super().init_with_ctx(ctx) - self.set_python(self, "3.11") - ctx.python_ver_dir = "python3.11" + self.set_python(self, "3.12") + ctx.python_ver_dir = "python3.12" ctx.python_prefix = join(ctx.dist_dir, "root", "python3") ctx.site_packages_dir = join( ctx.python_prefix, "lib", ctx.python_ver_dir, "site-packages") @@ -135,9 +135,9 @@ def reduce_python(self): # platform binaries and configuration with cd(join( self.ctx.dist_dir, "root", "python3", "lib", - "python3.11", "config-3.11-darwin")): + "python3.12", "config-3.12-darwin")): sh.rm( - "libpython3.11.a", + "libpython3.12.a", "python.o", "config.c.in", "makesetup", @@ -146,11 +146,11 @@ def reduce_python(self): # cleanup pkgconfig and compiled lib with cd(join(self.ctx.dist_dir, "root", "python3", "lib")): - sh.rm("-rf", "pkgconfig", "libpython3.11.a") + sh.rm("-rf", "pkgconfig", "libpython3.12.a") # cleanup python libraries with cd(join( - self.ctx.dist_dir, "root", "python3", "lib", "python3.11")): + self.ctx.dist_dir, "root", "python3", "lib", "python3.12")): sh.rm("-rf", "wsgiref", "curses", "idlelib", "lib2to3", "ensurepip", "turtledemo", "lib-dynload", "venv", "pydoc_data") @@ -171,12 +171,12 @@ def reduce_python(self): sh.find(".", "-name", "__pycache__", "-type", "d", "-delete") # create the lib zip - logger.info("Create a python3.11.zip") - sh.mv("config-3.11-darwin", "..") + logger.info("Create a python3.12.zip") + sh.mv("config-3.12-darwin", "..") sh.mv("site-packages", "..") sh.zip("-r", "../python311.zip", sh.glob("*")) sh.rm("-rf", sh.glob("*")) - sh.mv("../config-3.11-darwin", ".") + sh.mv("../config-3.12-darwin", ".") sh.mv("../site-packages", ".") diff --git a/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/main.m b/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/main.m index 517eceb3..8e5dbe89 100644 --- a/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/main.m +++ b/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/main.m @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) { NSString *python_home = [NSString stringWithFormat:@"PYTHONHOME=%@", resourcePath, nil]; putenv((char *)[python_home UTF8String]); - NSString *python_path = [NSString stringWithFormat:@"PYTHONPATH=%@:%@/lib/python3.11/:%@/lib/python3.11/site-packages:.", resourcePath, resourcePath, resourcePath, nil]; + NSString *python_path = [NSString stringWithFormat:@"PYTHONPATH=%@:%@/lib/python3.12/:%@/lib/python3.12/site-packages:.", resourcePath, resourcePath, resourcePath, nil]; putenv((char *)[python_path UTF8String]); NSString *tmp_path = [NSString stringWithFormat:@"TMP=%@/tmp", resourcePath, nil]; diff --git a/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj b/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj index 3235a30b..54e25647 100755 --- a/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj +++ b/kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj @@ -252,7 +252,7 @@ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "{{ cookiecutter.dist_dir }}/root/python3/include/python3.11/**", + "{{ cookiecutter.dist_dir }}/root/python3/include/python3.12/**", "{{ cookiecutter.dist_dir }}/include/common/sdl2", ); INFOPLIST_FILE = "{{ cookiecutter.project_name }}-Info.plist"; @@ -288,7 +288,7 @@ GCC_PREFIX_HEADER = ""; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ( - "{{ cookiecutter.dist_dir }}/root/python3/include/python3.11/**", + "{{ cookiecutter.dist_dir }}/root/python3/include/python3.12/**", "{{ cookiecutter.dist_dir }}/include/common/sdl2", ); INFOPLIST_FILE = "{{ cookiecutter.project_name }}-Info.plist";