{"id":28155,"library":"rpm-vercmp","title":"rpm-vercmp","description":"A pure Python implementation of the RPM version comparison algorithm (rpmvercmp). Current version 0.1.2, no regular release cadence observed.","status":"active","version":"0.1.2","language":"python","source_language":"en","source_url":"https://github.com/sgillespie/rpm-vercmp","tags":["rpm","version-comparison","rpmvercmp"],"install":[{"cmd":"pip install rpm-vercmp","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"rpmvercmp","correct":"from rpm_vercmp import rpmvercmp"}],"quickstart":{"code":"from rpm_vercmp import rpmvercmp\n\nresult = rpmvercmp('1.2.3', '1.2.4')\nprint(result)  # 1 if first > second, -1 if first < second, 0 if equal","lang":"python","description":"Compare two RPM version strings."},"warnings":[{"fix":"Use `rpmvercmp(a, b) > 0` instead of `rpmvercmp(a, b)` in boolean contexts.","message":"The function returns integers (1, -1, 0) for comparison results, not True/False or a boolean. Be careful in conditional checks.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure input strings follow RPM version format (e.g., '1.2.3', '1.2.3-1').","message":"Version strings must be valid RPM version strings. Non-standard characters or malformed input may cause unexpected results or errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from rpm_vercmp import rpmvercmp` (note underscore).","cause":"Incorrect import path; the module uses underscore, not hyphen.","error":"ModuleNotFoundError: No module named 'rpm_vercmp'"},{"fix":"Correct import: `from rpm_vercmp import rpmvercmp` then use `rpmvercmp(ver1, ver2)`.","cause":"Trying to import the module directly and then call it incorrectly.","error":"AttributeError: module 'rpm_vercmp' has no attribute 'rpmvercmp'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}