Skip to content

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

Merged
merged 4 commits into from
Dec 29, 2021
Merged

Conversation

phst
Copy link
Contributor

@phst phst commented Nov 17, 2021

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:

  • Does not include precompiled binaries, eg. .par files. See CONTRIBUTING.md for info
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

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?

  • Yes
  • No

Other information

@phst phst requested review from brandjon and lberki as code owners November 17, 2021 14:14
@google-cla google-cla bot added the cla: yes label Nov 17, 2021
phst added a commit to phst/rules_elisp that referenced this pull request Nov 18, 2021
This is required for Windows support.
phst added a commit to phst/rules_elisp that referenced this pull request Nov 18, 2021
This reverts commit 7aa3215.

Since we don't use entry_points any more, this fix should no longer be needed.
@thundergolfer thundergolfer requested review from thundergolfer and removed request for brandjon and lberki November 23, 2021 22:55
Copy link

@thundergolfer thundergolfer left a 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()
...

@phst
Copy link
Contributor Author

phst commented Nov 27, 2021

Can we add a TODO to use zipfile.Path once 3.8 is our minimum supported version? (zipfile.Path is new in 3.8)

Done

@phst phst closed this Nov 27, 2021
@phst phst reopened this Nov 27, 2021
@UebelAndre UebelAndre mentioned this pull request Dec 29, 2021
12 tasks
phst and others added 3 commits December 29, 2021 08:31
The zipfile module always uses forward slashes, so we shouldn't use
os.path.join here.
Co-authored-by: Jonathon Belotti <jonathon@canva.com>
Copy link
Contributor

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

thanks!

@alexeagle alexeagle merged commit 1152bd1 into bazel-contrib:main Dec 29, 2021
@phst phst deleted the entrypoint branch December 29, 2021 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants