summaryrefslogtreecommitdiff
path: root/README.rst
AgeCommit message (Collapse)Author
2018-05-01Make 4.2.1 releasev4.2.1Ulf Magnusson
New features: - 105c835 ("Add helper for splitting expressions") - 509e374 ("Add Choice.direct_dep field") A terminal menuconfig implementation has been added which relies on these features. Other improvements: - c1c5ef2 ("Print a warning for malformed .config lines") - 09b8c58 ("Give filename and context for UnicodeDecodeError")
2018-05-01Rename examples/menuconfig.py to menuconfig_example.pyUlf Magnusson
To avoid confusing it with the new terminal menuconfig implementation. Clean up the README a bit at the same time, removing some stuff that's less essential now (e.g. the menuconfig_example.py "screenshot").
2018-05-01Fix genrest.py linkUlf Magnusson
2018-05-01Add genrest.py from the Zephyr project as an exampleUlf Magnusson
2018-05-01Formatting fixUlf Magnusson
2018-05-01Fix README formattingUlf Magnusson
2018-05-01Add a terminal menuconfig implementationUlf Magnusson
Uses the 'curses' module, which is in the Python standard library. Only Python 3 is supported, mostly due to Unicode support. Windows support is provided through an external package which adds support for the 'curses' module on Windows. See the changes and the docstring in the newly added menuconfig.py for more information. Piggyback a README notes mentioning that Kconfiglib supports Unicode.
2018-04-07Make 4.2.0 releasev4.2.0Ulf Magnusson
New features and improvements: - 7245bad ("Parenthesize && expressions within || expressions") makes expressions more readable. - 2259d35 ("Generalize is_menuconfig to non-symbol items") can simplify menuconfig implementations. - c7ac6f8 ("Add parent deps to the right in _T_IF") makes parent dependencies consistently appear on the right in expressions, with the outermost parent dependency the furthest to the right. New warnings: - 7ba79ca ("Warn if user (.config) value is outside of 'range'") - 225ec4b ("Warn if a choice symbol is selected or implied") Some obscure false positive warnings for named choices were fixed too. This came up in https://github.com/zephyrproject-rtos/zephyr/issues/6948. - e8408a0 ("Move sanity checking to after _finalize_tree()")
2018-03-20Add kconfig.py from Zephyr as a real-world exampleUlf Magnusson
2018-03-18Add print_config_tree.py example script (#42)Ricardo F
Works like menuconfig.py, but just dumps the tree, with a specified .config file as base. Handy for diffing.
2018-03-17Make 4.1.0 releasev4.1.0Ulf Magnusson
Only adds daac69d ("Add a globbing source statement"). 'gource' doubles as an include-if-exists function.
2018-03-16Link to pymenuconfigUlf Magnusson
A menuconfig implementation built on top of Kconfiglib using TkInter.
2018-03-13Mention rsource and gsource in READMEUlf Magnusson
2018-03-11Fix broken formattingUlf Magnusson
2018-03-11Make 4.0.0 releasev4.0.0Ulf Magnusson
Includes a small API behavior change, hence the major version bump: - db63301 ("Return "" for unwritten symbols in Symbol.config_string") New features: - Support for incremental builds using the same scheme as the include/config/ directory in the C tools. See the new Kconfig.sync_deps() function and commit 378dedc ("Add support for incremental builds"). - Minimal configuration (defconfig) writing, generating identical files to the C implementation. See commit 652f11b ("Add minimal configuration file generation support"). The C 'make savedefconfig' implementation is currently broken in obscure cases involving tristate choices (due to broken invalidation code), so the tests are disabled for now. I have a patch for the C implementation that I will submit. Fixes: - user_value wasn't set for choice symbols set to y via load_config() with replace=True. Fixed by commit 0bd841d ("Properly remember y user values for choice symbols"). Didn't affect correctness, only the API. Other changes: - 778ec47 ("Only write '# CONFIG_FOO is not set' for visible symbols") mirrors a change I made to the C tools. - bbe3ae9 ("Do not write the defconfig_list symbol to .config") mirrors another change made to the C tools. - Misc. refactoring and cleanup.
2018-03-11Add minimal configuration file generation supportUlf Magnusson
Works like 'make savedefconfig' in the C tools. Call it write_min_config() rather than write_defconfig() to be a bit more explicit. Add a test similar to test_defconfig that compares Kconfiglib minimal configuration output against the C implementation, for all defconfig files. Disable the tests for now. The C tools have a bug that causes an incorrect configuration to be generated for tristate choices in some cases. They will be re-enabled once those are fixed.
2018-03-01Only write '# CONFIG_FOO is not set' for visible symbolsUlf Magnusson
This mirrors a change I made to the C tools, which is now in linux-next: https://www.spinics.net/lists/linux-kbuild/msg17074.html. Add a note to the README to make it clear that the test suite now needs to be run against recent kernels in order to pass. Copy-pasted commit message from the C tools commit below: === Background === - Visible n-valued bool/tristate symbols generate a '# CONFIG_FOO is not set' line in the .config file. The idea is to remember the user selection without having to set a Makefile variable. Having n correspond to the variable being undefined in the Makefiles makes for easy CONFIG_* tests. - Invisible n-valued bool/tristate symbols normally do not generate a '# CONFIG_FOO is not set' line, because user values from .config files have no effect on invisible symbols anyway. Currently, there is one exception to this rule: Any bool/tristate symbol that gets the value n through a 'default' property generates a '# CONFIG_FOO is not set' line, even if the symbol is invisible. Note that this only applies to explicitly given defaults, and not when the symbol implicitly defaults to n (like bool/tristate symbols without 'default' properties do). This is inconsistent, and seems redundant: - As mentioned, the '# CONFIG_FOO is not set' won't affect the symbol once the .config is read back in. - Even if the symbol is invisible at first but becomes visible later, there shouldn't be any harm in recalculating the default value rather than viewing the '# CONFIG_FOO is not set' as a previous user value of n. === Changes === Change sym_calc_value() to only set SYMBOL_WRITE (write to .config) for non-n-valued 'default' properties. Note that SYMBOL_WRITE is always set for visible symbols regardless of whether they have 'default' properties or not, so this change only affects invisible symbols. This reduces the size of the x86 .config on my system by about 1% (due to removed '# CONFIG_FOO is not set' entries). One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. This change only affects generated .config files and not autoconf.h: autoconf.h only includes #defines for non-n bool/tristate symbols. === Testing === The following testing was done with the x86 Kconfigs: - .config files generated before and after the change were compared to verify that the only difference is some '# CONFIG_FOO is not set' entries disappearing. A couple of these were inspected manually, and most turned out to be from redundant 'default n/def_bool n' properties. - The generated include/generated/autoconf.h was compared before and after the change and verified to be identical. - As a sanity check, the same modification was done to Kconfiglib. The Kconfiglib test suite was then run to check for any mismatches against the output of the C implementation.
2018-02-28Add support for incremental buildsUlf Magnusson
Implement a scheme from the C tools where symbols get corresponding files that are touch'ed whenever the symbol's value changes. This can be used to add e.g. Makefile dependencies between source files and particular symbols. See the docstring of the new sync_deps() function for more information. Piggyback a small sanity check for write_autoconf().
2018-02-27Make 3.2.0 releasev3.2.0Ulf Magnusson
Adds a Kconfig extension contributed by RomaVis: aea0232 ("Implement 'rsource' statement ('source' with relative path)").
2018-02-16Make 3.1.0 releasev3.1.0Ulf Magnusson
Only includes 2a88c0c ("Include direct deps. in Symbol/Choice.__str__()").
2018-02-08README nitUlf Magnusson
Might've sounded a bit snarky -- wasn't meant to.
2018-02-08Make 3.0.0 releasev3.0.0Ulf Magnusson
- Only includes e8b4ecb ("Don't special-case user_value for choice symbols set to y"). Since that's a tiny change to the behavior of the API, the major version is bumped.
2018-02-07Make 2.7.0 releasev2.7.0Ulf Magnusson
Just adds f66cd71 ("Allow "n"/"m"/"y" as aliases for 0/1/2 in set_value()").
2018-02-06Add oldconfig.py example scriptUlf Magnusson
Implements the standard 'make oldconfig' functionality, prompting the user for the values of new symbols to update an old .config file. This came up in https://github.com/zephyrproject-rtos/zephyr/issues/5426.
2018-02-03Add example that finds references to undefined symbolsUlf Magnusson
Does a global search over all architectures in the kernel, which should avoid false positives. Referencing an undefined symbol in a particular architecture can be fine in a Kconfig file that's shared by multiple architectures, but if the symbol isn't defined by any architecture, it's likely to be an error (or a potential cleanup).
2018-01-30Make 2.6.0 releasev2.6.0Ulf Magnusson
This release tightens up syntax checking and adds all the warnings generated by the C implementation (plus a few extra ones), making Kconfiglib more viable as a replacement for the C tools, rather than just being an auxiliary library. Syntax checking changes: - a84848b ("Tighten up syntax checking") - 8716316 ("Generate a parse error for extra tokens at EOL") - 416083a ("Flag constant symbols where they're not allowed") Warning changes: - 9c309400 ("Add some post-parsing warnings") - da0bfa3a ("Error out for malformed hex/int/string defaults") - 5d2041a9 ("Add more choice type and prompt sanity checks") - 67f825fc ("Warn if there's more than one help text") - 990c780f ("Add some warnings related to selects and implies") - 7432ade8 ("Warn if a symbol is defined with multiple types") - 5eeea863 ("Improve int/hex sanity checking") - ad94bb45 ("Sanity-check range values") - e930c140 ("Warn if a symbol/choice has multiple prompts") - 60d12911 ("Warn if help text is empty") - d43d2e83 ("Warn if menuconfig statement has no prompt") - 3db12f72 ("Warn if a choice symbol has defaults") - 0eadd61c ("Warn if choice symbol has prompt outside choice") Also includes various code nits.
2018-01-29Give tip about getting rid of warningsUlf Magnusson
The empty-help warning is pretty spammy at the moment.
2018-01-25Add note re. custom output formatsUlf Magnusson
2018-01-25Formatting nitUlf Magnusson
2018-01-25Mention that Windows support has been triedUlf Magnusson
2018-01-25Make 2.5.0 releasev2.5.0Ulf Magnusson
- 955ea4 ("Support <, > relational operators with tristates") adds a small recent feature from upstream. Haven't even seen any relational operators besides = and != being used yet I think. - 8d7235 ("Tighten up regexes") cleans up and optimizes the regexes used during parsing and .config reading a bit.
2018-01-24Mention the reltest scriptUlf Magnusson
2018-01-24Make 2.4.0 releasev2.4.0Ulf Magnusson
Just has b82ea0a ("Enable universal newlines mode for Python 2").
2018-01-24Make 2.3.0 releasev2.3.0Ulf Magnusson
Just adds a new warning: 0087b40 ("Warn if a symbol with unsatisfied deps is selected")
2018-01-23Mention loading of multiple .config filesUlf Magnusson
2018-01-22Make 2.2.4 releasev2.2.4Ulf Magnusson
Small docstring improvements: - 1c37079 ("Add more detail to the write_config() docstring") - 121d4a7 ("Add more detail to the write_autoconf() docstring") - 27fbded ("Fix outdated comments referencing user_str/tri_value") - e01cb49 ("Mention user_value in the load_config() docstring") - ed32010 ("Add some more detail to the module docstring") Code nit: - 532b561 ("Simplify escape()")
2018-01-21Linkify test suiteUlf Magnusson
2018-01-20Make 2.2.3 releasev2.2.3Ulf Magnusson
Parsing performance improvements related to help texts: - c800f70 ("Simplify _deindent()") - 707204a ("Get rid of _next_help_line()") - f0a87cc ("Micro-optimize _T_HELP parsing") Also includes various code nits. Brings 'make scriptconfig' with allyesconfig.py down to 1.3 seconds, including the 'make' overhead.
2018-01-20Getting fasterUlf Magnusson
2018-01-18Make 2.2.2 releasev2.2.2Ulf Magnusson
- 97c7501 ("Fix 'source "missing"' error message for Python 3") makes the hint re. environment variables display properly for Python 3 when a sourced file can't be opened. - 8574dc5 ("Make PyPI's README formatter happy") makes PyPI format the README properly.
2018-01-18Make PyPI's README formatter happyUlf Magnusson
No longer displayed as an unformatted blob of text.
2018-01-18Make 2.2.1 releasev2.2.1Ulf Magnusson
- 7dc5b74 ("Detect recursive 'source' and print backtrace") makes debugging recursive 'source's a bit easier. - Various minor code nits.
2018-01-18Use absolute link for kconfiglib-2-changes.txtUlf Magnusson
Try to unbreak PyPI display.
2018-01-18Use absolute links in READMEUlf Magnusson
See if this unbreaks the display on PyPI.
2018-01-16Make 2.2.0 releasev2.2.0Ulf Magnusson
- 94c63de ("Support disabling warnings for redundant assignments") adds support for disabling warnings in the case where a symbol is assigned more than once within a .config file but always assigned the same value. Contributed by Sebastian Bøe. - Various other minor code nits.
2018-01-16Kconfiglib is easier to modify tooUlf Magnusson
2018-01-12Add an extra test suite Makefile patch warningUlf Magnusson
2018-01-08Mention Windows supportUlf Magnusson
2018-01-06Mention that C headers can be generated nowUlf Magnusson
2018-01-05Make 2.1.0 releasev2.1.0Ulf Magnusson
- d2a2727 (Implement autoconf.h generation) adds support for generating C headers in the same format as used for include/generated/autoconf.h in the kernel, contributed by Carles Cufi from the Zephyr project. - 5d693b2 (Don't write out 'option env' symbols to C header) makes it so that attempts to manually set user values on 'option env' symbols are rejected (though such symbols were never written out to .config files).