Skip to main content

Shim RPM module for use in virtualenvs.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpm-0.4.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpm-0.4.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file rpm-0.4.0.tar.gz.

File metadata

  • Download URL: rpm-0.4.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rpm-0.4.0.tar.gz
Algorithm Hash digest
SHA256 79adbefa82318e2625d6e4fa16666cf88543498a1f2c10dc3879165d1dc3ecee
MD5 e0591fa0956ef494a0d1b933b45c8ee7
BLAKE2b-256 bdce8db44d2b8fd6713a59e391d12b6816854b7bee8121ae7370c2d565de4265

See more details on using hashes here.

File details

Details for the file rpm-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: rpm-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for rpm-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ef697cb5fb73bf9300a13d423529d7ec215239bf95c5ecb145e6610645f6067
MD5 002e386c4b0dbc9e1696caaf9f69b749
BLAKE2b-256 17960f4e9ba318c6e09b76357ee88d6c73101f8799f8ed707cfdc1df131b4234

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page