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 entrypoints management #63

Merged
merged 4 commits into from
Jun 25, 2021

Conversation

sdispater
Copy link
Contributor

I am currently trying to integrate installer into Poetry and things are mostly good but there were issues with how the entrypoints were managed. More specifically:

  • The entry points file was not properly detected (installer was looking for a entry-points.txt file while the actual file is entry_points.txt).
  • Assertion errors were raised for some entry points (either because they did not match the regexp or were missing the attribute part, which is not required for non-script entry points). This was fixed by ensuring that the parse_entrypoints() function only parses script entry points.
  • Finally, generated scripts were not executable.

@@ -190,6 +190,9 @@ def parse_entrypoints(text):

# Borrowed from https://github.com/python/importlib_metadata/blob/v3.4.0/importlib_metadata/__init__.py#L90 # noqa
Copy link
Member

Choose a reason for hiding this comment

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

Is this comment still up-to-date @pradyunsg? The linked target is entirely different from the code below.

Copy link
Member

Choose a reason for hiding this comment

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

Yea, this is out of date. Let’s drop it.

@sdispater could you make this change in this PR?

Copy link
Member

Choose a reason for hiding this comment

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

Actually, nvm. Let’s do that in a follow up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pradyunsg I did it anyway :-)

@pradyunsg pradyunsg merged commit 35ce914 into pypa:main Jun 25, 2021
@frostming
Copy link
Contributor

Hi, when will this fix be released? I am planning to adopt installer in PDM.

@pradyunsg
Copy link
Member

Ah buggery. I forgot about that.

I’ll do if over the coming weekend but if I don’t, please file a new issue.

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.

None yet

4 participants