| Age | Commit message (Collapse) | Author |
|
This handles a case of leaving a menu which is not shown by the parent menu.
This might occur, for instance, when searching for the symbol of a named choice,
which is extended by an invisible symbol somewhere else.
|
|
During macro expansion, bare macros on a line are accepted by the parser
as long as they resolve to blank strings. The problem is that the script
is currently checking using isspace, so it's actually not checking for
blank strings.
This causes the parsing to fail when a macro is the last line of a file,
and no newline character is added afterwards. This patch adds a check for
the string itself being empty.
|
|
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/33212
Ignoring when user inputs NULL in a text field.
menuconfig exits with a python stack trace if NULL is provided as input
character, therefore ignore NULL as an input character to prevent this
behaviour.
A NULL character may be given accidentally by the user through the
following ways:
- Pressing `Win` key on keyboard (Windows only)
- Pressing `<CTRL>-@` / `<CTRL>-2`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
|
|
In linux commit 6dd85ff178cd76851e2184b13e545f5a88d1be30, Linux Torvalds
changed "option modules" to plain "modules" since it was the only option
left. kconfiglib does not have much support for either besides parsing
it and suppressing warnings when it is applied to the 'MODULES' symbol.
Mirror this behaviour for the newer "modules" property.
Fixes: #106
|
|
Co-authored-by: Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no>
|
|
|
|
This patch adds a test for the origin feature added in the series.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
|
|
Track information about what caused a value to be set in the 'origin'
property of Symbol. 'imply' and 'select' dependencies do not have a
location associated with them, so in those cases the location is
a string representation of the dependency expression. For defaults and
user values, the location in the Kconfig file is stored.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
|
|
Store the location (filename and line number) where a 'select', 'imply',
'range' or 'default' was added to a Symbol or Choice.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
|
|
The 'user_loc' stores the location (filename and line number) where a
symbol or choice was last set via a direct user selection.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
|
|
Replace filename and linenr parameters to _warn() with a single loc
element, which is a constant (filename, linenr) tuple that can be more
efficiently passed and stored.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
|
|
Replace 'filename' and 'linenr' usages with a single 'loc' attribute,
which is a (filename, linenr) tuple. This simplifies code dealing with
locations, and makes it explicitly constant. The original attributes are
now provided via properties for compatibility.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
|
|
GitHub doesn't offer ubuntu-20.04 runners since april 2025
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
|
|
Python versions < 3.8 are all EOL
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
|
|
This commit bumps the package versin to v1.14.1a4.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit adds the classifiers for the Python versions from 3.9 to
3.12 since these versions have been tested to be compatible.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit adds a GitHub Actions CI workflow that tests and builds the
Kconfiglib Python package and publishes it to PyPI when a new release is
published.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit updates various outdated links and contact information
throughout the repository.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit updates all the old 'ulfalizer' Kconfiglib repository links
in the README file to point to the new 'zephyrproject-rtos' Kconfiglib
repository.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit updates the Python test workflow to run the macOS Python
3.7 case on the GitHub runner `macos-12` image, instead of the
`macos-13` image because it is (erroneously) missing the ncurses
installation as of the version 20240930.147.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit updates the CI workflows such that each workflow has its own
unique concurrency identifier prefix.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit adds a GitHub Actions CI workflow that builds source and
built distribution (wheel) packages.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
This commit adds a GitHub Actions CI workflow that runs the full
testsuite with the "release test" script using various Python versions
and host operating systems.
Note that the testing on Windows host is currently disabled because the
test scripts do not correctly handle Windows paths at this time.
Also note that Python 2.7 is not tested because it is now archaic and
supporting it is pointless.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
The reltest script previously hard-coded the Python executable names,
which may vary across different host systems.
This commit updates the reltest script to accept custom Python
executable name(s) as arguments; if no argument is specified, 'python2'
and 'python3' are used by default.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
|
Adds commit 2a6ac31 ("Return a message from Kconfig.write_autoconf()").
|
|
Like for Kconfig.write_config() and Kconfig.write_min_config(), return a
string from Kconfig.write_autoconf() with a message saying that the
header got saved, or that there were no changes to it. Can be handy in
tools.
Also make the "no change" message for the various files more specific,
by mentioning what type of file it is (configuration, header, etc.)
Return True/False from Kconfig._write_if_changed() to indicate if the
file was updated. This also allows it to be reused in
Kconfig.write_min_config().
|
|
Adds commit 9e0a8d2 ("Use 'python3' instead of 'python' in hashbangs").
This has some breakage potential on older systems (though not when
installing via 'pip'), so the major version is increased to 14.
|
|
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
|
|
Adds commit 68bcecd ("menuconfig: Work around crash on resize on some
macOS systems").
|
|
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.
|
|
It's not the 'next' attribute of the node that's added that's set, but
the 'next' attribute of the node before it.
|
|
No longer links to a heavy page after the reference was split up.
|
|
Makes it consistent with menuconfig.py.
|
|
Say 'top-level' instea of 'base'.
|
|
Clear enough with the comment style. Shortens things a bit.
|
|
Shortens things a bit.
|
|
Adds commit 87fab02 ("Add "error: " to the error message for a missing
endchoice/endif/endmenu").
|
|
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.
|
|
Makes it consistent with other parse errors and easier to find in logs,
etc.
|
|
|
|
Adds commit 456f821 ("menuconfig: Improve look and readability of the
aquatic theme").
|
|
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.
|
|
'node' isn't needed. Shaves some lookups.
|
|
Adds commit 24a0204 ("Include sys.argv[0] in error messages when
suppress_traceback=True").
|
|
Handy to have the script name appear in logs.
|
|
Oversight.
|
|
Shorter, clear in context.
|
|
Shorter, clear in context.
|
|
Move it into the step-by-step getting started instructions.
|
|
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()")
|