Python Defaults
Provides dependency packages and tools for all supported Python 2 versions, runtime, development, and debugging support in Kali Linux. Includes utilities like debuggers, documentation tools, and source code scanners for internationalization.
Description
The python-defaults package collection offers metapackages that depend on all supported Python 2 implementations (currently python2.7), avoiding hardcoded dependencies on specific versions. This includes runtime packages like python-all and python2, development packages like libpython-all-dev and python-all-dev, and debugging packages like libpython-all-dbg and python-all-dbg. Future support for jython and ironpython may be added.
Development tools provide header files, static libraries, and config scripts (python2-config, python2-dbg-config) for building Python 2 modules or embedding the interpreter. Debug variants like python2-dbg and libpython2-dbg enable –pydebug configuration for troubleshooting dynamically loaded modules.
Included binaries offer essential Python 2 utilities: pdb2 (debugger), pydoc2 (documentation), pygettext2 (internationalization scanner equivalent to xgettext), pyversions (version info), pyclean/pycompile (bytecode management), and python2-doc for comprehensive HTML documentation.
How It Works
Metapackages like python-all, libpython-all-dev aggregate dependencies across Python 2 variants (primarily 2.7), enabling version-agnostic builds. Debug builds use --pydebug flag, prioritizing /usr/lib/python2.7/lib-dynload/debug for dynamic modules. Config tools (x86_64-linux-gnu-python2-config) output compiler/linker flags (--cflags, --libs). pygettext2 tokenizes Python source via Python's tokenize module to extract _() marked strings into .pot files compatible with GNU gettext workflow. pydoc2 serves HTML documentation or introspects modules/packages.
Installation
sudo apt install python-defaultsFlags
Examples
pdb2 -hpydoc2 -hpydoc2 <name>pydoc2 -p <port>pygettext2 -hpyversions -hpyversions -dpyclean -hpython2-config --helpx86_64-linux-gnu-python2-dbg-config --help