I am looking for a solution that would allow me to modify Makefile files from inside Python.
I don’t need any special functionality, usually I need only to change variables like: SOMETHING := value but I would prefer to be able to use an existing library than implementing my own, buggy, parser.
Haven’t heard of such Makefile oriented library for Python, but if you only need simple replacements such as
SOMETHING := [something_placeholder], then you can just load the template file, replace the placeholder with your value and write it back to disk and give it tomake.Or you could use a templating engine such as Jinja2, but this would be yet another dependency for your application.