Closed MNwake closed 7 months ago
I know nothing about recipes but this is what chatgpt was able to do. It said it would need a materialyoucolor recipe and a pybind11 recipe. Neither will build though:
from kivy_ios.toolchain import PythonRecipe, CythonRecipe, shprint
import sh
import os
from os.path import join
class MaterialYouColorRecipe(CythonRecipe):
version = "1.0" # Replace with the actual version
url = "https://github.com/T-Dynamos/materialyoucolor-python/archive/{version}.zip"
depends = ["python3", "pillow", "pybind11"] # Add pybind11 as a dependency
library = "libmaterialyoucolor.a" # Name of the library to be built
include_per_platform = True
cythonize = False
def prebuild_arch(self, arch):
# Prebuild steps if necessary
pass
def build_arch(self, arch):
# Build steps for the C++ extensions
build_env = self.get_recipe_env(arch)
hostpython = sh.Command(self.ctx.hostpython)
shprint(hostpython, "setup.py", "build_ext", _env=build_env)
shprint(hostpython, "setup.py", "install", "--prefix", join(self.ctx.dist_dir, "root", "python3"), _env=build_env)
def get_recipe_env(self, arch):
env = super().get_recipe_env(arch)
# Set additional environment variables if needed
return env
recipe = MaterialYouColorRecipe()
from kivy_ios.toolchain import PythonRecipe, shprint
import sh
import os
from os.path import join
class Pybind11Recipe(PythonRecipe):
version = "2.6.2" # Replace with the version you need
url = "https://github.com/pybind/pybind11/archive/v{version}.tar.gz"
depends = ["python3"]
def install(self):
archs = self.filtered_archs
for arch in archs:
build_dir = self.get_build_dir(arch.arch)
dest_dir = join(self.ctx.dist_dir, "root", "python3")
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=self.get_recipe_env(arch))
recipe = Pybind11Recipe()
Mac: M3 Sonoma 14.4 Python: 3.12, 3.10 https://github.com/T-Dynamos/materialyoucolor-python
KivyMD version 2.0.1 requires materialyoucolor for its theme_manager.
when I toolchain pip install I get this error:
if I build and run the kivymd app without it I get:
/Users//dev/projects/kivy-ios/build/thecwa-ios/YourApp/main.py, line 22
this line imports MDApp from kivymd