LinuxCommandLibrary

dh_pysupport

Register Python packages for Debian packaging

SYNOPSIS

dh_pysupport is typically invoked as part of the dh(1) command sequence in a Debian package's debian/rules file, like:
#!/usr/bin/make -f
%:
dh $@
It does not usually take direct command-line arguments from a user. Its behavior is primarily driven by the presence of Python files in the package and the debhelper environment.

PARAMETERS

No specific parameters
    dh_pysupport does not expose specific command-line parameters for user interaction. Its operations are largely automatic within the debhelper build process. Any arguments passed to it are typically standard debhelper flags (e.g., --indep, --arch, etc.) which control the overall build process rather than specific dh_pysupport functions.

DESCRIPTION

dh_pysupport was a debhelper program designed to assist in packaging Python 2 modules for Debian-based systems. Its primary function was to handle the installation of Python source files (.py), byte-compilation of these files into .pyc and .pyo (optimized) versions, and to manage the creation of site-packages or dist-packages directories. It ensured that Python modules were correctly installed to the appropriate system-wide locations and managed dependencies with the system's Python 2 interpreter. It was an integral part of the python-support framework, which provided a standardized way to build Python packages. With the end-of-life for Python 2 and the transition to Python 3, dh_pysupport has been largely superseded by dh_python and is considered a legacy tool.

CAVEATS

dh_pysupport is highly deprecated and effectively removed from modern Debian and Ubuntu distributions. It was part of the python-support package, which has been removed since Debian Stretch (and corresponding Ubuntu releases). It was designed exclusively for Python 2 packages. For Python 3 packaging, and for modern Python 2 packaging before its complete deprecation, it has been superseded by dh_python and dh_python2. It should not be used for new packages.

LEGACY CONTEXT

dh_pysupport was designed to work with Python 2's site-packages directory structure and the legacy python command. Modern Python packaging leverages python3 and often virtual environments, which dh_pysupport does not support.

HISTORY

dh_pysupport emerged as a core component of the python-support framework in Debian, aimed at simplifying the packaging of Python 2 modules. It provided a consistent mechanism for handling Python-specific build steps. With the advent of Python 3 and the need for a more robust and future-proof packaging solution that could handle multiple Python versions, the python-support framework, including dh_pysupport, was replaced by dh_python. This transition began around 2010-2012 and concluded with the complete removal of python-support from Debian Stretch in 2017.

SEE ALSO

dh_python(1), dh_python2(1), dh(1), debhelper(7), python-support(7)

Copied to clipboard