Skip to content

Setting p4a.source_dir in buildozer causes AttributeError: module 'build' has no attribute 'parse_args_and_make_package' #2149

Closed
@zedr

Description

@zedr

Versions

  • Python: 3.7.5
  • OS: Linux
  • Kivy: 1.11.1
  • Cython: 0.29.16

Description

Setting a custom p4a source dir using a freshly cloned 'develop' branch and then building an APK results in a traceback mentioning an AttributeError:

Traceback (most recent call last):
  File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 1231, in <module>
    main()
  File "/home/zedr/src/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 688, in __init__
    getattr(self, command)(args)
  File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 155, in wrapper_func
    func(self, args, **kw)
  File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 1099, in apk
    output, build_args = self._build_package(args, package_type='apk')
  File "/home/zedr/src/python-for-android/pythonforandroid/toolchain.py", line 1000, in _build_package
    build_args = build.parse_args_and_make_package(
AttributeError: module 'build' has no attribute 'parse_args_and_make_package'

The error does not occur if I use the master branch instead.

buildozer.spec

Command:

python3.7 -m pythonforandroid.toolchain apk --debug --bootstrap=sdl2 --dist_name letter_trail --name 'Letter Trail' --version 0.1.0 --package com.zedr.games.letter_trail --minsdk 21 --ndk-api 21 --private /home/zedr/src/trail/.buildozer/android/app --permission INTERNET --permission WAKE_LOCK --android-entrypoint org.kivy.android.PythonActivity --android-apptheme @android:style/Theme.NoTitleBar --orientation portrait --window --wakelock --copy-libs --local-recipes /home/zedr/src/trail/recipes --arch armeabi-v7a --color=always --storage-dir="/home/zedr/src/trail/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21

Spec file:

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
p4a.source_dir = ~/src/python-for-android

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