Discussion:
[Numpy-discussion] Remove FCompiler flags?
Rob Nagler
2016-07-06 22:43:02 UTC
Permalink
I would like to remove "-fno-second-underscore" and "-Wall" from the
fcompiler. I had hacked a build_clib subclass to remove the flags
dynamically, but that is fragile (and is now broken). Is there a right way
to remove flags?

Thanks,
Rob
Ralf Gommers
2016-07-07 20:19:39 UTC
Permalink
Post by Rob Nagler
I would like to remove "-fno-second-underscore" and "-Wall" from the
fcompiler. I had hacked a build_clib subclass to remove the flags
dynamically, but that is fragile (and is now broken). Is there a right way
to remove flags?
<https://mail.scipy.org/mailman/listinfo/numpy-discussion>
No good way to do that I'm afraid, every method is pretty fragile. If it's
on my own machine, I would just remove the flags from fcompiler/gnu.py by
hand. If it needs to be dynamically, then I'd probably go for
monkeypatching the GnuFCompiler/Gnu95FCompiler classes from that package
instead of a command subclass.

Ralf
Rob Nagler
2016-07-07 21:29:27 UTC
Permalink
Yes, that's what I ended up doing. For the curious, here's the code:

https://github.com/robnagler/shadow3/blob/5a2676b8d20156e33603b898d7a4d690c4511619/setup.py#L21

Rob

Loading...