Python-for-Android:编译Cython文件时出错

Mic*_*ael 3 cython kivy

在git cloning python-for-android之后,我尝试创建一个发行版:

./distribute.sh -m "kivy"
Run Code Online (Sandbox Code Playgroud)

并且没有这种错误:

Error compiling Cython file:
------------------------------------------------------------
...
        vertex_format.last_shader = self
        for i in xrange(vertex_format.vattr_count):
            attr = &vertex_format.vattr[i]
            if attr.per_vertex == 0:
                continue
            attr.index = glGetAttribLocation(self.program, <char *><bytes>attr.name)
                                                          ^
------------------------------------------------------------

kivy/graphics/shader.pyx:448:63: Casting temporary Python object to non-numeric non-Python type
Run Code Online (Sandbox Code Playgroud)

找到这个答案,但没有解决我的问题:

sudo apt-get remove --purge cython
sudo pip install cython
Run Code Online (Sandbox Code Playgroud)

我需要特定的Cython版本吗?

谢谢!

更新

感谢@RyanP我尝试了运行:

cython -V
cython shader.pyx
Run Code Online (Sandbox Code Playgroud)

好吧,Cython版似乎没问题:

Cython version 0.21
Run Code Online (Sandbox Code Playgroud)

但是,shader.pyx仍然无法使用完全相同的错误进行编译.

另一个更新

我做了两件事:

  1. 使用@inclement建议并删除builddist.
  2. 用过的 export P4A_kivy_DIR=/path/to/cloned/kivy/

dist/default最终创建.

use*_*074 6

我不相信这是为Cython 0.21构建的,但对于Cython 0.20尝试使用cython 0.20安装kivy

pip install cython == 0.20

这是描述该问题的线程

https://mail.python.org/pipermail/cython-devel/2014-October/004210.html