summaryrefslogtreecommitdiff
path: root/setup.py
AgeCommit message (Collapse)Author
2018-09-23Make 10.8.0 releasev10.8.0Ulf Magnusson
Adds support for user-defined preprocessor functions in Python, which can be used to get information from existing Python tools into Kconfig, e.g. to have Kconfig symbols depend on hardware information stored in some other format. See commit b6827ca ("Add support for user-defined Python preprocessor functions").
2018-09-14Make 10.7.0 releasev10.7.0Ulf Magnusson
Adds commit b9b2ebb ("menuconfig: Add RGB color support to styles."), which makes it possible to specify colors in MENUCONFIG_STYLE using #RRGGBB notation. The rendered colors may be more or less exact depending on terminal capabilities. In the best case, we can redefine colors. Otherwise, we fall back on the closest available color. Contributed by Mitja Horvat (punkfluid).
2018-09-09Make 10.6.1 releasev10.6.1Ulf Magnusson
Adds commit af6c8dc ("menuconfig: Fix some glitching on small terminals"), which fixes some minor graphical glitching in the menuconfig interface when the terminal is too small for things to fit. Commit 374f488 ("Clean up kernel Makefile patch and add new targets") adds some new targets to the Linux makefile patch as well, though the makefile patch isn't bundled on PyPI.
2018-09-08Make 10.6.0 releasev10.6.0Ulf Magnusson
New features: - Commit ac8d152 ("menuconfig: Add support for custom color schemes (aka styles)"), contributed by Mitja Horvat (pinkfluid), adds support for configuring the style (colors and attributes) of menuconfig interface elements by setting a new MENUCONFIG_STYLE environment variable. The format of MENUCONFIG_STYLE is documented in the menuconfig.py module docstring. This format is now used internally as well to define the predefined styles. - Commit a092257 ("Allow macro expansion within symbol names") adds support for expanding macros within symbol names. This could be used e.g. to define template Kconfig files that get instantiated by setting preprocessor variables before including them. Other changes: - Commit 6683213 ("Allow user values on 'option env' symbols") makes it possible to give 'option env' symbols user values. There's no good reason to disallow it (it's a leftover from an older way of implementing them), and it simplifies the code a bit. Note that 'option env' symbols are only supported for backwards compatibility at this point. Environment variables can be expanded directly.
2018-08-29Make 10.5.0 releasev10.5.0Ulf Magnusson
Adds a small menuconfig tweak that could avoid some user confusion: Commit 66a2bf5 ("menuconfig: Do not use red for invisible symbols outside of show-all mode")
2018-08-29Make 10.4.0 releasev10.4.0Ulf Magnusson
New features: - Commit 84bd863 ("menuconfig: Add a more 'make menuconfig'-like color scheme") adds an alternative menuconfig color scheme contributed by contributed by Mitja Horvat (pinkfluid). The new color scheme can be enabled by setting the environment variable MENUCONFIG_THEME to 'aquatic'. The default color scheme now also uses bold text for the selected entry, like the 'aquatic' theme. Fixes: - Commit d1e2a65 ("menuconfig: Always show implicit submenus with visible nodes") fixes a display issue involving prompt-only conditions where visible child nodes could disappear outside of show-all mode. Other changes: - Commit 0ed2ba0 ("Improve the running-without-Makefile-patch documentation") updates the documentation on how to run Kconfiglib on the Linux kernel without using the Makefile patch. - Misc. internal menuconfig refactoring.
2018-08-26Make 10.3.0 releasev10.3.0Ulf Magnusson
New features: - Commit 20de53b ("Add a Kconfig.kconfig_filenames attribute") and commit 932d0f7 ("Add a Kconfig.env_vars attribute that lists env. variables") make lists of all Kconfig files and referenced environment variables available. This could be used e.g. to implement alternative incremental build schemes. Note that the sync_deps() mechanism already indirectly catches any relevant changes to files and environment variables though (anything that changes the configuration output). - Commit 17d7c1e ("menuconfig: Show all symbols at each menu location for multi.def. choices") makes it so that if a named choice is defined in multiple locations, each of which adds options, you can select any of the options regardless of via menu entry you enter the choice. Previously, you could only select the options defined at that menu entry's location. Named choices with symbols in more than one location are completely broken in the C tools, so there's no reference for the behavior there. This seems less confusing at least. Suggested by Mitja Horvat (pinkfluid). Fixes: - Commit 0b46af4 ("menuconfig: Don't return when selecting a choice symbol with children") improves menuconfig behavior in an extremely obscure case. - Commit 1c2c4ae ("oldconfig: Fix help display command for choices") makes '?' print the help for choices in oldconfig. The command was accidentally set to '??' there. - Commit ddfd5df ("Improve menu structure for promptless choices") fixes a menuconfig display issue for promptless choices (which can appear "legitimately" if a named choice is defined in multiple locations to add extra options). Cleanup: - Commit 2320b7a ("oldconfig: Use Kconfig.node_iter() and clean up") - Some manual tree walking in other places has also been rewritten to use Kconfig.node_iter().
2018-08-26oldconfig: Use Kconfig.node_iter() and clean upUlf Magnusson
Some general cleanup: - Handle the iteration with the new Kconfig.node_iter() helper. This makes some function so short that they become pointless. Have just main() + oldconfig(node) + small helper functions. - Use _name_and_loc_str(sc) for choices too, so that all locations get reported for named choices defined in multiple locations - Rewrite the intro to be less wordy and remove the sample session (leftover from when oldconfig.py was in examples/, and not that exciting) - Print "Updated configuration written to..." instead of "Configuration saved to..." - Various other nits
2018-08-24Make 10.2.1 releasev10.2.1Ulf Magnusson
Fixes broken-looking menuconfig include path information for items in the top-level Kconfig file, via commit 64600b3 ("menuconfig: Hide the include path for top-level items").
2018-08-24Make 10.2.0 releasev10.2.0Ulf Magnusson
Adds commit 13884e9 ("Show include paths in menuconfig symbol information"), which adds a MenuNode.include_path attribute to Kconfiglib. MenuNode.include_path holds the Kconfig include path of the menu node, which shows how its Kconfig file got 'source'd, starting from the top-level Kconfig file. MenuNode.include_path is used to show include paths in the menuconfig symbol information. It will also be used in genrest.py in Zephyr, which generates an RST Kconfig reference.
2018-08-23Make 10.1.1 releasev10.1.1Ulf Magnusson
Includes two small bug fixes: - Commit 9b77511 ("Fix file descriptor leak for the top-level Kconfig file") - Commit d158fed ("Fix recursive 'source' error reporting")
2018-08-23Make 10.1.0 releasev10.1.0Ulf Magnusson
New features: - Commit 7dae988 ("Add a generic node iterator") adds a Kconfig.node_iter() helper generator for iterating through all menu nodes in the menu tree, in definition order. Optionally, symbols defined in multiple locations are only generated once. This generator is now used internally by write_config() as well. Suggested by Mitja Horvat (pinkfluid). - Commit d2c1430 ("Introduce Kconfig.unique_defined_syms and Kconfig.unique_choices") adds versions of Kconfig.defined_syms/choices that only include symbols and choices defined in multiple locations once, while still preserving definition order. This is almost always what you want when iterating through (just) symbols and choices. It removes set() hackery (where it's easy to accidentally mess up the order) and the like. Fixes: - Commit 4ebc2aa ("Flag extra tokens after 'if'/'depends on'/'visible if' expressions") tightens up syntax checking so that extra trailing tokens after 'if', 'depends on', and 'visible if' expressions raise a syntax error, instead of being silently ignored. Oversight.
2018-08-21Make 10.0.1 releasev10.0.1Ulf Magnusson
Adds commit 7f3844f ("Make symbol order match between headers and .config files"), which fixes a bug introduced by commit 71872a8 ("Massively speed up U-Boot parsing"). The ordering of symbols in header files now matches the order in .config files again, which was always the intent. It makes things more readable, and is nice for version control too.
2018-08-18Make 10.0.0 releasev10.0.0Ulf Magnusson
Adds commit 8a3999b ("Fix $srctree logic for the top-level Kconfig file"), which fixes an old braino: The top-level Kconfig file passed to Kconfig.__init__() wasn't looked up relative to $srctree, breaking out-of-tree operation for scripts unless ugly manual $srctree hacks were added. All Kconfig files are now consistently looked up relative to $srctree. This is a backwards-incompatible change (though with a simple fix), so the major version is bumped. A note is printed on errors that might be due to the changed behavior.
2018-08-18Make 9.4.2 releasev9.4.2Ulf Magnusson
This just reverts commit 8a3999f ("Fix $srctree logic for the top-level Kconfig file"), so that it can go in a major release instead. I realized it has enough breakage potential for existing scripts to warrant a major version bump.
2018-08-17Make 9.4.1 releasev9.4.1Ulf Magnusson
- Commit 8a3999b ("Fix $srctree logic for the top-level Kconfig file") fixes a major braino where the top-level Kconfig file passed to Kconfig.__init__() wasn't looked up relative to $srctree, breaking out-of-tree operation for e.g. menuconfig. All Kconfig files are now consistently looked up relative to $srctree. - Misc. internal code cleanup
2018-08-11Make 9.4.0 releasev9.4.0Ulf Magnusson
Kconfiglib changes: - Commit 1f864b1 ("Support custom printing of symbols/choices in expressions") adds support for printing symbols and choices with a custom format in expressions. This makes it simpler to implement things like like turning all symbols/choices into links when generating documentation, and printing symbol values after symbols. - Commit 6aea8d0 ("Don't pass encoding= to Popen()") fixes an accidental Python 3.6+ requirement when using the $(shell) preprocessor function with Python 3. menuconfig changes: - Commit 8efc358 ("menuconfig: Omit tristate value hint for int/string/hex defaults") removes the boolean value hints to the right of defaults in the symbol information for string/int/hex symbols. Stuff like '- 74 (value: "n")' isn't helpful, and looks confusing. - Commit 3511f24 ("menuconfig: Make symbol information less spammy") makes the symbol information more compact in general, e.g. by skipping value hints where they aren't helpful ('FOO(=y)' instead of 'FOO(=y) (=y)'), and by shortening stuff like '(value: "y")' to just '(=y)'.
2018-07-27Make 9.3.0 releasev9.3.0Ulf Magnusson
- b650ccd ("Use universal newlines mode in $(shell) implementation") improves the behavior of $(shell) on Windows. A trailing \r\n-style newline sequence is now stripped in full, instead of leaving \r in there. - 6899f91 ("Restore compatibility with old kernels") restores some compatibility with old kernels originally dropped by c19fc11 ("Drop some compatibility and tighten up lexing"). It turns out that people are still running Kconfiglib on kernels from at least 2013 (see https://github.com/ulfalizer/Kconfiglib/pull/48).
2018-07-20Make 9.2.1 releasev9.2.1Ulf Magnusson
Just adds commit 5452ad3 ("Fix detection of hex literals"). Braino. Include some int and hex literals in the Kstrict testcase too.
2018-07-20Make 9.2.0 releasev9.2.0Ulf Magnusson
Adds support for automatically warning for references to undefined Kconfig symbols. See commit ca89d02 ("Add KCONFIG_STRICT flag for flagging refs. to undefined syms"). (There was an outdated docstring in that comment. KCONFIG_STRICT needs to be set to "y".)
2018-07-18Make 9.1.0 releasev9.1.0Ulf Magnusson
Adds e08b695 ("Add def_int, def_hex, and def_string keywords"), getting rid of some Kconfig inconsistency.
2018-07-18setup.py: Specify encoding when reading README.rstUlf Magnusson
https://github.com/clearlinux-pkgs/python-kconfiglib adds a patch for this. It avoids issues on systems that use the C locale, which implies ASCII encoding and raises UnicodeDecodeError when reading README.rst. Piggyback adding 'menuconfig' as another keyword.
2018-07-15Make 9.0.0 releasev9.0.0Ulf Magnusson
This release revamps the globbing design to make 'source' globbing, requiring at least at least one matching file. A new o(r)source statement can be used when it's okay for a pattern to not match any files. Relevant commit, with motivations: 7a428aa ("Switch to more sensible globbing statements (w/ backwards compatibility)"). Backwards compatibility is maintained by having g(r)source be an alias for o(r)source. A small API change was introduced too: Kconfig.srctree is now set to the empty string instead of None when $srctree is unset. This gives nice behavior for e.g. os.path.join().
2018-07-13Make 8.1.1 releasev8.1.1Ulf Magnusson
This release adds commit ac692af ("Fix absolute $srctree prefixes showing up on gsource'd files"), which fixes a bug that could cause $srctree to be included in some paths for e.g. generated documentation.
2018-07-11Make 8.1.0 releasev8.1.0Ulf Magnusson
This release improves performance for projects that make heavy use of multiple definition locations for symbols, via commit 747e455 ("Massively speed up U-Boot parsing"). Two new warnings are included as well: - 652d991 ("Warn if int/hex/string symbols are evaluated logically") - 21b5351 ("Warn if int/hex 'default' is outside active 'range'")
2018-07-10Make 8.0.0 releasev8.0.0Ulf Magnusson
New features: - 2433deb ("Add Kconfig preprocessor") implements a new Kconfig preprocessor, documented in https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-macro-language.txt. It is required to parse the linux-next Kconfigs now, and will appear in Linux 4.18. 'option env=...' symbols and the $FOO syntax for expanding environment variables will be supported for backwards compatibility for a while. Consider switching to $(FOO) though, which is the new syntax (and removing 'option env=...' symbols). Changed behavior: - c19fc11 ("Drop some compatibility and tighten up lexing") makes Kconfiglib flag invalid characters in Kconfig files as a syntax error in all context. They were previously ignored in some places for compatibility with old sloppy versions of the C tools. The C tools fixed it with commit c2264564 ("kconfig: warn of unhandled characters in Kconfig commands") in July 2015. Older kernels might require fixing up the Kconfig files a bit now. New warnings: - 4200e25 ("Generalize select-with-unsatisfied-deps warning") makes the select-with-unsatisfied-dependencies warning trigger when a symbol with m-valued direct dependencies is y-selected.
2018-06-22Make 7.0.0 releasev7.0.0Ulf Magnusson
New features: - db92bb7 ("Add dependency loop detection") adds long-overdue dependency loop detection. Previously, dependency loops would trigger hard-to-debug Python RecursionError exceptions during evaluation. They now generate a KconfigError instead, with a helpful message that shows the items in the loop. Backwards-incompatible changes (major version bumped to 7): - eb6c21a ("Turn MenuNode/Symbol/Choice.referenced() into a @property") fixes some inconsistency in the recently-added referenced-symbols APIs. Oversight. Other changes: - f6eb4f4 ("Add Symbol/Choice.referenced() convenience methods") makes it easier to get all the symbols/choices referenced by a symbol or choice. Previously, you'd have to loop through all the menu nodes (definition locations) yourself, which might not be obvious. - ca89ca0 ("Rename KconfigSyntaxError to KconfigError") changes to a better exception name, as KconfigSyntaxError was raised for some things that aren't syntax errors. The old name is kept as an alias for now for backwards compatibility.
2018-06-14Make 6.1.1 releasev6.1.1Ulf Magnusson
Just adds commit dc0b022 ("Correctly report choice locations in some warnings").
2018-06-14Make 6.1.0 releasev6.1.0Ulf Magnusson
Fixes: - c880151 ("Fix incorrectly ordered properties for some nested multi.def. symbols") fixes a bug that could cause symbols/choices defined in multiple locations and nested in particular ways within if's and menus to get their properties in the wrong order. The Linux kernel wasn't affected (which is how it managed to slip through), but projects that make heavy use of symbols defined in multiple locations might have been. Comprehensive selftests have been added to cover property ordering on nested multi.def. symbols/choices. New features: - 4af3e0c ("menuconfig: Support starting a search from the info dialog") and 330017a ("menuconfig: Support viewing symbol info from within the jump-to dialog") makes working with the menuconfig a bit smoother to work with. - 68043b2 ("Add MenuNode function that returns referenced items") makes it easier to find out what symbols/choices a symbol, choice, menu, or comment references, which is handy e.g. for searching.
2018-06-06Make 6.0.1 releasev6.0.1Ulf Magnusson
Just to fix the rendering of the README on PyPI with commit b727f4d ("Fix link to allyesconfig.py in README").
2018-06-06Make 6.0.0 releasev6.0.0Ulf Magnusson
Changed behavior (giving the major version bump): - cbf32e2 ("Expand environment variables in strings directly") makes 'option env' "bounce" symbols redundant, though they are still supported for backwards compatibility (with the caveat that they must have the same name as the environment variables they reference to preserve behavior). A warning is printed if 'option env="FOO"' appears on a symbol that's not named FOO. This change will likely appear in the C tools soon as well. Other new features: - The menuconfig implementation is now bundled in the PyPI package, along with implementations of the Kconfig oldconfig and all{def,no,yes,mod}config tools. A genconfig script is provided for generating a C header from the configuration, as well as (optionally) the sync_deps() directory structure for implementing incremental builds. - 63a4418 ("Record which MenuNode has each property") makes it possible to generate documentation for symbols defined in multiple locations with each property shown on the right definition. See genrest.py in Zephyr. This change also cleans up the parsing code a bit. Dependency propagation is now done after parsing, in _finalize_tree(). - 94020be ("Make Kconfig._choices public") and fc73c46 ("Provide lists with all menus and comments") gives easier access to Kconfig items of a specific type, without having to walk the menu tree. This turns out to be handy e.g. when generating documentation and implementing search. Improvements and new warnings: - da40c01 ("Force encoding to UTF-8 by default on Python 3") - 7427079 ("Get rid of the predefined UNAME_RELEASE symbol") - f64591c ("Warn if prompt contains leading or trailing whitespace") - c14e411 ("Warn if quotes are omitted around string defaults") Misc. minor refactoring and cleanup has been done as well.
2018-06-05Turn syncconfig.py into genconfig.py and generate headerUlf Magnusson
There should be a script available that generates the output header for the build. It usually makes sense to generate both the header and any incremental build information at the same time (automatically during build), so roll them both into the same script.
2018-06-04Package the *config scriptsUlf Magnusson
These currently include menuconfig, oldconfig, syncconfig, alldefconfig, and all{no,mod,yes}config, which probably cover what 90% of people will need to use. More scripts could be added later. Use the entry_points mechanism (http://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation), which gives something that works out-of-the-box on Windows. It also removes the .py suffix for the installed scripts.
2018-05-01Make 5.0.0 releasev5.0.0Ulf Magnusson
New features: - ed3ceaa ("Make warnings available in a list") API changes: - 8983f7e ("Make disable_warnings() disable all warnings") This is a minor API behavior change, so the major version is bumped. It's unlikely to break anything people were depending on.
2018-05-01Make 4.3.0 releasev4.3.0Ulf Magnusson
4.2.1 should have been 4.3.0. That was not a bugfix release. Braino.
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-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-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-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-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-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-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-26Add project_urls to setup.pyUlf Magnusson
Shows up as a nice sidebar on PyPI.
2018-01-26Clean up setup.py a bitUlf Magnusson
Can test the python_requires now too.
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-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-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()")