From ebca76b236eda56fce281da41d0913a3e897c0d5 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 1 Mar 2019 15:18:16 -0800 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- plinth/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plinth/utils.py b/plinth/utils.py index 512755193..5c5562500 100644 --- a/plinth/utils.py +++ b/plinth/utils.py @@ -24,10 +24,13 @@ import os import random import re import string +from distutils.version import LooseVersion import ruamel.yaml from django.utils.functional import lazy +Version = LooseVersion # Abstraction over distutils.version.LooseVersion + def import_from_gi(library, version): """Import and return a GObject introspection library."""