Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipes: add new materialyoucolor recipe #898

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions kivy_ios/recipes/materialyoucolor/__init__.py
Original file line number Diff line number Diff line change
@@ -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"]
T-Dynamos marked this conversation as resolved.
Show resolved Hide resolved
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()
22 changes: 22 additions & 0 deletions kivy_ios/recipes/materialyoucolor/fix_cert.patch
Original file line number Diff line number Diff line change
@@ -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)

Loading