builtin: add a few missing __init__.py (#50374)

This commit is contained in:
Harmen Stoppels 2025-05-08 18:45:09 +02:00 committed by GitHub
parent 7bbf581169
commit b0b316c646
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 1 deletions

View File

@ -350,7 +350,7 @@ def _ensure_no_folders_without_package_py(error_cls):
for repository in spack.repo.PATH.repos: for repository in spack.repo.PATH.repos:
missing = [] missing = []
for entry in os.scandir(repository.packages_path): for entry in os.scandir(repository.packages_path):
if not entry.is_dir(): if not entry.is_dir() or entry.name == "__pycache__":
continue continue
package_py = pathlib.Path(entry.path) / spack.repo.package_file_name package_py = pathlib.Path(entry.path) / spack.repo.package_file_name
if not package_py.exists(): if not package_py.exists():

View File

@ -232,6 +232,8 @@ def get_all_package_diffs(type: str, repo: "Repo", rev1="HEAD^1", rev2="HEAD") -
changed: Set[str] = set() changed: Set[str] = set()
for path in lines: for path in lines:
dir_name, _, _ = path.partition("/") dir_name, _, _ = path.partition("/")
if not nm.valid_module_name(dir_name, repo.package_api):
continue
pkg_name = nm.pkg_dir_to_pkg_name(dir_name, repo.package_api) pkg_name = nm.pkg_dir_to_pkg_name(dir_name, repo.package_api)
if pkg_name not in added and pkg_name not in removed: if pkg_name not in added and pkg_name not in removed:
changed.add(pkg_name) changed.add(pkg_name)

View File

@ -0,0 +1,3 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

View File

@ -0,0 +1,3 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)