title: Extending setuptools extension to use CMake in setup.py?
body: <p>I'm writing a Python extension that links a C++ library and I'm using cmake to help with the build process. This means that right now, the only way I know how to bundle it, I have to first compile them with cmake before I can run setup.py bdist_wheel. There must be a better way.</p>
  
  <p>I was wondering if it's possible (or anybody has tried) to invoke CMake as part of the setup.py ext_modules build process?  I'm guessing there is a way to create a subclass of something but I'm not sure where to look. </p>
  
  <p>I'm using CMake because it gives me so much more control for building c and c++ libraries extensions with complex build steps exactly as I want it. Plus, I can easily build Python extensions directly with cmake with the PYTHON_ADD_MODULE() command in the findPythonLibs.cmake. I just wish this was all one step.</p>