| 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>
|
|
TK under Windows/Linux did not have a native support for dark mode.
Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
|
|
The commit 125d0daaa17aa added 'loc' to the sym.ranges tuples and fixed
kconfiglib.py but guiconfig.py is left untouched. This make menuconfig to
die with:
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.13/tkinter/__init__.py", line 2077, in __call__
return self.func(*args)
~~~~~~~~~^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 917, in _tree_double_click
return _tree_enter(event)
File ".../scripts/kconfig/guiconfig.py", line 942, in _tree_enter
_change_node(node, tree.winfo_toplevel())
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../scripts/kconfig/guiconfig.py", line 1125, in _change_node
s = _set_val_dialog(node, parent)
File ".../scripts/kconfig/guiconfig.py", line 1219, in _set_val_dialog
range_info = _range_info(sym)
File ".../scripts/kconfig/guiconfig.py", line 1339, in _range_info
for low, high, cond in sym.ranges:
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
This commit ignores the last element in the tuples.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
|
|
Co-authored-by: Torsten Tejlmand 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
|
|
Makes it consistent with menuconfig.py.
|
|
If there are no visible nodes in the entire tree, guiconfig
automatically starts in show-all mode. Previously, there was no check
for visible nodes when turning off show-all in full-tree mode in this
case, leading to errors.
Fix it by checking if there are any visible nodes in the top menu when
turning off show-all in full-tree mode. If there aren't, show-all stays
on.
|
|
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.
|
|
Most common case, and makes the symbol info read better.
|
|
menuconfig.py tended to crash on I/O errors on Python 2, due to
forgetting to update some 'except OSError's. Catch EnvironmentError
instead.
EnvironmentError is a common base class of IOError and OSError on Python
2, and an alias for OSError on Python 3. Use it elsewhere too, as it
might help catch obscure I/O errors on Python 2.
|
|
Forgot that they show defaults separately. Use orig_defaults instead of
'defaults' to de-spam it a bit. The direct dependencies are shown above
the defaults.
|
|
Just cosmetic.
|
|
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).
|
|
Commit e81a77b ("Consistently put direct deps. last when propagating")
makes the position of the direct deps. in property conditions
predictable after dependency propagation, making it easy to strip them
as needed.
Use this to implement MenuNode.orig_{prompt,defaults,selects,implies,ranges},
which work like the non-orig_* versions but omit the direct deps. Use
those in turn to omit the direct deps in Symbol/Choice.__str__().
The direct deps. (with propagated parent deps.) can still be seen after
'depends on ...', so there is no loss of information.
This unclutters Kconfig definitions shown in menuconfig/guiconfig and in
any generated documentation. The old output also had duplicated
dependencies, though it doesn't matter for evaluation.
Before:
config A
bool
prompt "A" if DEP
default y if FOO && DEP
depends on DEP
After:
config A
bool
prompt "A"
default y if FOO
depends on DEP
|
|
Mention that the old version of an overwritten configuration file is
saved to <filename>.old in a few different places, to make it easier to
discover.
|
|
|
|
|
|
Move the global variable descriptions earlier, remove some redundant
comments, and clarify that the Python 3-only comment in setup.py is
talking about the terminal menuconfig.
|
|
Mostly to get things consistent with _update_jump_to_display().
|
|
This is a graphical configuration interface written in Tkinter. Like
menuconfig.py, it supports showing all symbols (with invisible symbols
in red) and jumping directly to symbols. Symbol values can also be
changed directly from the jump-to dialog.
When single-menu mode is enabled, a single menu is shown at a time, like
in the terminal menuconfig. Only this mode distinguishes between symbols
defined with 'config' and symbols defined with 'menuconfig'.
Compatible with both Python 2 and Python 3. Has been tested on X11,
Windows, and macOS.
To avoid having to carry around a bunch of GIFs, the image data is
embedded in guiconfig.py. To use separate GIF files instead, change
_USE_EMBEDDED_IMAGES to False. The image files can be found in
https://github.com/ulfalizer/Kconfiglib/tree/screenshots/guiconfig.
A new `make guiconfig` target in the Makefile patch will run the GUI
configuration interface on the Linux kernel.
|