modm-io / lbuild

lbuild: a generic, modular code generator in Python 3
https://pypi.org/project/lbuild
BSD 2-Clause "Simplified" License
37 stars 12 forks source link

PathOption, PathCollector needs the localpath of the config #34

Closed salkinium closed 5 years ago

salkinium commented 5 years ago

Currently the Option objects are given no context object, which they could use to interpret the values in. For the PathOption this means all paths are interpreted in the current working directory of the lbuild call, which means inheriting configurations that reference paths from their CWD doesn't work.

The same issue happens for PathCollectors, however, there you can use localpath()/repopath(), but this isn't done automatically (since you may also reference the generated output path).