Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Tools/build/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[mypy]
files =
Tools/build/compute-changes.py,
Tools/build/generate_sbom.py
Tools/build/generate_sbom.py,
Tools/build/verify_ensurepip_wheels.py
pretty = True

# Make sure Python can still be built
Expand Down
8 changes: 5 additions & 3 deletions Tools/build/verify_ensurepip_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"


def print_notice(file_path: str, message: str) -> None:
def print_notice(file_path: Path, message: str) -> None:
if GITHUB_ACTIONS:
message = f"::notice file={file_path}::{message}"
print(message, end="\n\n")


def print_error(file_path: str, message: str) -> None:
def print_error(file_path: Path, message: str) -> None:
if GITHUB_ACTIONS:
message = f"::error file={file_path}::{message}"
print(message, end="\n\n")
Expand All @@ -40,7 +40,7 @@ def verify_wheel(package_name: str) -> bool:
for p in package_paths:
print_error(p, f"Found more than one wheel for package {package_name}.")
else:
print_error("", f"Could not find a {package_name} wheel on disk.")
print_error(Path(), f"Could not find a {package_name} wheel on disk.")
return False

package_path = package_paths[0]
Expand All @@ -67,6 +67,7 @@ def verify_wheel(package_name: str) -> bool:
return False

release_files = json.loads(raw_text)["releases"][package_version]
expected_digest = ""
for release_info in release_files:
if package_path.name != release_info["filename"]:
continue
Expand Down Expand Up @@ -95,6 +96,7 @@ def verify_wheel(package_name: str) -> bool:
return True



if __name__ == "__main__":
exit_status = int(not verify_wheel("pip"))
raise SystemExit(exit_status)
Loading