Ravenports generated: 20 Apr 2020 23:55
[ravenports.git] / bucket_2A / python-libversion
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-libversion
4 VERSION=                1.2.0
5 KEYWORDS=               python
6 VARIANTS=               py38 py37
7 SDESC[py37]=            Python bindings for libversion (PY37)
8 SDESC[py38]=            Python bindings for libversion (PY38)
9 HOMEPAGE=               https://github.com/repology/py-libversion
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/l/libversion
14 DISTFILE[1]=            libversion-1.2.0.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[py37]=            single
17 SPKGS[py38]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY37
20 OPTIONS_STANDARD=       none
21 VOPTS[py37]=            PY38=OFF PY37=ON
22 VOPTS[py38]=            PY38=ON PY37=OFF
23
24 USES=                   pkgconfig
25
26 DISTNAME=               libversion-1.2.0
27
28 GENERATED=              yes
29
30 [PY37].USES_ON=                         python:py37
31
32 [PY38].USES_ON=                         python:py38
33
34 [FILE:3643:descriptions/desc.single]
35 # Python bindings for libversion
36
37         [image]
38
39 [Build Status]
40 [PyPI downloads]
41 [PyPI version]
42 [PyPI pythons]
43 [Github commits (since latest release)]
44
45 ## Purpose
46
47 Python bindings for libversion, which provides **fast**, **powerful**
48 and **correct** generic version string comparison algorithm.
49
50 See [libversion] repository for
51 more details on the algorithm.
52
53 ## Performance
54
55 **libversion** is 10x to 100x faster than other version comparison
56 facilities widely used in Python world.
57
58 | Facility                            | comps/sec |
59 |-------------------------------------|----------:|
60 | **libversion.version_compare2**     |  3492.81K |
61 | **libversion.version_compare**      |  3219.02K |
62 | **libversion.Version**              |   374.08K |
63 | tuple(map(int, (v.split('.'))))     |   206.02K |
64 | cmp_version.cmp_version             |   189.15K |
65 | cmp_version.VersionString           |   156.42K |
66 | distutils.version.StrictVersion     |    75.00K |
67 | version.Version                     |    71.39K |
68 | distutils.version.LooseVersion      |    51.38K |
69 | pkg_resources.parse_version         |    22.26K |
70
71 ## Correctness
72
73 **libversion** handles certain complex version cases better than other
74 version comparison facilities. Here are some example cases where others
75 fail:
76
77 | Test case               | libversion | tuple         | StrictVersion |
78 LooseVersion  | parse_version | cmp_version   |
79 |-------------------------|------------|---------------|---------------|---------------|---------------|---------------|
80 | 1.0 == 1.0.0            | ok         | incorrect (<) | ok            |
81 incorrect (<) | ok            | ok            |
82 | 1.2_3 == 1.2-3          | ok         | fail          | fail          |
83 incorrect (>) | incorrect (<) | ok            |
84 | 1.2.3 == 1.2-3          | ok         | fail          | fail          |
85 fail          | incorrect (>) | incorrect (<) |
86 | 1.0alpha1 == 1.0.alpha1 | ok         | fail          | fail          | ok
87            | ok            | incorrect (>) |
88 | 1.0rc1 < 1.0            | ok         | fail          | fail          |
89 incorrect (>) | ok            | incorrect (>) |
90 | 1.0 < 1.0patch1         | ok         | fail          | fail          | ok
91            | incorrect (>) | ok            |
92 | 1.0.2a < 1.0.2g         | ok         | fail          | fail          | ok
93            | incorrect (>) | ok            |
94
95 Note 1: **fail** means that attempt to compare versions has thrown
96 an exception, usually bacause a library cannot parse specific version
97 string.
98
99 Note 2: **version** module was not able to complete any tests as it's
100 a strict semantic version implementation which require 3 version
101 components. Also, it does not support Python 3 without modification.
102
103 ## Python wrapper features
104
105 -  Provides API similar to C library, `version_compare(a, b)` function
106 -  Provides more pythonic (but slower) `Version` class with overloaded
107    comparison operators
108
109 ## Requirements
110
111 -  Python 3.6+
112 -  pkg-config
113 -  [libversion] 2.7.0+
114
115 ## Example code
116
117 ```python
118 from libversion import Version, version_compare
119
120 assert(version_compare("0.9", "1.1") < 0)
121 assert(version_compare("1.0", "1.0.0") == 0)
122 assert(version_compare("1.1", "0.9") > 0)
123
124 assert(Version("0.9") < Version("1.1"))
125 assert(Version("1.0") ==  Version("1.0.0"))
126 assert(Version("1.1") > Version("0.9"))
127
128 assert(Version("0.999") < Version("1.0alpha1"))
129 assert(Version("1.0alpha1") < Version("1.0alpha2"))
130 assert(Version("1.0alpha2") < Version("1.0beta1"))
131 assert(Version("1.0beta1") < Version("1.0pre1"))
132 assert(Version("1.0pre1") < Version("1.0rc1"))
133 assert(Version("1.0rc1") < Version("1.0"))
134 assert(Version("1.0") < Version("1.0patch1"))
135
136
137 [FILE:102:distinfo]
138 b352cc98ca4e23095b362e3dee57a75f193b5380060988d4823b84a7a9b47adc         8197 libversion-1.2.0.tar.gz
139