Skip to content
Closed
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
19 changes: 18 additions & 1 deletion src/fromager/wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _extra_metadata_elfdeps(
return elfinfos


def extract_info_from_wheel_file(
def default_extract_info_from_wheel_file(
req: Requirement, wheel_file: pathlib.Path
) -> tuple[str, Version, BuildTag, frozenset[Tag]]:
# parse_wheel_filename normalizes the dist name, however the dist-info
Expand All @@ -133,6 +133,23 @@ def extract_info_from_wheel_file(
return (dist_name, dist_version, build_tag, wheel_tags)


def extract_info_from_wheel_file(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have tests?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

req: Requirement, wheel_file: pathlib.Path
) -> tuple[str, Version, BuildTag, frozenset[Tag]]:

wheel_info: tuple[str, Version, BuildTag, frozenset[Tag]] = (
overrides.find_and_invoke(
req.name,
"extract_info_from_wheel_file",
default_extract_info_from_wheel_file,
req=req,
wheel_file=wheel_file,
)
)

return wheel_info


def default_add_extra_metadata_to_wheels(
ctx: context.WorkContext,
req: Requirement,
Expand Down
Loading