setup: avoid cython for android/ios build, and ensure build_ext is imported

This commit is contained in:
Mathieu Virbel 2012-12-16 16:05:25 +01:00
parent 050016cc96
commit e9c5b01231
1 changed files with 8 additions and 8 deletions

View File

@ -44,20 +44,20 @@ if kivy_ios_root is not None:
# -----------------------------------------------------------------------------
# Cython check
if platform == 'ios':
print '\nCython check avoided.'
# on python-for-android and kivy-ios, cython usage is external
have_cython = False
if platform in ('ios', 'android'):
print '\nCython check avoided.'
else:
try:
# check for cython
from Cython.Distutils import build_ext
have_cython = True
except ImportError:
if platform not in ('android', 'ios'):
print '\nCython is missing, its required for compiling kivy !\n\n'
raise
# on python-for-android, cython usage is external
have_cython = False
if not have_cython:
from distutils.command.build_ext import build_ext