Skip to content
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

Fix issues in PythonInstalledWheelMetadataFile.assign_package_to_resources() #3062

Conversation

JonoYang
Copy link
Member

This PR fixes a few issues in PythonInstalledWheelMetadataFile.assign_package_to_resources():

  • PythonInstalledWheelMetadataFile.assign_package_to_resources() would not correctly find the site-packages directory, as it called .parent() too many times on the datafile Resource.
  • The variable path_ref was not being assigned correctly and PythonInstalledWheelMetadataFile.assign_package_to_resources() would fail during Package assembly.

    * Correctly assign path_ref when partitioning path_ref in PythonInstalledWheelMetadataFile.assign_package_to_resources

Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
    * Add test for extracted pypi wheel
    * Update test expectations

Signed-off-by: Jono Yang <jyang@nexb.com>
@JonoYang JonoYang force-pushed the fix-PythonInstalledWheelMetadataFile-assign_package_to_resources branch from 3d2b6a1 to 1abd495 Compare August 23, 2022 22:03
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

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

LGTM!
merging. Thank you ++

@pombredanne pombredanne merged commit 8375c4a into develop Aug 24, 2022
@pombredanne pombredanne deleted the fix-PythonInstalledWheelMetadataFile-assign_package_to_resources branch August 24, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants