diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -25,9 +25,9 @@ Compare it to other versions:: >>> v < Version('0.1.2') True >>> sorted([Version('0.1.1'), Version('0.11.1'), Version('0.1.1-alpha')]) - [<SemVer(0, 1, 1, ('alpha',), ())>, - <SemVer(0, 1, 1, (), ())>, - <SemVer(0, 11, 1, (), ())>] + [<Version(0, 1, 1, ('alpha',), ())>, + <Version(0, 1, 1, (), ())>, + <Version(0, 11, 1, (), ())>] Define a simple specification:: @@ -49,6 +49,13 @@ Define complex specifications:: False +Select the best compatible version from a list:: + + >>> s = Spec('>=0.1.1,<0.2.0') + >>> s.select([Version('0.1.1'), Version('0.1.9-alpha'), Version('0.1.9-alpha+1')) + <Version(0, 1, 9, ('alpha',), (1,))> + + Framework integration ===================== |