fix deprecated package in a_atleast_b.py

This commit is contained in:
Jay Lee
2021-10-18 08:50:13 -04:00
parent 93bf3fce29
commit eeab09eacb
2 changed files with 3 additions and 4 deletions

View File

@@ -215,6 +215,7 @@ jobs:
- name: Basic Tests build jobs only
if: matrix.goal != 'test'
run: |
$pip install packaging
export vline=$($gam version | grep "Python ")
export python_line=($vline)
export this_python=${python_line[1]}

View File

@@ -1,13 +1,11 @@
#!/usr/bin/env python3
#from packaging import version
from distutils.version import LooseVersion
from packaging import version
import sys
a = sys.argv[1]
b = sys.argv[2]
#result = version.parse(a) >= version.parse(b)
result = LooseVersion(a) >= LooseVersion(b)
result = version.parse(a) >= version.parse(b)
if result:
print('OK: %s is equal or newer than %s' % (a, b))
else: