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