dh_numpy
Build Debian packages using NumPy
SYNOPSIS
dh_numpy [debhelper options]
PARAMETERS
--no-act
Do not actually perform any operations. Instead, print the commands that would be executed, allowing for a dry run.
--verbose
Enable verbose output, providing more detailed information about the actions being taken by dh_numpy.
--indep
Act only on architecture-independent packages. This option is inherited from debhelper and filters the package types dh_numpy operates on.
--arch
Act only on architecture-dependent packages. Similar to --indep
, this option filters based on package architecture.
[debhelper options]
dh_numpy supports all standard options provided by debhelper(7). These options control general behavior common to most dh_* commands, such as output verbosity, dry-run mode, and targeting specific package types (e.g., architecture-dependent or independent components of a source package).
DESCRIPTION
dh_numpy is a specialized debhelper program designed for Debian packaging of the NumPy library. Its primary function is to byte-compile Python source files (with a .py extension) found specifically within the /usr/lib/python{X}/dist-packages/numpy/
directory and its subdirectories. This process converts human-readable Python code into bytecode (.pyc or .pyo files), which can lead to faster loading times and minor obfuscation within installed packages.
It is typically invoked automatically by the main dh(1) command during the Debian package build process when either the --with python-support
or --with python3-support
sequence is specified in the debian/rules file. This ensures that NumPy packages adhere to Debian's Python packaging policies and are optimized for deployment on user systems.
CAVEATS
dh_numpy is highly specific to the NumPy Python library and will only process files located within the expected /usr/lib/python{X}/dist-packages/numpy/
path structure. It relies on being called as part of the debhelper's Python support sequences. For general Python byte-compilation for packages that are not NumPy-specific, other debhelper tools like dh_python3(1) or dh_python2(1) should be used.
HISTORY
dh_numpy emerged as a specialized component within the debhelper suite, designed to streamline the packaging of significant Python libraries in Debian. As NumPy grew to be a foundational library for scientific and numerical computing in Python, its specific packaging requirements, particularly concerning the efficient byte-compilation of its extensive codebase, necessitated a dedicated tool. It integrates seamlessly with the broader python-support and python3-support mechanisms provided by debhelper, evolving alongside Debian's Python packaging policies.
SEE ALSO
dh(1), debhelper(7), dh_python3(1), python-support(7)