Merge pull request #60444 from ClickHouse/replace-distutils

Replace deprecated distutils by vendored packaging
This commit is contained in:
Mikhail f. Shiryaev 2024-02-27 15:50:49 +01:00 committed by GitHub
commit 6b24306678
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,10 +4,14 @@ import argparse
import logging import logging
import subprocess import subprocess
import sys import sys
from distutils.version import StrictVersion
from pathlib import Path from pathlib import Path
from typing import List, Tuple from typing import List, Tuple
# isort: off
from pip._vendor.packaging.version import Version
# isort: on
from build_download_helper import download_builds_filter from build_download_helper import download_builds_filter
from docker_images_helper import DockerImage, get_docker_image, pull_image from docker_images_helper import DockerImage, get_docker_image, pull_image
from env_helper import REPORT_PATH, TEMP_PATH from env_helper import REPORT_PATH, TEMP_PATH
@ -38,7 +42,7 @@ def process_glibc_check(log_path: Path, max_glibc_version: str) -> TestResults:
_, version = symbol_with_glibc.split("@GLIBC_") _, version = symbol_with_glibc.split("@GLIBC_")
if version == "PRIVATE": if version == "PRIVATE":
test_results.append(TestResult(symbol_with_glibc, "FAIL")) test_results.append(TestResult(symbol_with_glibc, "FAIL"))
elif StrictVersion(version) > max_glibc_version: elif Version(version) > Version(max_glibc_version):
test_results.append(TestResult(symbol_with_glibc, "FAIL")) test_results.append(TestResult(symbol_with_glibc, "FAIL"))
if not test_results: if not test_results:
test_results.append(TestResult("glibc check", "OK")) test_results.append(TestResult("glibc check", "OK"))