setup: sdist only includes the .c and the .pyx, so skip CYTHON then
authorTero Marttila <terom@paivola.fi>
Mon, 15 Sep 2014 01:48:29 +0300
changeset 151 dfd8022d000e
parent 150 cd07ab2a295c
child 152 7bd8d6062c9e
setup: sdist only includes the .c and the .pyx, so skip CYTHON then
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")