Commits

Andriy Kornatskyy  committed 8bf887e

Cythonize python modules in setup.

  • Participants
  • Parent commits 2671196

Comments (0)

Files changed (1)

 except:
     from distutils.core import setup  # noqa
 
+extra = {}
+try:
+    from Cython.Build import cythonize
+    path = os.path.join('src', 'wheezy', 'template')
+    extra['ext_modules'] = cythonize(
+        [os.path.join(path, '*.py'),
+         os.path.join(path, 'ext', '*.py')],
+        quiet=True)
+except ImportError:
+    pass
+
 README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
 
 setup(
         ],
     },
 
-    platforms='any'
+    platforms='any',
+    **extra
 )