diff options
| author | Benjamin Cabé <benjamin@zephyrproject.org> | 2025-10-23 17:25:08 +0200 |
|---|---|---|
| committer | Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no> | 2026-02-02 08:22:15 +0100 |
| commit | 24aef157aead07f813f874f43ee471b057e622cb (patch) | |
| tree | 57cbb867898e31f9efb3fcce0997ecd3267ea1cc /README.rst | |
| parent | ffb54593b899c42fe70e55d26e02d4cd4a9ca53d (diff) | |
drop support for Python 2.x as it is very much EOL
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 Cabé <benjamin@zephyrproject.org>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Diffstat (limited to 'README.rst')
| -rw-r--r-- | README.rst | 40 |
1 files changed, 14 insertions, 26 deletions
@@ -33,7 +33,7 @@ Overview Kconfiglib is a `Kconfig <https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-language.rst>`__ -implementation in Python 2/3. It started out as a helper library, but now has a +implementation in Python 3. It started out as a helper library, but now has a enough functionality to also work well as a standalone Kconfig implementation (including `terminal and GUI menuconfig interfaces <Menuconfig interfaces_>`_ and `Kconfig extensions`_). @@ -121,9 +121,7 @@ available in the C tools. the configuration and (optionally) information that can be used to rebuild only files that reference Kconfig symbols that have changed value. -Starting with Kconfiglib version 12.2.0, all utilities are compatible with both -Python 2 and Python 3. Previously, ``menuconfig.py`` only ran under Python 3 -(i.e., it's now more backwards compatible than before). +All utilities run under Python 3. **Note:** If you install Kconfiglib with ``pip``'s ``--user`` flag, make sure that your ``PATH`` includes the directory where the executables end up. You can @@ -164,18 +162,13 @@ Installation for the Linux kernel See the module docstring at the top of `kconfiglib.py <https://github.com/zephyrproject-rtos/Kconfiglib/blob/master/kconfiglib.py>`_. -Python version compatibility (2.7/3.2+) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Python version compatibility +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Kconfiglib and all utilities run under both Python 2.7 and Python 3.2 and -later. The code mostly uses basic Python features and has no third-party -dependencies, so keeping it backwards-compatible is pretty low effort. +Kconfiglib and all utilities run under Python 3.9 and later. The code mostly +uses basic Python features and has no third-party dependencies. -The 3.2 requirement comes from ``argparse``. ``format()`` with unnumbered -``{}`` is used as well. - -A recent Python 3 version is recommended if you have a choice, as it'll give -you better Unicode handling. +A recent Python 3 version is recommended for better Unicode handling. Getting started --------------- @@ -502,9 +495,9 @@ Other features - **Windows support** - Nothing Linux-specific is used. Universal newlines mode is used for both - Python 2 and Python 3. - + Nothing Linux-specific is used. Universal newlines mode is used for + interoperability between Linux and Windows. + The `Zephyr <https://www.zephyrproject.org/>`_ project uses Kconfiglib to generate ``.config`` files and C headers on Linux as well as Windows. @@ -562,16 +555,15 @@ Three configuration interfaces are currently available: the terminal menuconfig. Only this mode distinguishes between symbols defined with ``config`` and symbols defined with ``menuconfig``. - ``guiconfig.py`` has been tested on X11, Windows, and macOS, and is - compatible with both Python 2 and Python 3. + ``guiconfig.py`` has been tested on X11, Windows, and macOS. Despite being part of the Python standard library, ``tkinter`` often isn't included by default in Python installations on Linux. These commands will install it on a few different distributions: - - Ubuntu: ``sudo apt install python-tk``/``sudo apt install python3-tk`` + - Ubuntu: ``sudo apt install python3-tk`` - - Fedora: ``dnf install python2-tkinter``/``dnf install python3-tkinter`` + - Fedora: ``dnf install python3-tkinter`` - Arch: ``sudo pacman -S tk`` @@ -591,10 +583,6 @@ Three configuration interfaces are currently available: I did my best with the images, but some are definitely only art adjacent. Touch-ups are welcome. :) -- `pymenuconfig <https://github.com/RomaVis/pymenuconfig>`_, built by `RomaVis - <https://github.com/RomaVis>`_, is an older portable Python 2/3 TkInter - menuconfig implementation. - Screenshot below: .. image:: https://raw.githubusercontent.com/RomaVis/pymenuconfig/master/screenshot.PNG @@ -784,7 +772,7 @@ configurations generated by the C tools, for a number of cases. See for the available options. The `tests/reltest <https://github.com/zephyrproject-rtos/Kconfiglib/blob/master/tests/reltest>`_ script runs the test suite -and all the example scripts for both Python 2 and Python 3, verifying that everything works. +and all the example scripts, verifying that everything works. Rarely, the output from the C tools is changed slightly (most recently due to a `change <https://www.spinics.net/lists/linux-kbuild/msg17074.html>`_ I added). |
