From e9c5b012312208c7d844f7d86fb09dd57c77702a Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Sun, 16 Dec 2012 16:05:25 +0100 Subject: [PATCH] setup: avoid cython for android/ios build, and ensure build_ext is imported --- setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 2f940b70a..a9e69bab5 100644 --- a/setup.py +++ b/setup.py @@ -44,21 +44,21 @@ if kivy_ios_root is not None: # ----------------------------------------------------------------------------- # Cython check -if platform == 'ios': +# on python-for-android and kivy-ios, cython usage is external +have_cython = False +if platform in ('ios', 'android'): print '\nCython check avoided.' - have_cython = False 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 - from distutils.command.build_ext import build_ext + print '\nCython is missing, its required for compiling kivy !\n\n' + raise + +if not have_cython: + from distutils.command.build_ext import build_ext # -----------------------------------------------------------------------------