<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Kconfiglib.git/genconfig.py, branch main</title>
<subtitle>Fork of https://github.com/zephyrproject-rtos/Kconfiglib.git</subtitle>
<id>https://git.mcdonnell.dev/Kconfiglib.git/atom?h=main</id>
<link rel='self' href='https://git.mcdonnell.dev/Kconfiglib.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/'/>
<updated>2026-02-02T07:22:15Z</updated>
<entry>
<title>drop support for Python 2.x as it is very much EOL</title>
<updated>2026-02-02T07:22:15Z</updated>
<author>
<name>Benjamin Cabé</name>
<email>benjamin@zephyrproject.org</email>
</author>
<published>2025-10-23T15:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=24aef157aead07f813f874f43ee471b057e622cb'/>
<id>urn:sha1:24aef157aead07f813f874f43ee471b057e622cb</id>
<content type='text'>
A follow-up to b96a5ad562deffa697d966c29546650aae645f48 where we stopped
having CI run tests on Python 2.x. This actually drops the few remaining
Python 2.x compatibility bits as Python 2.x has EOL'd a long time ago.

Signed-off-by: Benjamin Cabé &lt;benjamin@zephyrproject.org&gt;
Signed-off-by: Torsten Rasmussen &lt;Torsten.Rasmussen@nordicsemi.no&gt;
</content>
</entry>
<entry>
<title>Use 'python3' instead of 'python' in hashbangs</title>
<updated>2020-01-24T20:33:47Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2020-01-24T20:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=9e0a8d29fa76adcb3f27bb2e20f16fefc2a8591e'/>
<id>urn:sha1:9e0a8d29fa76adcb3f27bb2e20f16fefc2a8591e</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Make genconfig and standard_kconfig() consistent</title>
<updated>2019-12-14T17:28:22Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-12-14T17:25:18Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=2e08499ce38ca7bf2f368c4dc321ef8a6f287530'/>
<id>urn:sha1:2e08499ce38ca7bf2f368c4dc321ef8a6f287530</id>
<content type='text'>
Tweak messages and variable names to match.
</content>
</entry>
<entry>
<title>Add Kconfig.__init__() helper flag for suppressing tracebacks</title>
<updated>2019-12-14T17:12:07Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-12-14T17:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=1ec91703ecdb4c369212fabe2ca0a68f040b7697'/>
<id>urn:sha1:1ec91703ecdb4c369212fabe2ca0a68f040b7697</id>
<content type='text'>
Tools that don't use standard_kconfig() currently generate spammy
tracebacks for e.g. syntax errors.

Add a suppress_traceback flag to Kconfig.__init__() for catching
"expected" exceptions and printing them to stderr and exiting with
status 1. Use it to make all tools consistently hide tracebacks.
</content>
</entry>
<entry>
<title>genconfig: Add tip re. defining multi-line variables in makefiles</title>
<updated>2019-11-20T18:40:00Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-11-20T18:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=810ae682a3b80ed621fd1e20c01241ac48381156'/>
<id>urn:sha1:810ae682a3b80ed621fd1e20c01241ac48381156</id>
<content type='text'>
Handy for KCONFIG_{CONFIG,AUTOHEADER}_HEADER.
</content>
</entry>
<entry>
<title>Support giving the header path in KCONFIG_AUTOHEADER</title>
<updated>2019-11-17T05:03:00Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-11-17T04:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=bb3be6ee9793f23c275d318f58cb6cf21391b371'/>
<id>urn:sha1:bb3be6ee9793f23c275d318f58cb6cf21391b371</id>
<content type='text'>
This environment variable is used by the C tools. Use it when
filename=None is passed to write_autoconf(), and default to
include/generated/autoconf.h for compatibility.

Also update genconfig.py to use KCONFIG_AUTOHEADER if set when no
--header-path is passed. If KCONFIG_AUTOHEADER isn't set, keep
defaulting to 'config.h' for backwards compatibility. It's probably a
saner default for tools as well.
</content>
</entry>
<entry>
<title>Make header strings customizable via the environment</title>
<updated>2019-11-17T04:32:59Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-11-17T02:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=de45874719772a40f1d8d244e2f5a6c6036415ac'/>
<id>urn:sha1:de45874719772a40f1d8d244e2f5a6c6036415ac</id>
<content type='text'>
If no header string is specified in write_(min_)config() or
write_autoconf(), use the values of the environment variables
KCONFIG_CONFIG_HEADER and KCONFIG_AUTOHEADER_HEADER, respectively, if
set. KCONFIG_AUTOHEADER_HEADER is consistent with KCONFIG_AUTOHEADER
(the header path), which will be added soon.

Using environment variables avoids having to add separate flags to each
tool that writes configuration files or headers.

Like for $prefix and $CONFIG_, store the values of the environment
variables when the Kconfig instance is created, and expose them via
Kconfig.config_header and Kconfig.header_header. This if flexible and
avoids gotchas when working with multiple Kconfig instances.

Also remove the old default header and make the default no header. Less
advertising, but it felt a bit silly to add workarounds to keep it.

Came up in https://github.com/ulfalizer/Kconfiglib/pull/80.
</content>
</entry>
<entry>
<title>genconfig: Code ordering nit</title>
<updated>2019-06-07T05:29:38Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-06-07T05:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=929a5981c717d2e72e4b181b1a81d0b181d6b411'/>
<id>urn:sha1:929a5981c717d2e72e4b181b1a81d0b181d6b411</id>
<content type='text'>
Match the order the flags are defined.
</content>
</entry>
<entry>
<title>genconfig: Support generating lists of files and environment vars.</title>
<updated>2019-06-07T05:03:17Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-06-06T17:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=dd1be546016b227411e50376515956ed381ee270'/>
<id>urn:sha1:dd1be546016b227411e50376515956ed381ee270</id>
<content type='text'>
This can be useful to avoid needless reconfiguration, by checking if any
Kconfig file or environment variable has changed value before running
genconfig.
</content>
</entry>
<entry>
<title>Have load_config() and write_(min_)config() return messages</title>
<updated>2019-06-03T04:50:06Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-06-02T16:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=55bc8c380869ea663092212e8fe388ad7abae596'/>
<id>urn:sha1:55bc8c380869ea663092212e8fe388ad7abae596</id>
<content type='text'>
Hardcoding load_config() and write_(min_)config() to write any message
to stdout is awkward, because it means that the message can't be easily
reused when stdout is the wrong place to write it to (e.g. in
menuconfig/guiconfig). This gets extra bad now that there's also the "No
change to ..." message.

Modify load_config() and write_(min_)config() to return the message as a
string instead, and have them always return a message, instead of just
when 'filename' is None and verbose=True. This makes things flexible and
straightforward.

Use the new behavior in menuconfig.py and guiconfig.py. They now show
"No change to ..." when saving a file doesn't modify it.

Tools that want to write messages to stdout should now do
print(kconf.load_config()) / print(kconf.write_config()).

There's no clean way to preserve perfect backwards compatibility here,
but keep accepting the 'verbose' argument and print a deprecation
warning if a value is ever passed for it. That way, scripts will keep
running, though possibly with less output on stdout.

This changes the meaning of the load_config() return value as well,
though I suspect it was only ever used by the menuconfig/guiconfig
interfaces.

The new behavior applies for kconfiglib.VERSION &gt;= (12, 0, 0).
</content>
</entry>
</feed>
