You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extend the glob tooling to create glob-based rules, similar to "file pattern rules" in make #9
In GNU make there is a powerful concept that many users love for its compacity and expressiveness: so-called "pattern rules". The concept is extremely simple:
you define a recipe for each file matching a certain pattern,
that recipe typically leads to creating one or more files. The names of these files are created based on the name of the original file
For example:
%.tab.c %.tab.h: %.y
bison -d $<
tells make that the recipe bison -d foo.y will make both foo.tab.c and foo.tab.h.
Currently in the python stdlib there is a solid foundation for the "search" part of this: glob. However it remains a bit cumbersome to define glob-generated lists of (source file/folder, destination file(s)/folder(s)). fprules is an attempt to provide such functionality.
As opposed to make where the feature is integrated in the build tool, we could imagine to provide a generic mechanism allowing any build tool to leverage the generated rules. For example doit, nox, etc. fprules follows this principle: it is not tied to a build tool in particular. However it could maybe be improved to become even more expressive (see https://github.com/smarie/python-fprules/issues)
Activity