-
-
Notifications
You must be signed in to change notification settings - Fork 590
Fix entry point discovery on Windows. #572
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
Conversation
This is required for Windows support.
This reverts commit 7aa3215. Since we don't use entry_points any more, this fix should no longer be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a TODO to use zipfile.Path
once 3.8 is our minimum supported version? (zipfile.Path
is new in 3.8)
It would provide nicer code. Something like:
entry_points_path = zipfile.Path(whl, f"{name}.dist-info/entry_points.txt")
if not entry_points_path.exists():
return dict()
...
Done |
The zipfile module always uses forward slashes, so we shouldn't use os.path.join here.
Co-authored-by: Jonathon Belotti <jonathon@canva.com>
2b825d7
to
89cb6cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
The zipfile module always uses forward slashes, so we shouldn't use
os.path.join here.
PR Checklist
Please check if your PR fulfills the following requirements:
.par
files. See CONTRIBUTING.md for infoPR Type
What kind of change does this PR introduce?
What is the current behavior?
Entry points aren't found on Windows
Issue Number: N/A
What is the new behavior?
Entry points should be found on Windows (haven't fully tested it though)
Does this PR introduce a breaking change?
Other information