Replies: 1 comment 2 replies
-
Why don't you just do: py = pymod.find_installation()
mymod = [py, '-m', 'mymod']
tgt = custom_target(... command: [mymod, '@INPUT@', '@OUTPUT@']) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm specifically thinking this would be useful for executing python modules (
python -m foo
-- on Windows installed scripts aren't often available on the PATH), but it's general enough that it could save typing and aid readability in other places too.Currently if you want to not repeat yourself a bunch, you need to do something like this:
I propose making the following possible for any external program:
The
with_args
function would return a new external_program object (without changing the original), and would add to the internal command list. In theory, all existing usages of external_program should continue to work, as the internal command is already a list due to automatic detection of shebangs and etc.Open to bikeshedding on the method name.
Beta Was this translation helpful? Give feedback.
All reactions