| Age | Commit message (Collapse) | Author |
|
A follow-up to b96a5ad562deffa697d966c29546650aae645f48 where we stopped
having CI run tests on Python 2.x. This actually drops the few remaining
Python 2.x compatibility bits as Python 2.x has EOL'd a long time ago.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
|
|
It's not obligatory for distributions to have a 'python' binary these
days, but 'python3' is likely to be available:
https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors.
Change all hashbangs to point to 'python3'.
This will break running
$ ./script.py
on *nix systems that don't have a 'python3' executable. Changing it to
$ python script.py
is pretty painless at least.
This change won't break Python 2 when installing via 'pip', because
entry_points creates bounce scripts with their own hashbangs.
The major version will be increased, in case someone looks at the major
version but doesn't install via 'pip'.
Fixes: #89
|
|
Show the help text for each new symbol if --show-help/-l is passed (-h
might be confused for --help).
Copycat of commit 5d8b42aa7ccb ("kconfig: Add option to get the full
help text with listnewconfig") to the C tools, but with a slightly more
compact output format (indented help text instead of separators).
|
|
Stuff like this is not the pinnacle of helpful design, and hides that
the commands actually have long help texts (that can be viewed with
pydoc):
$ ./menuconfig.py --help
[Errno 2] No such file or directory: '--help'
Fix it by converting standard_kconfig() to argparse, and add a
'description' argument to it for the command-specific help text. --help
now shows the same help text shown by pydoc, and some other error
messages are improved as well.
Also fix some copy-paste errors and outdated paths in the help texts for
the all*config commands.
|
|
Hardcoding load_config() and write_(min_)config() to write any message
to stdout is awkward, because it means that the message can't be easily
reused when stdout is the wrong place to write it to (e.g. in
menuconfig/guiconfig). This gets extra bad now that there's also the "No
change to ..." message.
Modify load_config() and write_(min_)config() to return the message as a
string instead, and have them always return a message, instead of just
when 'filename' is None and verbose=True. This makes things flexible and
straightforward.
Use the new behavior in menuconfig.py and guiconfig.py. They now show
"No change to ..." when saving a file doesn't modify it.
Tools that want to write messages to stdout should now do
print(kconf.load_config()) / print(kconf.write_config()).
There's no clean way to preserve perfect backwards compatibility here,
but keep accepting the 'verbose' argument and print a deprecation
warning if a value is ever passed for it. That way, scripts will keep
running, though possibly with less output on stdout.
This changes the meaning of the load_config() return value as well,
though I suspect it was only ever used by the menuconfig/guiconfig
interfaces.
The new behavior applies for kconfiglib.VERSION >= (12, 0, 0).
|
|
|
|
This makes running pydoc(3) on the utilities helpful.
Reuse the module docstring for the --help text for utilities that use
argparse.
Also fix some copy-paste errors in the all*config.py descriptions and
clean up the language a bit.
Piggyback removal of an optimization in allmodconfig.py that's pretty
irrelevant now.
|
|
|
|
Also remove some no longer used imports.
|
|
|
|
Mirrors 'make listnewconfig' in the C tools.
|