I'm building a platform independent cython project where I want to pass compiler args based on the compiler being used. I can guess the compiler based on platform or assume it's the same compiler used for Python but it's not guaranteed to match. Normally I inject into the cmdclass
arg to setuptool's setup method and wrap the install or build_ext commands to check internal state. But in this case I have to cythonize the extension modules before I reach the wrappers.
Is there any way to determine the compiler inside setup.py before cythonizing the extension modules?
python setup.py build --compiler=mingw32
? – Forbid--compiler=mingw32
, but other recipients of the repository won't necessarily know what to set the compiler argument to, or if it's a dependency of another repo. Andpip install
definitely won't create such an argument to setuptools. I could read the argument if i were only usingpython setup.py install
myself -- that is true. – Tantalum