The `rpm-shim` library (available on PyPI as `rpm`) provides a shim module to enable the use of system RPM Python bindings within Python virtual environments. This is necessary because native RPM Python bindings are typically tied to the system's RPM installation and are not distributed as standard Python packages. The library is currently at version 0.4.0 and releases are made on an as-needed basis to improve compatibility and search heuristics.
pip install rpmVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates installing `rpm-shim` (as `rpm`) into a virtual environment and then importing and using the `rpm` module. The core idea is that once `rpm-shim` is installed, a simple `import rpm` will make the system's RPM bindings available within your virtual environment. Ensure that your system has the native RPM Python bindings installed (e.g., `python3-rpm` package on RPM-based systems).
Upgrade to `rpm-shim` version `0.4.0` or newer. This version prioritizes searching for the `rpm` module within the current interpreter's paths, resolving this common issue.
Ensure that your operating system has the corresponding native Python RPM bindings installed. For most RPM-based Linux distributions, this means installing a package like `python3-rpm` (or `python-rpm` for Python 2) via your system's package manager (e.g., `dnf install python3-rpm` or `zypper install python3-rpm`).
Only install and use `rpm-shim` within a Python virtual environment where you explicitly need access to the system `rpm` module.
No dependency data recorded yet.