what-is-python
Collection of Python compatibility packages that provide symlinks for unversioned python, python-config, and development tools to point to Python 3. Facilitates compatibility with third-party code expecting traditional unversioned Python binaries.
Description
Starting with Debian 11 (bullseye) and Ubuntu 20.04 LTS (focal), Python packages use explicit python3 or python2 interpreters, avoiding unversioned /usr/bin/python or /usr/bin/python-config. However, some third-party code still relies on these unversioned paths. The what-is-python tools address this by providing convenience packages: python-is-python3 symlinks /usr/bin/python to python3, python-dev-is-python3 symlinks /usr/bin/python-config to python3-config, improving compatibility with modern systems while potentially affecting obsolete software.
These packages include associated Python tools like pdb (Python debugger), pydoc (documentation tool), python-config (build options for C/C++ extensions), and the python interpreter itself. No packages should declare dependencies on these, as they are transitional aids. Installed sizes are minimal: 16 KB for python-is-python3 and 13 KB for python-dev-is-python3.
Use cases include setting up environments for legacy Python scripts or third-party applications in Kali Linux that expect /usr/bin/python without specifying the version, ensuring they run with the default Python 3.
How It Works
These are metapackages creating symlinks: python-is-python3 links /usr/bin/python to /usr/bin/python3 interpreter; python-dev-is-python3 links /usr/bin/python-config to /usr/bin/python3-config. They depend on python3, python3-dev respectively. Associated tools operate as standard Python utilities: pdb debugs programs via command-line interface reading .pdbrc files; pydoc generates documentation or serves HTTP docs; python-config outputs compiler/linker flags (--prefix, --includes, etc.); python runs scripts interactively or via flags like -c, -m.
Installation
sudo apt install python-dev-is-python3Flags
Examples
pdb -hpdb -c continuepdb -c 'until X'pydoc -hpydoc -k <keyword>pydoc -p <port>pydoc -bpython-config --helppython -hpython -c 'print("Hello")'