diff -r cd07ab2a295c -r dfd8022d000e setup.py --- a/setup.py Mon Sep 15 01:34:42 2014 +0300 +++ b/setup.py Mon Sep 15 01:48:29 2014 +0300 @@ -10,10 +10,10 @@ except ImportError : CYTHON = False -if CYTHON: - pypngtile_sources = [ "python/pypngtile.pyx" ] +if CYTHON and os.path.exists('python/pypngtile.pyx'): + pypngtile_sources = [ 'python/pypngtile.pyx' ] elif os.path.exists("python/pypngtile.c"): - pypngtile_sources = [ "python/pypngtile.c" ] + pypngtile_sources = [ 'python/pypngtile.c' ] else: raise Exception("Building from source requires Cython")