summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-24Use 'python3' instead of 'python' in hashbangsUlf Magnusson
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
2020-01-12Make 13.7.1 release to work around macOS menuconfig resizing crashv13.7.1Ulf Magnusson
Adds commit 68bcecd ("menuconfig: Work around crash on resize on some macOS systems").
2020-01-12menuconfig: Work around crash on resize on some macOS systemsUlf Magnusson
get_wch() has started raising curses.error when resizing the terminal on some macOS Python installations. Work around for now by falling back on getch(), which still works. See https://github.com/ulfalizer/Kconfiglib/issues/84. Needs more investigation, but I don't have a Mac handy. Based on https://github.com/ulfalizer/Kconfiglib/pull/85, but with some more comments.
2020-01-12Fix _parse_block() comment re. next pointerUlf Magnusson
It's not the 'next' attribute of the node that's added that's set, but the 'next' attribute of the node before it.
2020-01-12Remove heavy page warning for Kconfig symbol reference in ZephyrUlf Magnusson
No longer links to a heavy page after the reference was split up.
2020-01-12guiconfig: Shorten _sorted_sc_nodes() a bitUlf Magnusson
Makes it consistent with menuconfig.py.
2020-01-12Make help for Kconfig file argument consistent in toolsUlf Magnusson
Say 'top-level' instea of 'base'.
2020-01-12menuconfig: Remove some double blank linesUlf Magnusson
Clear enough with the comment style. Shortens things a bit.
2020-01-12Put some comments at the end of lines.Ulf Magnusson
Shortens things a bit.
2019-12-22Make 13.7.0 releasev13.7.0Ulf Magnusson
Adds commit 87fab02 ("Add "error: " to the error message for a missing endchoice/endif/endmenu").
2019-12-22Remove redundant 'node.next = None' assignment for the last node in a fileUlf Magnusson
A node already gets its .next pointer set in _parse_block() if it is either 1. followed by another node, or 2. the last node in a menu, choice, or if. This also works for nodes from 'source'd files, so there's no need to special-case the ends of them. Remove the 'node.next = None' assignment for ends of files. Instead, special-case just the last node in all files, and set its .next to None in Kconfig._init(). Unlikely to give a noticeable performance improvement. Just tightens up the chaining logic a bit.
2019-12-22Add "error: " to the error message for a missing endchoice/endif/endmenuUlf Magnusson
Makes it consistent with other parse errors and easier to find in logs, etc.
2019-12-21Fix typo in commentUlf Magnusson
2019-12-19Make 13.6.0 release to improve aquatic themev13.6.0Ulf Magnusson
Adds commit 456f821 ("menuconfig: Improve look and readability of the aquatic theme").
2019-12-19menuconfig: Improve look and readability of the aquatic themeUlf Magnusson
Cyan-on-blue for the path/help text is hard to read, especially on some terminals. Also remove bold, which looks a bit cleaner at a glance.
2019-12-17Pass 'node.item' instead of 'node' to Kconfig._set_type()Ulf Magnusson
'node' isn't needed. Shaves some lookups.
2019-12-17Make 13.5.0 release to include script name for suppress_traceback=Truev13.5.0Ulf Magnusson
Adds commit 24a0204 ("Include sys.argv[0] in error messages when suppress_traceback=True").
2019-12-17Include sys.argv[0] in error messages when suppress_traceback=TrueUlf Magnusson
Handy to have the script name appear in logs.
2019-12-17Remove pointless return in Kconfig.__init__()Ulf Magnusson
Oversight.
2019-12-17Rename _make_depend_on() to _depend_on()Ulf Magnusson
Shorter, clear in context.
2019-12-17Rename _parse_properties() to _parse_props()Ulf Magnusson
Shorter, clear in context.
2019-12-14Make link to Kconfig tips page easier to spotUlf Magnusson
Move it into the step-by-step getting started instructions.
2019-12-14Make 13.4.0 release with error reporting and listnewconfig improvementsv13.4.0Ulf Magnusson
Error reporting improvements: - Commit 1ec9170 ("Add Kconfig.__init__() helper flag for suppressing tracebacks") - Commit 2122d5d ("Include "error: " in parsing error messages") listnewconfig improvement: - Commit 7e6b9cf ("listnewconfig: Add option for showing help texts") Also includes a load_allconfig() API improvement: - Commit c2414bd ("Add a member function version of load_allconfig()")
2019-12-14listnewconfig: Add option for showing help textsUlf Magnusson
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).
2019-12-14Make genconfig and standard_kconfig() consistentUlf Magnusson
Tweak messages and variable names to match.
2019-12-14Include "error: " in parsing error messagesUlf Magnusson
Oversight. Makes them easier to find in logs.
2019-12-14Add Kconfig.__init__() helper flag for suppressing tracebacksUlf Magnusson
Tools that don't use standard_kconfig() currently generate spammy tracebacks for e.g. syntax errors. Add a suppress_traceback flag to Kconfig.__init__() for catching "expected" exceptions and printing them to stderr and exiting with status 1. Use it to make all tools consistently hide tracebacks.
2019-12-14Add a member function version of load_allconfig()Ulf Magnusson
There was no great reason for this function to be a global function to begin with. Having it as a member function simplifies callers. load_allconfig() is a bit special in that it fails with sys.exit(), which is helpful for tools, but that probably doesn't influence where it belongs. Keep the global function for backwards compatibility. A deprecation warning might be added at some point.
2019-12-14Mention that esp-idf uses KconfiglibUlf Magnusson
2019-12-11Update links to Kconfig tips page in READMEUlf Magnusson
Moved in Zephyr.
2019-11-27Make 13.3.2 releasev13.3.2Ulf Magnusson
Adds two small menuconfig robustness improvements: - Commit 7020b86 ("menuconfig: Ignore MENUCONFIG_STYLE on non-color terminals") - Commit 4ea8b2b ("menuconfig: Ignore errors from use_default_colors()")
2019-11-27menuconfig: Ignore errors from use_default_colors()Ulf Magnusson
Checking has_colors() isn't enough with with the winpty/msys2 setup in https://github.com/msys2/MINGW-packages/issues/5823, though it seems a bit broken. ncurses looks for either the orig_pair or the orig_color terminal capability, which is different from what has_colors() checks, so probably shouldn't assume use_default_colors() work on color terminals at least.
2019-11-27menuconfig: Rename _STYLE_STD_COLORS to _NAMED_COLORSUlf Magnusson
Clearer.
2019-11-27menuconfig: Reuse _IS_WINDOWS for curses import error checkUlf Magnusson
No need to check both os.name and sys.platform.
2019-11-27menuconfig: Ignore MENUCONFIG_STYLE on non-color terminalsUlf Magnusson
Assume that the environment is non-standard/broken on terminals that don't support color, and that any custom styling applied to the 'monochrome' theme is likely to mess things up (though any colors will be ignored). The menuconfig really needs more than two colors to not look ugly anyway, because of the borderless design.
2019-11-23Make 13.3.1 releasev13.3.1Ulf Magnusson
Adds a menuconfig fix for ANSI-only color terminals and a robustness tweak for the aquatic theme: - Commit 7a98bc7 ("menuconfig: Check that bright named colors are < curses.COLORS") - Commit 1ad02f5 ("menuconfig: Avoid the non-ANSI 'brightwhite' color in the aquatic theme")
2019-11-23menuconfig: Avoid the non-ANSI 'brightwhite' color in the aquatic themeUlf Magnusson
Not available with TERM=xterm (as opposed to xterm-256color). Use fg:white instead of fg:brightwhite for dialog box bodies. Not a huge difference. Came up in https://github.com/espressif/esp-idf/issues/4387.
2019-11-23menuconfig: Check that bright named colors are < curses.COLORSUlf Magnusson
The bright colors in the range 8-15 are not ANSI and are not guaranteed to be available. Previously, the code assumed that all named colors are always available on color terminals, and skipped the check against curses.COLORS. This led to this error e.g. with TERM=xterm (as opposed to xterm-256color) and the aquatic theme, which uses 'brightwhite': _curses.error: init_pair() returned ERR Fix it by checking the number returned for named colors against curses.COLORS as well. Came up in https://github.com/espressif/esp-idf/issues/4387.
2019-11-20genconfig: Add tip re. defining multi-line variables in makefilesUlf Magnusson
Handy for KCONFIG_{CONFIG,AUTOHEADER}_HEADER.
2019-11-19Make 13.3.0 release with improved header comment customizationv13.3.0Ulf Magnusson
Adds two new features: - Commit bb3be6e ("Support giving the header path in KCONFIG_AUTOHEADER") - Commit de45874 ("Make header strings customizable via the environment")
2019-11-17Support giving the header path in KCONFIG_AUTOHEADERUlf Magnusson
This environment variable is used by the C tools. Use it when filename=None is passed to write_autoconf(), and default to include/generated/autoconf.h for compatibility. Also update genconfig.py to use KCONFIG_AUTOHEADER if set when no --header-path is passed. If KCONFIG_AUTOHEADER isn't set, keep defaulting to 'config.h' for backwards compatibility. It's probably a saner default for tools as well.
2019-11-17Make header strings customizable via the environmentUlf Magnusson
If no header string is specified in write_(min_)config() or write_autoconf(), use the values of the environment variables KCONFIG_CONFIG_HEADER and KCONFIG_AUTOHEADER_HEADER, respectively, if set. KCONFIG_AUTOHEADER_HEADER is consistent with KCONFIG_AUTOHEADER (the header path), which will be added soon. Using environment variables avoids having to add separate flags to each tool that writes configuration files or headers. Like for $prefix and $CONFIG_, store the values of the environment variables when the Kconfig instance is created, and expose them via Kconfig.config_header and Kconfig.header_header. This if flexible and avoids gotchas when working with multiple Kconfig instances. Also remove the old default header and make the default no header. Less advertising, but it felt a bit silly to add workarounds to keep it. Came up in https://github.com/ulfalizer/Kconfiglib/pull/80.
2019-10-29Make 13.2.0 release with Symbol/Choice.name_and_loc helperv13.2.0Ulf Magnusson
Adds a helper that's handy for messages involving symbols/choices, and a small documentation fix. - Commit e1ccf19 ("Add public helpers for generating "<name> (defined at ...)" strings"). - Commit 2d1cb7e ("Add missing Choice.str_value documentation")
2019-10-29Add public helpers for generating "<name> (defined at ...)" stringsUlf Magnusson
Have Symbol/Choice.name_and_loc return strings like "MY_SYM (defined at foo:1, bar:2)" "<choice> (defined at foo:4)" I've added a function like that in at least four different scripts now, so that's probably a sign that it's a worthwhile helper. Clean up the tests/Klocation tests a bit while adding tests.
2019-10-29Add missing Choice.str_value documentationUlf Magnusson
Oversight. It's just a string version of Choice.tri_value, like for Symbol.tri_value vs. Symbol.str_value. Also rearrange the property documentation to put user_value next to tri_value and str_value in the Symbol and Choice docstrings.
2019-10-10Link RST versions of Kconfig documentationUlf Magnusson
The Linux docs were updated from plain text to RST.
2019-10-10Make 13.1.1 releasev13.1.1Ulf Magnusson
Adds a small fix for some just-rewritten documentation, in commit 4de95f4 ("Mention that standard_kconfig() returns the Kconfig instance").
2019-10-10Mention that standard_kconfig() returns the Kconfig instanceUlf Magnusson
Accidentally left out when the docstring was rewritten.
2019-10-10allnoconfig: Comment nitUlf Magnusson
2019-10-10Make 13.1.0 releasev13.1.0Ulf Magnusson
- Commit e016deb ("Convert standard_kconfig() to argparse for better feedback") improves feedback from the tools and makes their help texts easier to find - Commit 0f56dd9 ("guiconfig: Check for visible nodes before turning off show-all in full-tree mode") fixes an obscure bug in show-all mode in guiconfig