Issue 54 in fabricate: Command arguments

40 views
Skip to first unread message

fabr...@googlecode.com

unread,
Dec 12, 2013, 7:09:17 PM12/12/13
to fabrica...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 54 by wer...@beroux.com: Command arguments
http://code.google.com/p/fabricate/issues/detail?id=54

Currently it allows specifying multiple build commands. What I would find
more useful is if it could allow parameter for a given action. Possibly
allowing a single action sounds more useful.

The simplest way for dev-users would be to allow arguments for each action
function.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

fabr...@googlecode.com

unread,
Dec 12, 2013, 8:06:11 PM12/12/13
to fabrica...@googlegroups.com

Comment #1 on issue 54 by ele...@gmail.com: Command arguments
http://code.google.com/p/fabricate/issues/detail?id=54

You can pass extra_options to main(), see the docstring.

I don't think Python optparse can handle options that apply only to one of
several options.

fabr...@googlecode.com

unread,
Dec 13, 2013, 11:21:26 AM12/13/13
to fabrica...@googlegroups.com

Comment #2 on issue 54 by wer...@beroux.com: Command arguments
http://code.google.com/p/fabricate/issues/detail?id=54

Oh! I'll take a look. That might help, thanks.

fabr...@googlecode.com

unread,
Mar 3, 2014, 4:50:10 PM3/3/14
to fabrica...@googlegroups.com

Comment #3 on issue 54 by wer...@beroux.com: Command arguments
http://code.google.com/p/fabricate/issues/detail?id=54

I took another look at this, it would require actually to:

1. Manually pre-parse the command-line arguments
2. Same the parse extra command-line arguments in some global place
3. Call fabricate.main() with the stripped commands-line args
4. In the function, retrieve the extra command-line arguments.

Yes, quite a lot. So for now `python2 build.py run --some-flag --release`
is not feasable.

Steven Johnson

unread,
Jul 14, 2015, 12:52:14 AM7/14/15
to fabrica...@googlegroups.com
See : https://github.com/SimonAlfie/fabricate/pull/64

This patch updates fabricates option handling from the deprecated optparse to argparse and also fixes extended option handling so that a build script can easily extend the command line.

All the details are in the pull request, and i believe it addresses issue #54

Steven
Reply all
Reply to author
Forward
0 new messages