Skip to main content

Pure Python implementation of rpmvercmp

Project description

Pure Python implementation of rpmvercmp.

The RPM Package Manager (http://rpm.org) has a version comparision algorithm, implemented in its C library, which performs the comparison in a certain way.

In certain circumstances, where the C library is not installable (for example, on non-rpm based systems), or does not support the desired version of the python interpreter, the pure-python implementation may be useful.

Source Code

https://github.com/sassoftware/python-rpm-vercmp

Installation

$ pip install rpm_vercmp

Usage

import rpm_vercmp assert rpm_vercmp.vercmp(“1.0”, “1.0”) == 0 assert rpm_vercmp.vercmp(“1.0”, “1.1”) == -1

Testing

The testsuite uses rpm’s test file in m4 format. The file cat be fetched from: https://raw.githubusercontent.com/rpm-software-management/rpm/master/tests/rpmvercmp.at

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_vercmp-0.1.2.tar.gz (8.9 kB view details)

Uploaded Source

File details

Details for the file rpm_vercmp-0.1.2.tar.gz.

File metadata

  • Download URL: rpm_vercmp-0.1.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.8.1 pkginfo/1.4.1 requests/2.18.4 setuptools/34.2.0 requests-toolbelt/0.7.1 clint/0.5.1 CPython/2.7.15 Linux/4.18.14-200.fc28.x86_64

File hashes

Hashes for rpm_vercmp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 73dd583f1ff7a798faff62d39659d8a3e5183099972b2fc028bfadd70a43eda8
MD5 b46b1ca362d0ea5626a02bd2661b3d0b
BLAKE2b-256 0385322c80222742fd2ff810775e353265eb6b84cbc6ffa64c9ae5429853ed5c

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