Skip to content

CFFI Broken in recent develop updates #3228

@CluckyMedia

Description

@CluckyMedia

Whatever has changed since last week has now broken cffi recipe, dependent when adding cryptography library.

"AttributeError: 'NoneType' object has no attribute 'arch'
... in pythonforandroid/recipes/cffi/init.py -> libffi.get_include_dirs(arch)"

[INFO]: Building cffi for arm64-v8a
[INFO]: cffi apparently isn't already in site-packages
[INFO]: Building compiled components in cffi
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1246, in
main()
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 677, in init
getattr(self, command)(args)
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 104, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 163, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 504, in build_recipes
recipe.build_arch(arch)
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1102, in build_arch
self.build_compiled_components(arch)
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1108, in build_compiled_components
env = self.get_recipe_env(arch)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/cffi/init.py", line 29, in get_recipe_env
env = super().get_recipe_env(arch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 980, in get_recipe_env
host_env = self.get_hostrecipe_env()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/cffi/init.py", line 24, in get_hostrecipe_env
includes = libffi.get_include_dirs(arch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/app/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/init.py", line 38, in get_include_dirs
return [join(self.get_build_dir(arch.arch), 'include')]
^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'arch'
Command failed: ['/opt/hostedtoolcache/Python/3.11.9/x64/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=app', '--bootstrap=sdl2', '--requirements=python3==3.11.9,kivy==2.3.1,kivy_garden.mapview,android,requests,httpx,geopy,pycryptodome,cryptography,urllib3,certifi,charset-normalizer,cachetools,geohash2,Cython<=3,pyjnius@git+https://github.com/kivy/pyjnius.git', '--arch=arm64-v8a', '--copy-libs', '--color=always', '--storage-dir=/home/runner/work/app/.buildozer/android/platform/build-arm64-v8a', '--ndk-api=24', '--ignore-setup-py', '--debug']

Please fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions