/
githubmirror
/
scikit-learn
Обзор
Документация
Войти
/
githubmirror
/
scikit-learn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
build_tools/github/check_wheels.py
30 строк
805 B
Thomas J. Fan
CI Move linux arm64 wheels build to github actions (#30658)
20 янв 2025, 13:04
Не верифицирован
20 янв 2025, 13:04
9312206
Код
Авторство
О чём код?
"""Checks that dist/* contains the number of wheels built from the .github/workflows/wheels.yml config.""" import sys from pathlib import Path import yaml gh_wheel_path = Path.cwd() / ".github" / "workflows" / "wheels.yml" with gh_wheel_path.open("r") as f: wheel_config = yaml.safe_load(f) build_matrix = wheel_config["jobs"]["build_wheels"]["strategy"]["matrix"]["include"] n_wheels = len(build_matrix) # plus one more for the sdist n_wheels += 1 dist_files = list(Path("dist").glob("**/*")) n_dist_files = len(dist_files) if n_dist_files != n_wheels: print( f"Expected {n_wheels} wheels in dist/* but " f"got {n_dist_files} artifacts instead." ) sys.exit(1) print(f"dist/* has the expected {n_wheels} wheels:") print("\n".join(file.name for file in dist_files))