import sys, os
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

cmdclass = {}
cmdclass['build_ext'] = build_ext

import numpy

setup(name="motmot.imops",
      description="image format conversion (e.g. between MONO8, YUV422, and RGB)",
      long_description = """
This is a subpackage of the motmot family of digital image utilities.
""",
      version="0.5.8",
      license="BSD",
      maintainer="Andrew Straw",
      maintainer_email="strawman@astraw.com",
      url="http://code.astraw.com/projects/motmot/imops.html",
      packages = ['motmot','motmot.imops'],
      namespace_packages = ['motmot'],
      ext_modules=[Extension(name="motmot.imops.imops",
                             sources=['src/imops.pyx','src/color_convert.c',],
                             include_dirs=[numpy.get_include()],
                             ),
                   ],
      cmdclass=cmdclass,
      )

@@ -99,25 +99,21 @@
 hon.
-Distutils
+Build
  import 
 buil
@@ -112,66 +112,17 @@
 ort 
-build_ext%0A%0Acmdclass = %7B%7D%0Acmdclass%5B'build_ext'%5D = build_ext
+cythonize
 %0A%0Aim
@@ -634,16 +634,26 @@
 modules=
+cythonize(
 %5BExtensi
@@ -882,33 +882,9 @@
    %5D
-,%0A      cmdclass=cmdclass
+)
 ,%0A  

update setup.py to use cythonize()