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 are still not resolved properly sometimes #826

Closed
inclement opened this issue Jul 7, 2016 · 0 comments · Fixed by #1064
Closed

Recipes are still not resolved properly sometimes #826

inclement opened this issue Jul 7, 2016 · 0 comments · Fixed by #1064

Comments

@inclement
Copy link
Member

inclement commented Jul 7, 2016

It's possible to end up with python2 but not hostpython2.

Here's a log demonstrating it, provided by frmdstryr on irc:

# Check that aidl can be executed
# Search for Aidl
# Run '/home/jrm/.buildozer/android/platform/android-sdk-20/build-tools/24.0.0/aidl'
# Cwd None
# Android packages installation done.
# Check application requirements
# Check garden requirements
# Compile platform
# Run 'python -m pythonforandroid.toolchain create --dist_name=gpsexample --bootstrap=sdl2 --requirements=plyer,kivy --arch armeabi-v7a --copy-libs'
# Cwd /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (19)
[INFO]:    Requested API target 19 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK
[INFO]:    Got NDK version from $ANDROIDNDKVER
[INFO]:    Using Google NDK r9c
[INFO]:    Found virtualenv at /usr/local/bin/virtualenv
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[WARNING]: Missing executable: autoconf is not installed
[WARNING]: Missing executable: automake is not installed
[WARNING]: Missing executable: libtoolize is not installed
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Bootstrap requires recipes ['sdl2', ('python2', 'python3crystax')]
[INFO]:    No recipe named plyer; will attempt to install with pip
[INFO]:    Loaded recipe sdl2 (depends on [('python2', 'python3crystax'), 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf'], conflicts ['sdl', 'pygame', 'pygame_bootstrap_components'])
[INFO]:    Loaded recipe kivy (depends on ['pyjnius', ('sdl2', 'pygame'), ('python2', 'python3crystax')])
[INFO]:    Loaded recipe sdl2_image (depends on [])
[INFO]:    Loaded recipe sdl2_mixer (depends on [])
[INFO]:    Loaded recipe sdl2_ttf (depends on [])
[INFO]:    Loaded recipe pyjnius (depends on ['six', ('sdl2', 'sdl', 'genericndkbuild'), ('python2', 'python3crystax')])
[INFO]:    Loaded recipe six (depends on [('python2', 'python3crystax')])
[INFO]:    Found multiple valid recipe sets:
[INFO]:        ['six', 'sdl2', u'kivy', 'sdl2_ttf', 'sdl2_mixer', 'sdl2_image', 'pyjnius', 'python2']
[INFO]:        ['sdl2', 'six', 'sdl2_ttf', 'python3crystax', 'sdl2_mixer', 'sdl2_image', 'pyjnius', u'kivy']
[INFO]:    Using the first of these: ['six', 'sdl2', u'kivy', 'sdl2_ttf', 'sdl2_mixer', 'sdl2_image', 'pyjnius', 'python2']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name gpsexample and recipes (plyer, kivy)
[INFO]:    -> running cp -r /home/jrm/workspace/plyer/example...(and 176 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Recipe build order is ['python2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    The requirements (plyer) were not found as recipes, they will be installed with pip.
[INFO]:    # Downloading recipes 
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 27 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/python2
[INFO]:    -> running basename http://python.org/ftp/python/2....(and 24 more)
[INFO]:    python2 download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 30 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.org/projects...(and 42 more)
[INFO]:    sdl2_image download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 30 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.org/projects...(and 42 more)
[INFO]:    sdl2_mixer download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 28 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org/projects...(and 39 more)
[INFO]:    sdl2_ttf download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 24 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
[INFO]:    sdl2 download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 23 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/six
[INFO]:    -> running basename https://pypi.python.org/package...(and 31 more)
[INFO]:    six download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 27 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/pyjnius
[INFO]:    -> running basename https://github.com/kivy/pyjnius...(and 19 more)
           working: master.zip                           [INFO]:    pyjnius download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /home/jrm/.local/share/python-f...(and 24 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/packages/kivy
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/master.zip
[INFO]:    kivy download already cached, skipping
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    # Building all recipes for arch armeabi-v7a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking python2 for armeabi-v7a
[INFO]:    -> running basename http://python.org/ftp/python/2....(and 24 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/other_builds/python2/armeabi-v7a
[INFO]:    python2 is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/projects...(and 42 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_mixer for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/projects...(and 42 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_ttf for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/projects...(and 39 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2 for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
                                   [INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    sdl2 is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking six for armeabi-v7a
[INFO]:    -> running basename https://pypi.python.org/package...(and 31 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/other_builds/six-python2/armeabi-v7a
[INFO]:    six is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking pyjnius for armeabi-v7a
[INFO]:    -> running basename https://github.com/kivy/pyjnius...(and 19 more)
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a
[INFO]:    pyjnius is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking kivy for armeabi-v7a
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/master.zip
[INFO]:    -> directory context /home/jrm/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi-v7a
[INFO]:    kivy is already unpacked, skipping
[INFO]:    <- directory context /home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding python2 for armeabi-v7a
[INFO]:    python2 has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for python2[armeabi-v7a]
[INFO]:    python2 already patched, skipping
[INFO]:    Prebuilding sdl2_image for armeabi-v7a
[INFO]:    sdl2_image has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for sdl2_image[armeabi-v7a]
[INFO]:    sdl2_image already patched, skipping
[INFO]:    Prebuilding sdl2_mixer for armeabi-v7a
[INFO]:    sdl2_mixer has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for sdl2_mixer[armeabi-v7a]
[INFO]:    sdl2_mixer already patched, skipping
[INFO]:    Prebuilding sdl2_ttf for armeabi-v7a
[INFO]:    sdl2_ttf has no prebuild_armeabi_v7a, skipping
[INFO]:    Prebuilding sdl2 for armeabi-v7a
[INFO]:    sdl2 has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for sdl2[armeabi-v7a]
[INFO]:    sdl2 already patched, skipping
[INFO]:    Prebuilding six for armeabi-v7a
[INFO]:    six has no prebuild_armeabi_v7a, skipping
[INFO]:    Prebuilding pyjnius for armeabi-v7a
[INFO]:    pyjnius has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for pyjnius[armeabi-v7a]
[INFO]:    pyjnius already patched, skipping
[INFO]:    Prebuilding kivy for armeabi-v7a
[INFO]:    kivy has no prebuild_armeabi_v7a, skipping
[INFO]:    # Building recipes
[INFO]:    Building python2 for armeabi-v7a
[INFO]:    Copying hostpython binary to targetpython folder
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 790, in <module>
    main()
  File "/home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 787, in main
    ToolchainCL()
  File "/home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 462, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 142, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 185, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 561, in build_recipes
    recipe.build_arch(arch)
  File "/home/jrm/workspace/plyer/examples/gps/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py", line 52, in build_arch
    shprint(sh.cp, self.ctx.hostpython,
AttributeError: 'Context' object has no attribute 'hostpython'
# Command failed: python -m pythonforandroid.toolchain create --dist_name=gpsexample --bootstrap=sdl2 --requirements=plyer,kivy --arch armeabi-v7a --copy-libs
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
jrm@xps:~/workspace/plyer/examples/gps$ 
jrm@xps:~/workspace/plyer/examples/gps$ buildozer --version
# Check configuration tokens
Buildozer 0.33dev

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant