Skip to content

Pass per-target options as invoke args #20

@edvardm

Description

@edvardm

If we have a rule like

foo: opts ?= --fast -W
foo:
    build $(opts)

we could try parsing those opts and pass to invoke with some assumptions like this:

@task
def foo(c, fast: bool = True, W: bool = True):
    c.run("build")

Not sure if this is the way to go though, as the two formats are not isomorphic; using example above, Make would treat opts just as an unstructured string allowing use of positional args, which invoke doesn't have

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions