Skip to content
Merged
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
Prev Previous commit
[miniconda] Update test-utils.sh
- Rework `checkPythonPackageVersion` function to use `importlib.metadata` library;
  • Loading branch information
alexander-smolyakov committed Nov 7, 2023
commit a939d4e9a2831065169b9cf9006e5bb42caea34f
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