Skip to content

p4a create error: kivy/_clock.pxd:6:4: Executable statement not allowed here #822

@Fak3

Description

@Fak3

Hi. I am using p4a version 0.4. I am trying to build clean distro with command:

python-for-android create --dist_name=testsdl2 --bootstrap=sdl2 --requirements=sdl2,python2,kivy,pil

I got an error:

[INFO]:    Unpacking kivy for armeabi
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/master.zip
[INFO]:    -> directory context /home/u1/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi                                                                                              
[INFO]:    -> running mv kivy-master /home/u1/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi/kivy
[INFO]:    <- directory context /home/u1

....

[INFO]:    <- directory context /home/u1                                                                                                                                                                           
[INFO]:    Building kivy for armeabi
('name is', None, <class 'pythonforandroid.recipes.kivy.KivyRecipe'>)
[INFO]:    kivy apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in kivy
('path is', '/home/u1/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/:/home/u1/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/:/home/u1/.buildozer/android/platform/android-ndk-r9c:/home/u1/Android/Sdk/tools:/usr/local/heroku/bin:/home/u1/.local/bin:/usr/local/heroku/bin:/home/u1/.local/bin:/home/u1/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:.:/usr/sbin:/usr/sbin')
[INFO]:    -> directory context /home/u1/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi/kivy
[INFO]:    -> running python.host -c import sys; print(sys.path)
('cwd is', '/home/u1/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi/kivy')                                                                                                           
[INFO]:    Trying first build of kivy to get cython files: this is expected to fail
[INFO]:    -> running python.host setup.py build_ext -v
()                                                                                                                                                                                                                 
[INFO]:    kivy first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize kivy/weakproxy.pyx
[INFO]:    -> running cython ./kivy/weakproxy.pyx
[INFO]:    Cythonize kivy/properties.pyx
[INFO]:    -> running cython ./kivy/properties.pyx
[INFO]:    Cythonize kivy/_clock.pyx
[INFO]:    -> running cython ./kivy/_clock.pyx
Traceback (most recent call last):                                                                                                                                                                                 
  File "/usr/bin/python-for-android", line 9, in <module>
    load_entry_point('python-for-android==0.4', 'console_scripts', 'python-for-android')()
  File "/usr/lib/python2.7/site-packages/pythonforandroid/toolchain.py", line 754, in main
    ToolchainCL()
  File "/usr/lib/python2.7/site-packages/pythonforandroid/toolchain.py", line 343, in __init__
    getattr(self, command_method_name)(unknown)
  File "/usr/lib/python2.7/site-packages/pythonforandroid/toolchain.py", line 93, in wrapper_func
    build_dist_from_args(ctx, dist, dist_args)
  File "/usr/lib/python2.7/site-packages/pythonforandroid/toolchain.py", line 138, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "/usr/lib/python2.7/site-packages/pythonforandroid/build.py", line 561, in build_recipes
    recipe.build_arch(arch)
  File "/usr/lib/python2.7/site-packages/pythonforandroid/recipe.py", line 921, in build_arch
    self.build_cython_components(arch)
  File "/usr/lib/python2.7/site-packages/pythonforandroid/recipe.py", line 958, in build_cython_components
    self.cythonize_build(env=env)
  File "/usr/lib/python2.7/site-packages/pythonforandroid/recipe.py", line 992, in cythonize_build
    self.cythonize_file(env, build_dir, join(root, filename))
  File "/usr/lib/python2.7/site-packages/pythonforandroid/recipe.py", line 983, in cythonize_file
    shprint(cython_command, filename, *self.cython_args, _env=cyenv)
  File "/usr/lib/python2.7/site-packages/pythonforandroid/logger.py", line 173, in shprint
    for line in output:
  File "/usr/lib/python2.7/site-packages/sh.py", line 565, in next
    self.wait()
  File "/usr/lib/python2.7/site-packages/sh.py", line 500, in wait
    self.handle_command_exit_code(exit_code)
  File "/usr/lib/python2.7/site-packages/sh.py", line 516, in handle_command_exit_code
    raise exc(self.ran, self.process.stdout, self.process.stderr)
sh.ErrorReturnCode_1: 

  RAN: '/usr/bin/cython ./kivy/_clock.pyx'

  STDOUT:

Error compiling Cython file:
------------------------------------------------------------
...

cdef class ClockEvent(object):

    cdef int _is_triggered
    cdef public ClockEvent next
    '''The next :class:`ClockEvent` in order they were scheduled.
   ^
------------------------------------------------------------

kivy/_clock.pxd:6:4: Executable statement not allowed here



  STDERR:

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