Commit e7149369 authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

configure: use distutils in ax_check_python_mako_module

Handling the version comparison by hand is a bad idea. Python has a handy
module distutils for that - use it.
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker's avatarDylan Baker <dylan@pnwbakers.com>
parent df2042d9
......@@ -45,11 +45,12 @@ AC_DEFUN([AX_CHECK_PYTHON_MAKO_MODULE],
try:
import sys
import mako
import distutils.version
except ImportError as err:
sys.exit(err)
else:
ver_req = map(int, '$1'.split('.'))
ver_act = map(int, mako.__version__.split('.'))
ver_req = distutils.version.LooseVersion('$1')
ver_act = distutils.version.LooseVersion(mako.__version__)
sys.exit(int(ver_req > ver_act))
" | $PYTHON2 -
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment