kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
758 stars 237 forks source link

pandas recipe #836

Closed pythonsus closed 11 months ago

pythonsus commented 11 months ago

@misl6 Is your feature request related to a problem? Please describe. pandas does not work on kivy-ios Describe the solution you'd like i want pandas to work Describe alternatives you've considered use pyspark , but it uses subprocess so launch failed Additional context i am working on it but i keep getting error: here is what i have so far:

from kivy_ios.toolchain import CppCompiledComponentsPythonRecipe

class PandasRecipe(CppCompiledComponentsPythonRecipe):
    version = '1.0.3'
    url = 'https://github.com/pandas-dev/pandas/releases/download/v{version}/pandas-{version}.tar.gz'  # noqa
    hostpython_prerequisites = ["Cython==0.29.36"]
    pbx_libraries = ["libbz2", "liblzma"]

    depends = ['numpy']

    python_depends = ['python-dateutil', 'pytz']
    patches = ['fix_numpy_includes.patch']

recipe = PandasRecipe()

i added the CppCompiledComponentsPythonRecipe

error when building my recipe:

[INFO    ] Install_hostpython_prerequisites pandas
[DEBUG   ] New State: pandas.install_hostpython_prerequisites at 2023-07-21 15:46:30.197188
[INFO    ] Build_all pandas
[INFO    ] Build pandas for arm64 (filtered)
[INFO    ] Build pandas
[INFO    ] Prebuild pandas for arm64
[DEBUG   ] Invoking prebuild_arm64
[INFO    ] Build pandas for arm64
[DEBUG   ] Invoking build_arm64
[INFO    ] Building compiled components in pandas
[INFO    ] CC and CXX will not use ccache
Traceback (most recent call last):
  File "/Users/suhaan/Documents/kivy-ios/venv/bin/toolchain", line 8, in <module>
    sys.exit(main())
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 1628, in main
    ToolchainCL()
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 1308, in __init__
    getattr(self, args.command)()
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 1377, in build
    build_recipes(args.recipe, ctx)
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 1142, in build_recipes
    recipe.execute()
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 704, in execute
    self.build_all()
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 80, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 803, in build_all
    self.build(arch)
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 80, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 790, in build
    self.build_arch(arch)
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 1592, in build_arch
    self.build_compiled_components(arch)
  File "/Users/suhaan/Documents/kivy-ios/kivy_ios/toolchain.py", line 1599, in build_compiled_components
    hostpython = sh.Command(self.hostpython_location)
AttributeError: 'PandasRecipe' object has no attribute 'hostpython_location'
misl6 commented 11 months ago

Duplicate of #616 , if you want to propose a new recipe, please open a PR, and if it's not ready yet, set it to draft status. 😀