summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-04Allow preprocessor user functions to access the parsing locationUlf Magnusson
Just requires making Kconfig.filename/linenr public. 'lineno' would be a more standard name, but be consistent with MenuNode.linenr.
2019-08-04Add .pyo to .gitignoreUlf Magnusson
Might come up if people run Kconfiglib from a submodule with 'python -O'.
2019-08-03Make 12.13.0 releasev12.13.0Ulf Magnusson
Mostly to get some cleanups into a release, but adds a tiny improvement in commit a4b5775 ("menuconfig/guiconfig: Print 'default:' with no 's' if there's just one").
2019-08-03Fix duplicated label names in READMEUlf Magnusson
Made PyPI complain.
2019-08-03menuconfig/guiconfig: Print 'default:' with no 's' if there's just oneUlf Magnusson
Most common case, and makes the symbol info read better.
2019-08-03Add some distribution-related files to .gitignoreUlf Magnusson
I always run Git with status.showUntrackedFiles = no, but might be nice for other people.
2019-08-03Add a .gitignore that ignores *.pycUlf Magnusson
Might avoid some pain in projects that use Kconfiglib as a submodule. Fixes https://github.com/ulfalizer/Kconfiglib/issues/74.
2019-07-20Remove tabs in setup.cfgUlf Magnusson
Causes a ConfigParser error when using setuptools with Python 2.
2019-07-13Fix kernel Kconfig doc linksUlf Magnusson
They were converted to RST. Link to rendered versions.
2019-07-13Explain why 'option env' is still supportedUlf Magnusson
It's mostly to stay compatible with older Linux kernels. Hence why Kconfiglib doesn't try to be more compatible than what's needed for those.
2019-07-11'if' removal test code nitUlf Magnusson
2019-07-05Pass set literals instead of tuples to frozenset()Ulf Magnusson
This triggers a different set-to-set code path and makes some of them a bit smaller, e.g. 480 instead of 736 bytes for _RELATIONS. Probably no measurable performance difference, but might as well.
2019-07-04Link syzkaller script as exampleUlf Magnusson
2019-07-04Remove note about test suite failures with old buggy C toolsUlf Magnusson
The test suite would fail anyway now due to (harmless) output format changes.
2019-07-04Move kconfiglib-2-changes.txt over to the 'screenshots' branchUlf Magnusson
Makes the top-level a bit less cluttered. The README still links to it.
2019-07-04Clean up Kconfig.__init__() a bitUlf Magnusson
- Move some assignments closer to related assignments - Remove some blank lines between related assignments - Remove double blank lines between sections. It's probably more messy-looking than helpful.
2019-07-04_name_special_search regex consistency nitUlf Magnusson
Put $ after word characters, like in _command_match and _id_keyword_match.
2019-07-04Turn mainmenu_text into a @propertyUlf Magnusson
Not performance sensitive. Gets rid of a variable.
2019-07-04Indent nitUlf Magnusson
2019-07-04Rename _warn_no_prompt to _warn_assign_no_promptUlf Magnusson
Makes it consistent with the other warn_assign_* variables. Also move the initialization in Kconfig.__init__() next to the other warn_assign_* variables.
2019-07-02Make 12.12.1 releasev12.12.1Ulf Magnusson
Adds commit 29758ae ("setconfig: Use 'orig_type' instead of 'type' in error message").
2019-07-02setconfig: Use 'orig_type' instead of 'type' in error messageUlf Magnusson
It's confusing to have tristate symbols show up as bool in the bad-value error message when modules are disabled. set_value() validates the value against 'orig_type' rather than 'type' as well. Piggyback some quote consistency and make a comment in set_value() more informative.
2019-07-02Make 12.12.0 releasev12.12.0Ulf Magnusson
Adds commit e5e2fe5 ("Catch EnvironmentError instead of OSError/IOError"), which fixes menuconfig.py crashes on I/O errors on Python 2. This might also improve error robustness elsewhere on Python 2 in obscure cases.
2019-07-02Catch EnvironmentError instead of OSError/IOErrorUlf Magnusson
menuconfig.py tended to crash on I/O errors on Python 2, due to forgetting to update some 'except OSError's. Catch EnvironmentError instead. EnvironmentError is a common base class of IOError and OSError on Python 2, and an alias for OSError on Python 3. Use it elsewhere too, as it might help catch obscure I/O errors on Python 2.
2019-07-01Rename Choice._get_selection_from_defaults() to _selection_from_defaults()Ulf Magnusson
Shorter and still clear.
2019-07-01Remove redundant commentUlf Magnusson
2019-07-01Remove redundant parensUlf Magnusson
2019-07-01Get rid of some STRING/INT/HEX testsUlf Magnusson
Things can be simplified a bit knowing that UNKNOWN is falsy.
2019-07-01Merge orig_type and _visited assignments in constructorsUlf Magnusson
Small optimization. We know that UNKNOWN == 0, and it's always tested for by checking truthiness rather than identity within the library, so there can't be trouble even without small integer optimization.
2019-07-01Make 12.11.0 releasev12.11.0Ulf Magnusson
Adds some small documentation improvements: - Commit b133331 ("Mention that passing subexpressions to expr_items() works") - Commit 6016156 ("Mention that the 'encoding' parameter is also used for $(shell)") - Commit 48ec584 ("Simplify eval_string() docstring re. syntax errors") - Commit e44102a ("Make MenuNode.filename documentation more accurate re. absolute paths") Some minor optimizations are included as well.
2019-07-01Improve code formatting in expression parsing functionsUlf Magnusson
Be more consistent re. continuation line indents.
2019-07-01Make MenuNode.filename documentation more accurate re. absolute pathsUlf Magnusson
An absolute path to within $srctree is turned into a relative path, and a relative path with '..' in it might be turned into an absolute path. Only whether the path is within $srctree matters.
2019-07-01Replace some if's with ifs in docsUlf Magnusson
Was meant as not-a-literal-if, but it looks confusing. Piggyback a comment nit.
2019-07-01Simplify eval_string() docstring re. syntax errorsUlf Magnusson
Syntax checking has been strict for a long time, so say "if there are syntax errors" instead of "if syntax errors are detected".
2019-07-01Mention that the 'encoding' parameter is also used for $(shell)Ulf Magnusson
2019-07-01Mention that passing subexpressions to expr_items() worksUlf Magnusson
Consistent with the other functions.
2019-07-01Use STR_TO_TRI for some n/m/y membership testsUlf Magnusson
20% faster lookup in line_profiler in _tokenize(). The test usually fails.
2019-06-28Remove stray comma in commentUlf Magnusson
2019-06-27Check for a symbol first in _finalize_tree(), and refactor a bitUlf Magnusson
Symbol is the most common case by far. Also rename _finalize_tree() to _finalize_node(), and make the explanation for what it does more specific. The recursion gets a bit tricky.
2019-06-27Remove redundant parens in set_value()Ulf Magnusson
2019-06-25Make 12.10.0 releasev12.10.0Ulf Magnusson
Adds commit 7403203 ("Make choice.set_value() no-change check work for "n"/"m"/"y" strings").
2019-06-25Make choice.set_value() no-change check work for "n"/"m"/"y" stringsUlf Magnusson
Same deal as in commit f2ac5e3 ("Make set_value() no-change check work for "n"/"m"/"y" strings"). Overlooked the similar logic for choices.
2019-06-24Make 12.9.0 releasev12.9.0Ulf Magnusson
Adds commit a7302a6 ("menuconfig/guiconfig: Use orig_defaults in symbol info").
2019-06-24menuconfig/guiconfig: Use orig_defaults in symbol infoUlf Magnusson
Forgot that they show defaults separately. Use orig_defaults instead of 'defaults' to de-spam it a bit. The direct dependencies are shown above the defaults.
2019-06-24Make 12.8.0 releasev12.8.0Ulf Magnusson
Adds commit 0ca8e78 ("Add {Symbol,Choice}.orig_*, corresponding to the MenuNode fields").
2019-06-24Add {Symbol,Choice}.orig_*, corresponding to the MenuNode fieldsUlf Magnusson
Getting defaults, select, implies, and ranges without dependencies propagated to conditions can be useful for symbols and choices as well, e.g. when generating standalone documentation for properties.
2019-06-24Factor out multiplication in expr_value()Ulf Magnusson
2019-06-23Remove some blank linesUlf Magnusson
2019-06-23Make 12.7.0 releasev12.7.0Ulf Magnusson
Adds commit 58c65e0 ("Make REL_TO_STR public").
2019-06-23Make REL_TO_STR publicUlf Magnusson
Generally useful, and not likely to need any internal hackery.