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

[ISSUE-38] Change size computation in getPackageInfoLocal #39

Merged
merged 1 commit into from
Jun 24, 2023

Conversation

NicolaDonelli
Copy link
Contributor

What is the purpose of this pull request? (put an "X" next to item)

  • Documentation update
  • Bug fix
  • New feature
  • Other, please explain:

What changes did you make? (Give an overview)

Changes the way package size is computed in getPackageInfoLocal to avoid throwing a ModuleNotFound error (and thus returning an UNKNWON license) when the locally installed package is a namespace package (that cannot be loaded easily with importlib.import_module)

Which issue (if any) does this pull request address?

Fixes #38

Is there anything you'd like reviewers to focus on?

The size computed by metadata.Distribution is not the same as the on retrieved by PyPI (for published packages, ofc). These measurements can differ significantly but, since this information is actually of no use for license comparison, I wouldn't care very much about understanding the motivations of this difference and try to solve it.

@FredHappyface
Copy link
Member

Looks great! Thank you for this :)

@FredHappyface FredHappyface merged commit f166187 into FHPythonUtils:master Jun 24, 2023
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.

Bug: failure in correctly parsing installed namespace packages
2 participants