diff --git a/kivy_ios/recipes/materialyoucolor/__init__.py b/kivy_ios/recipes/materialyoucolor/__init__.py new file mode 100644 index 00000000..f2b1ba17 --- /dev/null +++ b/kivy_ios/recipes/materialyoucolor/__init__.py @@ -0,0 +1,17 @@ +from kivy_ios.toolchain import PythonRecipe + + +class MaterialYouColorRecipe(PythonRecipe): + version = "2.0.7" + url = "https://github.com/T-Dynamos/materialyoucolor-pyhton/archive/refs/tags/v{version}.tar.gz" + depends = ["hostpython3", "python3"] + hostpython_prerequisites = ["certifi"] + + def prebuild_platform(self, plat): + if self.has_marker("patched"): + return + self.apply_patch("fix_cert.patch") + self.set_marker("patched") + + +recipe = MaterialYouColorRecipe() diff --git a/kivy_ios/recipes/materialyoucolor/fix_cert.patch b/kivy_ios/recipes/materialyoucolor/fix_cert.patch new file mode 100644 index 00000000..259e6878 --- /dev/null +++ b/kivy_ios/recipes/materialyoucolor/fix_cert.patch @@ -0,0 +1,22 @@ +--- materialyoucolor-pyhton/setup.py 2024-03-16 20:29:35.548962347 +0530 ++++ materialyoucolor-pyhton.patched/setup.py 2024-03-16 20:31:14.222400319 +0530 +@@ -50,6 +50,8 @@ + from functools import lru_cache + from pathlib import Path + import urllib.request ++import ssl ++import certifi + from glob import glob + from setuptools import find_packages, setup + from typing import ( +@@ -537,7 +539,9 @@ + print("Downloading required files...") + for file in FILES: + with open(os.path.join(FOLDER, os.path.basename(file)), "w") as write_buffer: +- write_buffer.write(urllib.request.urlopen(URL + file).read().decode("utf-8")) ++ write_buffer.write(urllib.request.urlopen( ++ URL + file, context=ssl.create_default_context(cafile=certifi.where()) ++ ).read().decode("utf-8")) + write_buffer.close() + print("[Downloaded] : " + file) +