mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
utils: Introduce abstraction over distutils comparison of versions
In future, if the semantics need to better align with Debian's version comparison, we can implement that easily. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
3d57feac24
commit
ebca76b236
@ -24,10 +24,13 @@ import os
|
|||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
import ruamel.yaml
|
import ruamel.yaml
|
||||||
from django.utils.functional import lazy
|
from django.utils.functional import lazy
|
||||||
|
|
||||||
|
Version = LooseVersion # Abstraction over distutils.version.LooseVersion
|
||||||
|
|
||||||
|
|
||||||
def import_from_gi(library, version):
|
def import_from_gi(library, version):
|
||||||
"""Import and return a GObject introspection library."""
|
"""Import and return a GObject introspection library."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user