I'm writing a python program that needs to set the environment CFLAGS as needed.
I'm using the subprocess module to perform some operations, but, I'm not sure this is the correct way of doing this.
The script will first set the CFLAGS and then compile some code, so the cflags need to stay put while the code is compiled.
I know there is the os.environ['CXXFLAGS']
which defaults to "" in my system. So my question is, do I just need to set the os.environ['CXXFLAGS']
value before compiling the code, or do I need to do it some other way?
Please advise