Attempting to compile kivy from source for me results in the following error:
cythoning .\kivy\graphics/svg.pyx to .\kivy\graphics\svg.c
Error compiling Cython file:
------------------------------------------------------------
...
end = time()
Logger.debug("Svg: Loaded {} in {:.2f}s".format(filename, end - start))
finally:
fd.close()
cdef void reload(self) except *:
^
------------------------------------------------------------
kivy\graphics\svg.pyx:469:9: 'reload' already defined
building 'kivy.graphics.svg' extension
C:\Python27\Scripts\gcc.exe -mdll -O -Wall -I.\kivy\include -IC:\Python27\include -I.\kivy\include -IC:\Python27\include -IC:\Python27\PC -c .\kivy\graphics\svg.c -o build\temp.win-amd64-2.7\Release\.\kivy\graphics\svg.o
.\kivy\graphics\svg.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result of a failed Cython compilation.
^
error: command 'C:\\Python27\\Scripts\\gcc.exe' failed with exit status 1
I suspect this is related to this commit: https://github.com/kivy/kivy/commit/ced5e6a7a6474b72722cef4e3470ed6bc58d1793. When I check out the commit before that one, it compiles correctly.
can you indicate your Cython version too?
The change compiles with your environment and there we use Cython 0.25.2
. It might be that you have an old Cython and this change might be only in X version forwards.
Edit: Although, MinGW and MinGWPy are a little bit different, which might be the thing too I presume? Try to install the latter with:
pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy
Thanks guys, it compiles correctly with Cython 0.25! I was using Cython 0.24. It might be worth mentioning in the install guide that we have a hard dependency on Cython 0.25 now -- the installation page lists Cython 0.23 in bold: https://kivy.org/docs/installation/installation.html
@sbrother Thank you. You save my day.
Most helpful comment
Thanks guys, it compiles correctly with Cython 0.25! I was using Cython 0.24. It might be worth mentioning in the install guide that we have a hard dependency on Cython 0.25 now -- the installation page lists Cython 0.23 in bold: https://kivy.org/docs/installation/installation.html