Merge ab42b2ebdb into merged_master (Bitcoin PR bitcoin/bitcoin#28347)

This commit is contained in:
Byron Hambly 2025-07-05 16:14:42 +02:00
commit fd8afcf05e

View file

@ -9,10 +9,12 @@ Check for specified flake8 and mypy warnings in python files.
"""
import os
import pkg_resources
import subprocess
import sys
from importlib.metadata import metadata, PackageNotFoundError
DEPS = ['flake8', 'lief', 'mypy', 'pyzmq']
MYPY_CACHE_DIR = f"{os.getenv('BASE_ROOT_DIR', '')}/test/.mypy_cache"
@ -99,10 +101,10 @@ ENABLED = (
def check_dependencies():
working_set = {pkg.key for pkg in pkg_resources.working_set}
for dep in DEPS:
if dep not in working_set:
try:
metadata(dep)
except PackageNotFoundError:
print(f"Skipping Python linting since {dep} is not installed.")
exit(0)