Registry / serialization / rpm-vercmp

rpm-vercmp

JSON →
library0.1.2pypypi✓ verified 84d ago

A pure Python implementation of the RPM version comparison algorithm (rpmvercmp). Current version 0.1.2, no regular release cadence observed.

pip install rpm-vercmp
INSTALL
IMPORT
SIG · RPM-VERCMP
R
rpm-vercmp
serializationpythonv0.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vercmp
✓ from rpm_vercmp import vercmp
✗ from rpm_vercmp import rpmvercmp

Compare two RPM version strings.

from rpm_vercmp import rpmvercmp result = rpmvercmp('1.2.3', '1.2.4') print(result) # 1 if first > second, -1 if first < second, 0 if equal
Debug
Known issues
gotchaThe function returns integers (1, -1, 0) for comparison results, not True/False or a boolean. Be careful in conditional checks.
fix
Use `rpmvercmp(a, b) > 0` instead of `rpmvercmp(a, b)` in boolean contexts.
affects: all
gotchaVersion strings must be valid RPM version strings. Non-standard characters or malformed input may cause unexpected results or errors.
fix
Ensure input strings follow RPM version format (e.g., '1.2.3', '1.2.3-1').
affects: all
Upgrade
Version history
0.1.2latest on PyPI · released Oct 30, 2018
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
rpm-vercmp — pip install rpm-vercmp · libregistry