aradi / fypp

Python powered Fortran preprocessor
http://fypp.readthedocs.io
BSD 2-Clause "Simplified" License
192 stars 30 forks source link

Use optparse like fypp in fypp_preprocessor. #2

Closed haraldkl closed 6 years ago

haraldkl commented 6 years ago

The fypp_preprocessor.py module for waf seems to assume that fypp uses an argparse object, while in fact it uses optparse instead. I always get an error complaining about an unknown namespace argument because of this. This patch harmonizes the fypp_preprocessor module with fypp itself by using the optparse logic.

Probably it would be better to switch completely to argparse instead, as optparse is deprecated.

aradi commented 6 years ago

Thanks a lot! indeed, I have forgotten to change it, when we moved from argparse to optparse. You are completely right with the deprecation of optparse, and I'd be happy to replace it with argparse. However, we need Python 2.6 compatibility at the moment (there are still HPC systems without Python 2.7 around!) and that is only possible with optparse. :disappointed: