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 - name: Basic Tests build jobs only
if: matrix.goal != 'test' if: matrix.goal != 'test'
run: | run: |
$pip install packaging
export vline=$($gam version | grep "Python ") export vline=$($gam version | grep "Python ")
export python_line=($vline) export python_line=($vline)
export this_python=${python_line[1]} export this_python=${python_line[1]}

View File

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