summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-03-14Make 10.41.0 releasev10.41.0Ulf Magnusson
Adds some minor optimization (and internal refactoring) in commit c0b9b07 ("Refactor and optimize type parsing a bit").
2019-03-14menuconfig: Fix some typos in commentsUlf Magnusson
2019-03-14oldconfig: Style nitUlf Magnusson
2019-03-14Comment nitUlf Magnusson
2019-03-14menuconfig: Put two blank lines between top-level functionsUlf Magnusson
Be consistent with the other utilities.
2019-03-14Put two blank lines between top-level functions/classesUlf Magnusson
Make kconfiglib.py consistent with the utilities.
2019-03-14Refactor and optimize type parsing a bitUlf Magnusson
Have BOOL/TRISTATE/... match _T_BOOL/_T_TRISTATE/... so that _set_type() doesn't have to do any conversion in the common case. Conversion is still needed for _T_DEF_BOOL/_T_DEF_TRISTATE/..., but those are rare. Also make use of UNKNOWN being falsy. Piggyback some rearranging of global constants so that related stuff appears closer together, for readability.
2019-03-14Clarify shutil lazy importUlf Magnusson
2019-03-10Make 10.40.0 releasev10.40.0Ulf Magnusson
Adds a silly small optimization in commit 8ddefea ("Import 'platform' and 'subprocess' as needed").
2019-03-10Import 'platform' and 'subprocess' as neededUlf Magnusson
Saves around 10 ms of startup time when they aren't, as measured with '-X importtime'.
2019-03-08Say 'implementation' instead of 'parser' in descriptionUlf Magnusson
Does more than just parsing.
2019-03-08Fix typo in kconfig_filenames docUlf Magnusson
2019-03-06listnewconfig: Remove redundant backslashUlf Magnusson
2019-03-06Code formatting nitUlf Magnusson
Make the exception argument to _KconfigIOError() harder to miss.
2019-03-06Make 10.39.0 releasev10.39.0Ulf Magnusson
- Commit 132e579 ("Give more helpful error messages when files are missing") makes the hint in error messages for missing files more helpful. - Commit faa4476 ("setconfig: Fix help text format") fixes the format of 'setconfig --help'. - Commit 553cca8 ("Use a consistent style in small utilities") and commit 66557ed ("Use a consistent style in examples") cleans the utilities and examples up a bit and removes some unused imports.
2019-03-06setconfig: Fix help text formatUlf Magnusson
Need to use RawDescriptionHelpFormatter to preserve newlines in the description. Also fix a typo in the help text (s/assignments/assignment/)
2019-03-06Give more helpful error messages when files are missingUlf Magnusson
The current error message talks a lot about $srctree, but $srctree is seldom the culprit in practice. More common is 'source "$(SOME_ENV_VAR)/foo"`, where SOME_ENV_VAR hasn't been set. Include the complete 'source ...' line for missing Kconfig files, and mention unset environment variables as a hint. Only mention $srctree briefly. Also shorten the message when a .config can't be a found a bit. This message would usually only be seen when working directly with the library.
2019-03-06Use a consistent style in examplesUlf Magnusson
Also remove some unused imports.
2019-03-06Use a consistent style in small utilitiesUlf Magnusson
Also remove some no longer used imports.
2019-03-06genconfig: Get rid of DESCRIPTION variableUlf Magnusson
Used in a single place.
2019-03-06Fix typo in commentUlf Magnusson
2019-02-23Make 10.38.0 releasev10.38.0Ulf Magnusson
Adds a small documentation improvement in commit 99a7af7 ("Document that kconfig_filenames keeps absolute paths as-is").
2019-02-23Fix spelling in commentUlf Magnusson
2019-02-23Shorten Symbol/Choice.referenced()Ulf Magnusson
Use a set comprehension.
2019-02-23Shorten __repr__() and __str__() code a bitUlf Magnusson
2019-02-20Document that kconfig_filenames keeps absolute paths as-isUlf Magnusson
Came up in https://github.com/ulfalizer/Kconfiglib/issues/67.
2019-02-11Make 10.37.0 releasev10.37.0Ulf Magnusson
Adds a utility for setting configuration values from the command line, in commit 22d3cc3 ("setconfig: Add script").
2019-02-11setconfig: Add scriptUlf Magnusson
This is a simple script for updating configuration values from the command line, with (optional) checking that the assigned value matches the actual symbol value afterwards (which it might not if there are unsatisfied dependencies). Sample usage: $ setconfig FOO_SUPPORT=y BAR_BITS=8 This is useful for patching the configuration in automated build systems, in a way that's safer than directly patching configuration files.
2019-01-15setup.cfg formatting nitUlf Magnusson
2019-01-15Bump latest version to 10.36.0 in READMEUlf Magnusson
Forgot when pushing out the release.
2019-01-15Make 10.36.0 releasev10.36.0Ulf Magnusson
Adds commit c9c7f59 ("Package LICENSE.txt in source distributions and wheels"), by request. Maybe some distros require this.
2019-01-15Package LICENSE.txt in source distributions and wheelsUlf Magnusson
Some distros might require this. Fixes https://github.com/ulfalizer/Kconfiglib/issues/65.
2019-01-15Update copyright years for 2019Ulf Magnusson
2018-12-24Make 10.35.0 releasev10.35.0Ulf Magnusson
- Commit 3a3559f ("menuconfig: Prompt for save if a different .config would be saved") improves the behavior of menuconfig.py when Kconfig files are modified between sessions, fixing issue #63. Modifying Kconfig files in a way that would affect the written .config now always makes the menuconfig prompts for saving the configuration on exit. A new Kconfig.missing_syms attribute is added as well, which was needed to implement the improved behavior with public APIs. - Commit b64c961 ("Warn for '# CONFIG_FOO is not set' when FOO is referenced but undefined") fixes a small oversight re. the assignment-to-undefined-symbol warning.
2018-12-24Warn for '# CONFIG_FOO is not set' when FOO is referenced but undefinedUlf Magnusson
Due to an oversight, '# CONFIG_FOO is not set' with FOO undefined only triggered a warning about assigning an undefined symbol if FOO was never referenced inside the Kconfig files.
2018-12-24menuconfig: Prompt for save if a different .config would be savedUlf Magnusson
Previously, menuconfig.py only prompted for saving the configuration if .config didn't exist or the user changed symbol values within the interface. Also make it prompt for save if Kconfig symbols have been added, removed, or have had their defaults changed, provided it would make the saved .config differ from the loaded one. This usually won't matter for correctness, because loading an outdated configuration performs an implicit olddefconfig, but it's less confusing. Also add a Kconfig.missing_syms attribute that records all assignments to undefined symbols in the most recently loaded .config file. This is needed to implement the check for whether the saved .config would be different. As an unrelated change, always prompt for saving if a .config has been loaded from within the menuconfig interface. The intention is probably often to save the configuration somewhere else, even if it isn't modified.
2018-12-15Make 10.34.0 releasev10.34.0Ulf Magnusson
Adds commit dcb6f12 ("menuconfig: Add show-help mode"), which adds a new mode to the menuconfig that replaces the key listing at the bottom with the help text of the selected item.
2018-12-15menuconfig: Add show-help modeUlf Magnusson
Pressing F toggles show-help mode, where the help window at the bottom displays the help text of the currently selected item, if any. Can be handy when browsing through symbols. Also mention the different modes that are available in the module docstring.
2018-12-15Simplify _decoding_error() a bitUlf Magnusson
Also add quotes around the filename.
2018-12-15Make 10.33.0 releasev10.33.0Ulf Magnusson
Adds an error reporting improvement and an example code fix: - Commit 0266924 ("Improve error for missing endchoice/endif/endmenu") - Commit a88302b ("Fix user-defined preprocessor function example code") Some minor performance improvements are included as well.
2018-12-15Fix user-defined preprocessor function example codeUlf Magnusson
The functions must be defined before they can be put into 'functions'.
2018-12-15Improve error for missing endchoice/endif/endmenuUlf Magnusson
Say what was expected in the error message.
2018-12-15Store file.readline in _readline instead of having _fileUlf Magnusson
Gets rid of some lookups. A bigger hotspot is all the _next_line() calls though. Wonder if there's some nice restructuring to avoid them. Getting rid of the _reuse_tokens flag would be nice too.
2018-12-15Tighten up _next_line()Ulf Magnusson
self._line is only used for error reporting, and the empty string returned at EOF would never be shown. Move the assignment to after readline() and use a local variable to hold the line instead, to get rid of some property lookups.
2018-12-15Check isspace() before EOF in _parse_help()Ulf Magnusson
More common. isspace() returns False for empty strings.
2018-12-09Make 10.32.2 releasev10.32.2Ulf Magnusson
Adds commit be3c682 ("Clarify that load_config()'s filename argument defaults to None"), which fixes a small documentation bug.
2018-12-09Clarify that load_config()'s filename argument defaults to NoneUlf Magnusson
Had missed the '(default: None)', and it doesn't hurt to point it out in the description either. Point out that filename=None is the default in the write_config() 'filename' description too, though it already had the '(default: None)'.
2018-12-08Make 10.32.1 releasev10.32.1Ulf Magnusson
Adds commit e8f9751 ("genconfig: Do not generate *.old files for --config-out"), which gets rid some probably redundant .config.old files.
2018-12-08genconfig: Do not generate *.old files for --config-outUlf Magnusson
Configuration files generated by --config-out would usually be an internal detail of the build system, so it's probably not helpful to generate *.old files for them. Pass save_old=False to write_config() to skip it.
2018-12-08_save_old() code nitsUlf Magnusson