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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rpm-0.3.1.tar.gz
.
File metadata
- Download URL: rpm-0.3.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d75c5dcb581f1e9c4f89cb6667e938e944c6e7c17dd96829e1553c39f3a4c961 |
|
MD5 | c1381c56e4f2e12fea58976d02c21547 |
|
BLAKE2b-256 | d3363dae1ccf058414ee9cc1d39722216db0e0430002ce5008c0b0244f1886fd |
File details
Details for the file rpm-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: rpm-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a130be8b953781bdbe652927dd9c50d2160f26344ec6e3c0defe823aeda1789 |
|
MD5 | 62723c145f6ba1b34eb8ada3f045845c |
|
BLAKE2b-256 | 6d68d35d5f72c6f1c65c08e2e72c68e5d37a19af513059e0a595a4de4ab00975 |