Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add function for doing minimum version check
  • Loading branch information
nchammas committed Mar 14, 2020
commit 26b01bf84d5a7e9cdbb9b3a450072c3133f5269a
11 changes: 11 additions & 0 deletions dev/lint-python
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ SPHINX_BUILD="sphinx-build"

PYTHON_EXECUTABLE="python3"

function satisfies_min_version {
local provided_version="$1"
local expected_version="$2"
echo "$(
"$PYTHON_EXECUTABLE" << EOM
from packaging import version
print(version.parse('$provided_version') >= version.parse('$expected_version'))
EOM
)"
}

function compile_python_test {
local COMPILE_STATUS=
local COMPILE_REPORT=
Expand Down