Monday, December 29, 2014

How to get project version in waf

You know that line near the top of your topmost wscript file:
VERSION = '1.0'
so you want to get that in another wscript file? So did I. And after going through waflib code, this is the only way I could come up with:
from waflib import Context
version = getattr(Context.g_module, Context.VERSION) 
 
 
 

No comments:

Post a Comment