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

Don't require hardcoded name in python_distribution.provides #17522

Merged
merged 1 commit into from Nov 10, 2022

Conversation

benjyw
Copy link
Sponsor Contributor

@benjyw benjyw commented Nov 10, 2022

It might be provided by a SetupKwargs-generating plugin.

Also fix various example uses of the legacy "setup_py()" name to "python_artifact()",
which is the name we document.

It might be provided by a SetupKwargs-generating plugin.

Also fix various example uses of the legacy "setup_py()" name
to "python_artifact()", which is the name we document.
@@ -104,6 +86,3 @@ def __eq__(self, other: Any) -> bool:

def __hash__(self) -> int:
return self._hash

def __str__(self) -> str:
Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

I ran all the tests, and manually built some dists, with this __str__ method modified to raise an exception, thus verifying that it's not actually called, let alone does it matter what this stringifies to.

self._name: str = name

@property
def name(self) -> str:
Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

I ran all the tests, and manually built some dists, to verify that this property isn't used.

@benjyw benjyw merged commit 24e5435 into pantsbuild:main Nov 10, 2022
@benjyw benjyw deleted the setup_py_name branch November 10, 2022 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants