Lets say I have this Python code in a setup.py script to build a C extension:
from distutils.core import setup, Extension
module1 = Extension('demo', sources = ['demo.c'])
setup (name = 'PackageName',
version = '1.0',
description = 'This is a demo package',
ext_modules = [module1])
Easy enough. Now I call the setup.py script with this line:
C:/> python setup.py build_ext --compiler=mingw32
Ok, but whats the question?
When distutils calls mingw32 and passes all the necessary and operating system independant flags and options to it, how does it figure those flags out?
Where does distutils keep the commands related to each platform, and how can I access them?