I would like to setup a default C and C++ compiler when building Python extensions under Linux. I noticed the --compiler option to python setup.py build, but I am wondering if there is a way of setting this as an environmental variable so that I can specify them just once.
I would like to setup a default C and C++ compiler when building Python
Share
It’s not possible to use an environment variable, but you can create a setup.cfg file. See Writing the Setup Configuration File. The following setup.cfg file will try to use the Intel C Compiler: