From a939d4e9a2831065169b9cf9006e5bb42caea34f Mon Sep 17 00:00:00 2001 From: Alexander Smolyakov Date: Tue, 7 Nov 2023 14:21:00 +0400 Subject: [PATCH] [miniconda] Update `test-utils.sh` - Rework `checkPythonPackageVersion` function to use `importlib.metadata` library; --- src/miniconda/test-project/test-utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miniconda/test-project/test-utils.sh b/src/miniconda/test-project/test-utils.sh index b6ad5dcb3..f1f4d0b57 100644 --- a/src/miniconda/test-project/test-utils.sh +++ b/src/miniconda/test-project/test-utils.sh @@ -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}" }