Skip to main content

rpm-shim

Python RPM shim module for use in virtalenvs.

Purpose

RPM Python bindings are tied to system RPM installation and are not available as a Python package (on PyPI or elsewhere). This shim module makes it possible to import and use the bindings in a virtualenv.

There is no point installing this shim module on a bare system, outside of a virtualenv. It should still work, but there is no benefit. If you want to do that anyway, pay attention not to overwrite installed RPM Python bindings.

Example

Here is a scenario of how this module enables usage of RPM Python bindings in a newly created virtualenv. First commands are run on a host system.

# make sure RPM Python bindings are installed and functional
$ rpm -q python3-rpm
python3-rpm-4.18.0-1.fc37.x86_64

$ pip list
Package    Version
---------- -------
rpm        4.18.0

$ python -c "import rpm; print(rpm.__version__)"
4.18.0

# let's create a virtualenv
$ python -m venv env
$ source env/bin/activate

# the bindings are not accessible there
(env) $ python -c "import rpm; print(rpm.__version__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'rpm'

# install the shim module from PyPI
(env) $ pip install rpm
...
Successfully installed rpm-0.1.0

# now we can import the bindings
(env) $ python -c "import rpm; print(rpm.__version__)"
4.18.0

Metadata

Release files for rpm 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpm 0.5.0
File Size Uploaded
rpm-0.5.0.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rpm 0.5.0
File Interpreter ABI Platform
rpm-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / rpm-0.5.0.tar.gz

Download URL rpm-0.5.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4a7ab1067e67f3eeed35472ec05ebfb60275401767859e44386463083ab19b1a
BLAKE2b-256 checksum
How to use checksums
66cca0894c934cd27ea2738c4665de4218a97bedaef6ed73b55d845cacf90a14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / rpm-0.5.0-py3-none-any.whl

Download URL rpm-0.5.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd59bce89060c914d1eacac0ebf194a99ba5c14d16cfa3bed35b59b84da0e368
BLAKE2b-256 checksum
How to use checksums
35cc41cf2d933885dede93509e01555566aa5c54fb39bf59af2b4ce6327f296b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.3.2

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page