I am looking for a python module / library which will be to operate on 'software versions'... Which means, for example:
Yes, versions naming comes in this came from java (maven) world - my python part should operate on them..
Any ideas?
distutils
has some support for this.
>>> from distutils.version import LooseVersion # or StrictVersion
>>> LooseVersion("1.0-SNAPSHOT") < LooseVersion("1.1-SNAPSHOT")
True
>>> v = LooseVersion("1.0.1-SNAPSHOT")
>>> v.version
[1, 0, 1, '-SNAPSHOT']
You'll have to do the incrementing and other manipulation yourself though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With