mirror of https://github.com/kivy/kivy.git
rework setup.py to make android build been able to generate cython itself
This commit is contained in:
parent
07349f10ac
commit
112b00a2d9
8
setup.py
8
setup.py
|
@ -8,9 +8,11 @@ from distutils.extension import Extension
|
|||
try:
|
||||
# check for cython
|
||||
from Cython.Distutils import build_ext
|
||||
have_cython = True
|
||||
except ImportError:
|
||||
print '\nCython is missing, its required for compiling kivy !\n\n'
|
||||
raise
|
||||
have_cython = False
|
||||
from distutils.command.build_ext import build_ext
|
||||
|
||||
# extract version (simulate doc generation, kivy will be not imported)
|
||||
environ['KIVY_DOC_INCLUDE'] = '1'
|
||||
|
@ -105,6 +107,10 @@ for root, dirnames, filenames in walk(join(dirname(__file__), 'kivy')):
|
|||
for filename in fnfilter(filenames, '*.pyx'):
|
||||
pyx_files.append(join(root, filename))
|
||||
|
||||
if not have_cython:
|
||||
pyx_files = pyx_files = ['%s.c' % x[:-4] for x in pyx_files]
|
||||
pxd_files = []
|
||||
|
||||
# add cython core extension modules if cython is available
|
||||
|
||||
if True:
|
||||
|
|
Loading…
Reference in New Issue