target_python_file = 'main.py'
ccode = (
    """#include <Python.h>
int
main(int argc, char *argv[])
{
  PyObject* PyFileObject;
  putenv("PYTHONPATH=C:/Python27/Lib");
  putenv("PYTHONHOME=C:/Python27");
  Py_SetProgramName(argv[0]);
  Py_Initialize();
  PyFileObject = PyFile_FromString("%s", "r");
  PyRun_SimpleFileEx(PyFile_AsFile(PyFileObject), "%s", 1);
  Py_Finalize();
  return 0;
}
"""
     % (target_python_file, target_python_file))
with open('main.c', 'w') as main:
    main.write(ccode)
compiler = MSVCCompiler()
compiler.compile(['main.c'], include_dirs=['C:/Python27/include'])
compiler.link_executable(['main.obj'], 'launch', libraries=['python27'],
    library_dirs=['C:/Python27/libs'])
How to compile simple python embeded program using distutils