Skip to content

Commit

Permalink
[miniconda] Update test-utils.sh
Browse files Browse the repository at this point in the history
- Rework `checkPythonPackageVersion` function to use `importlib.metadata` library;
  • Loading branch information
alexander-smolyakov committed Nov 7, 2023
1 parent c95789b commit a939d4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/miniconda/test-project/test-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ checkPythonPackageVersion()
PACKAGE=$1
REQUIRED_VERSION=$2

current_version=$(python -c "import ${PACKAGE}; print(${PACKAGE}.__version__)")
current_version=$(python -c "import importlib.metadata; print(importlib.metadata.version('${PACKAGE}'))")
check-version-ge "${PACKAGE}-requirement" "${current_version}" "${REQUIRED_VERSION}"
}

Expand Down

0 comments on commit a939d4e

Please sign in to comment.