Skip to content

gh-109002: Ensure only one wheel for each vendored package #109003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
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
14 changes: 10 additions & 4 deletions Tools/build/verify_ensurepip_wheels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python3
#!/usr/bin/env python3

"""
Compare checksums for wheels in :mod:`ensurepip` against the Cheeseshop.
Expand Down Expand Up @@ -35,11 +35,17 @@ def print_error(file_path: str, message: str) -> None:

def verify_wheel(package_name: str) -> bool:
# Find the package on disk
package_path = next(WHEEL_DIR.glob(f"{package_name}*.whl"), None)
if not package_path:
print_error("", f"Could not find a {package_name} wheel on disk.")
package_paths = list(WHEEL_DIR.glob(f"{package_name}*.whl"))
if len(package_paths) != 1:
if package_paths:
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.")
return False

package_path = package_paths[0]

print(f"Verifying checksum for {package_path}.")

# Find the version of the package used by ensurepip
Expand Down