For example, I may use python setup.py build --compiler=msvc or python setup.py build --compiler=mingw32 or just python setup.py build
python setup.py build --compiler=msvc
python setup.py build --compiler=mingw32
python setup.py build
import distutils.ccompiler
compiler_name = distutils.ccompiler.get_default_compiler()