From b43cd08eb66492277e16d2d180576bb24fe394bf Mon Sep 17 00:00:00 2001 From: Hemna Date: Mon, 18 Nov 2024 10:49:40 -0500 Subject: [PATCH 01/10] Upgrade itsdangerous recipe to 2.2.0 itsdangerous version 2.2.0 eliminated their setup.py, so all toolchain builds of itsdangerous fails due to missing setup.py. This patch updates the recipe for itsdangerous to run pip to install the 2.2.0 version. --- kivy_ios/recipes/itsdangerous/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy_ios/recipes/itsdangerous/__init__.py b/kivy_ios/recipes/itsdangerous/__init__.py index 4157b9e3..3905c059 100644 --- a/kivy_ios/recipes/itsdangerous/__init__.py +++ b/kivy_ios/recipes/itsdangerous/__init__.py @@ -6,19 +6,19 @@ class ItsDangerousRecipe(PythonRecipe): - version = "1.1.0" + version = "2.2.0" url = "https://github.com/mitsuhiko/itsdangerous/archive/{version}.zip" depends = ["python"] def install(self): plat = list(self.platforms_to_build)[0] build_dir = self.get_build_dir(plat) - hostpython = sh.Command(self.ctx.hostpython) + hostpython_pip = sh.Command(join(self.ctx.dist_dir, "hostpython3", "bin", "pip3")) build_env = plat.get_env() dest_dir = join(self.ctx.dist_dir, "root", "python3") build_env['PYTHONPATH'] = self.ctx.site_packages_dir with cd(build_dir): - shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env) + shprint(hostpython_pip, "install", build_dir, "--prefix", dest_dir, _env=build_env) recipe = ItsDangerousRecipe() From bd3b0ce4986d5ddf52c3ba179adc19f4444823ca Mon Sep 17 00:00:00 2001 From: Hemna Date: Tue, 19 Nov 2024 11:51:25 -0500 Subject: [PATCH 02/10] Fix 11.0.0 pillow build The build for Pillow 11.0.0 doesn't work from this file without this change due to the original url scheme not working. Updated the pillow url to go to github to fetch the tar ball. --- kivy_ios/recipes/pillow/__init__.py | 5 +++-- kivy_ios/recipes/pillow/bypass-find-library.patch | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kivy_ios/recipes/pillow/__init__.py b/kivy_ios/recipes/pillow/__init__.py index b91e0f3d..d0ac2fdf 100644 --- a/kivy_ios/recipes/pillow/__init__.py +++ b/kivy_ios/recipes/pillow/__init__.py @@ -5,8 +5,9 @@ class PillowRecipe(CythonRecipe): - version = "8.2.0" - url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-{version}.tar.gz" + version = "11.0.0" + #url = "https://pypi.python.org/packages/source/p/pillow/pillow-{version}.tar.gz" + url = "https://github.com/python-pillow/Pillow/archive/refs/tags/{version}.tar.gz" library = "libpillow.a" depends = [ "hostpython3", diff --git a/kivy_ios/recipes/pillow/bypass-find-library.patch b/kivy_ios/recipes/pillow/bypass-find-library.patch index ccf92d2c..999df6ee 100644 --- a/kivy_ios/recipes/pillow/bypass-find-library.patch +++ b/kivy_ios/recipes/pillow/bypass-find-library.patch @@ -1,10 +1,9 @@ -diff -Naur Pillow-8.2.0.orig/setup.py Pillow-8.2.0/setup.py ---- Pillow-8.2.0.orig/setup.py 2021-04-05 11:11:26.000000000 +0200 -+++ Pillow-8.2.0/setup.py 2021-04-05 11:16:12.000000000 +0200 -@@ -222,12 +222,9 @@ +--- Pillow-11.0.0.orig/setup.py 2024-10-15 01:55:00.000000000 -0400 ++++ Pillow-11.0.0/setup.py 2024-11-19 12:20:09.514795844 -0500 +@@ -231,12 +231,9 @@ - def _find_library_file(self, library): + def _find_library_file(self: pil_build_ext, library: str) -> str | None: - ret = self.compiler.find_library_file(self.compiler.library_dirs, library) - if ret: - _dbg("Found library %s at %s", (library, ret)) @@ -16,4 +15,4 @@ diff -Naur Pillow-8.2.0.orig/setup.py Pillow-8.2.0/setup.py + return True - def _find_include_dir(self, dirname, include): + def _find_include_dir(self: pil_build_ext, dirname: str, include: str) -> bool | str: From be3604bd9f74964bca854eed83ab784f140167ac Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:47:35 +0530 Subject: [PATCH 03/10] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 988430c2..e859eb59 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Kivy for iOS - [![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](https://opencollective.com/kivy) [![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](https://opencollective.com/kivy) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md) From e6d90163fb5c9a1f148b5e49d19b357fce916d44 Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:51:44 +0530 Subject: [PATCH 04/10] Update recipes --- kivy_ios/recipes/bitarray/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 kivy_ios/recipes/bitarray/__init__.py diff --git a/kivy_ios/recipes/bitarray/__init__.py b/kivy_ios/recipes/bitarray/__init__.py new file mode 100644 index 00000000..8af91654 --- /dev/null +++ b/kivy_ios/recipes/bitarray/__init__.py @@ -0,0 +1,10 @@ +from kivy_ios.toolchain import PythonRecipe + + +class BitarrayRecipe(PythonRecipe): + version = "3.0.0" + url = "https://github.com/ilanschnell/bitarray/archive/refs/tags/{version}.tar.gz" + depends = ["hostpython3", "python3"] + + +recipe = BitarrayRecipe() \ No newline at end of file From a243da457bc519653703ea5f66f73f81dd5e06da Mon Sep 17 00:00:00 2001 From: Hemna Date: Mon, 18 Nov 2024 10:49:40 -0500 Subject: [PATCH 05/10] Upgrade itsdangerous recipe to 2.2.0 itsdangerous version 2.2.0 eliminated their setup.py, so all toolchain builds of itsdangerous fails due to missing setup.py. This patch updates the recipe for itsdangerous to run pip to install the 2.2.0 version. --- kivy_ios/recipes/itsdangerous/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy_ios/recipes/itsdangerous/__init__.py b/kivy_ios/recipes/itsdangerous/__init__.py index 4157b9e3..3905c059 100644 --- a/kivy_ios/recipes/itsdangerous/__init__.py +++ b/kivy_ios/recipes/itsdangerous/__init__.py @@ -6,19 +6,19 @@ class ItsDangerousRecipe(PythonRecipe): - version = "1.1.0" + version = "2.2.0" url = "https://github.com/mitsuhiko/itsdangerous/archive/{version}.zip" depends = ["python"] def install(self): plat = list(self.platforms_to_build)[0] build_dir = self.get_build_dir(plat) - hostpython = sh.Command(self.ctx.hostpython) + hostpython_pip = sh.Command(join(self.ctx.dist_dir, "hostpython3", "bin", "pip3")) build_env = plat.get_env() dest_dir = join(self.ctx.dist_dir, "root", "python3") build_env['PYTHONPATH'] = self.ctx.site_packages_dir with cd(build_dir): - shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env) + shprint(hostpython_pip, "install", build_dir, "--prefix", dest_dir, _env=build_env) recipe = ItsDangerousRecipe() From 00e8b95cd93d5cb5698c0f9b5ec28fba3c45e52b Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:40:53 +0530 Subject: [PATCH 06/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e859eb59..4166747e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Additionally, you would need a few system dependencies and configuration. - Using brew, you can install the following dependencies: - brew install autoconf automake libtool pkg-config + brew install autoconf automake libtool pkg-config libjpeg libtiff webp little-cms2 brew link libtool ## Using the toolchain From d44747c07a586ef6dfef4e2a287c42996f86f3c0 Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:23:05 +0530 Subject: [PATCH 07/10] Update __init__.py --- kivy_ios/recipes/bitarray/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy_ios/recipes/bitarray/__init__.py b/kivy_ios/recipes/bitarray/__init__.py index 8af91654..41796217 100644 --- a/kivy_ios/recipes/bitarray/__init__.py +++ b/kivy_ios/recipes/bitarray/__init__.py @@ -7,4 +7,4 @@ class BitarrayRecipe(PythonRecipe): depends = ["hostpython3", "python3"] -recipe = BitarrayRecipe() \ No newline at end of file +recipe = BitarrayRecipe() From 3fd9e01c6bc9d122b79416d1808bfd083e691cd1 Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:25:23 +0530 Subject: [PATCH 08/10] Update __init__.py --- kivy_ios/recipes/pillow/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/kivy_ios/recipes/pillow/__init__.py b/kivy_ios/recipes/pillow/__init__.py index d0ac2fdf..7236ef0b 100644 --- a/kivy_ios/recipes/pillow/__init__.py +++ b/kivy_ios/recipes/pillow/__init__.py @@ -6,7 +6,6 @@ class PillowRecipe(CythonRecipe): version = "11.0.0" - #url = "https://pypi.python.org/packages/source/p/pillow/pillow-{version}.tar.gz" url = "https://github.com/python-pillow/Pillow/archive/refs/tags/{version}.tar.gz" library = "libpillow.a" depends = [ From 99af43494eb34fef390d0383fa8fe12abcecb7f7 Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Sat, 23 Nov 2024 07:55:42 +0530 Subject: [PATCH 09/10] Update setup.cfg --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 710990f7..3df0a12a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,7 +27,7 @@ project_urls = [options] python_requires >= "3.8.0" install_requires = - Cython==0.29.36 + Cython>=3.0.0 cookiecutter pbxproj Pillow From d5c1412c9c4afe6c1463b060900faa62ed189578 Mon Sep 17 00:00:00 2001 From: Kartavya Shukla <87070473+Novfensec@users.noreply.github.com> Date: Sat, 23 Nov 2024 07:55:59 +0530 Subject: [PATCH 10/10] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2933f3aa..97545157 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ pbxproj==3.5.0 Pillow>=6.1.0 cookiecutter==2.1.1 sh==1.12.14 -Cython==0.29.36 \ No newline at end of file +Cython>=3.0.0 \ No newline at end of file