# 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.
```bash
# 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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/packit/rpm-shim",
"name": "rpm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "rpm, virtualenv",
"author": "Red Hat",
"author_email": "hello@packit.dev",
"download_url": "https://files.pythonhosted.org/packages/29/9e/97e3b8c285466befba63ab78e892594b6aa9db959bb883060a3d7445ab5e/rpm-0.3.0.tar.gz",
"platform": null,
"description": "# rpm-shim\n\nPython RPM shim module for use in virtalenvs.\n\n## Purpose\n\nRPM 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.\n\nThere 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.\n\n## Example\n\nHere 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.\n\n```bash\n# make sure RPM Python bindings are installed and functional\n$ rpm -q python3-rpm\npython3-rpm-4.18.0-1.fc37.x86_64\n\n$ pip list\nPackage Version\n---------- -------\nrpm 4.18.0\n\n$ python -c \"import rpm; print(rpm.__version__)\"\n4.18.0\n\n# let's create a virtualenv\n$ python -m venv env\n$ source env/bin/activate\n\n# the bindings are not accessible there\n(env) $ python -c \"import rpm; print(rpm.__version__)\"\nTraceback (most recent call last):\n File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'rpm'\n\n# install the shim module from PyPI\n(env) $ pip install rpm\n...\nSuccessfully installed rpm-0.1.0\n\n# now we can import the bindings\n(env) $ python -c \"import rpm; print(rpm.__version__)\"\n4.18.0\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Shim RPM module for use in virtualenvs.",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/packit/rpm-shim"
},
"split_keywords": [
"rpm",
" virtualenv"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9bafef3a06e00c3882be5bb926b17d33073ebdad59eab3dc061416034ea5e1a0",
"md5": "ff29815d1c7ca8d2cf51fbe5913abb01",
"sha256": "4f93082693fc82079d8ad080aebad1ec8aed1667c4f2081b3d5f2cd28dfb5e2f"
},
"downloads": -1,
"filename": "rpm-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff29815d1c7ca8d2cf51fbe5913abb01",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5095,
"upload_time": "2024-10-28T17:00:45",
"upload_time_iso_8601": "2024-10-28T17:00:45.716383Z",
"url": "https://files.pythonhosted.org/packages/9b/af/ef3a06e00c3882be5bb926b17d33073ebdad59eab3dc061416034ea5e1a0/rpm-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "299e97e3b8c285466befba63ab78e892594b6aa9db959bb883060a3d7445ab5e",
"md5": "c7e0edad8b7a481ea29f0d7f4ef9e7ab",
"sha256": "2c5415abb7d8a15428cb97a6f429c107c0619bfd4d0140c034af46e7c8d53b2e"
},
"downloads": -1,
"filename": "rpm-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "c7e0edad8b7a481ea29f0d7f4ef9e7ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11037,
"upload_time": "2024-10-28T17:00:47",
"upload_time_iso_8601": "2024-10-28T17:00:47.026245Z",
"url": "https://files.pythonhosted.org/packages/29/9e/97e3b8c285466befba63ab78e892594b6aa9db959bb883060a3d7445ab5e/rpm-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 17:00:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "packit",
"github_project": "rpm-shim",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "rpm"
}