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
Add support for long_description_path field in python_distribution #14448
Add support for long_description_path field in python_distribution #14448
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
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.
This is looking great! Would you be willing to write a test for this? I'm definitely happy to pair program on how to do that :) writing tests can be tricky at first.
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
f"the {LongDescriptionPathField.alias} " | ||
f"field of {exported_target.target.address}" |
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.
This is how the error message is shown when a non-existing file is passed:
Unmatched glob from the long_description_path field of src/python/foo:foo-dist: "src/python/foo/readme.md"
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.
Yay! @jsirois if you're willing to wait, it would be great to include this in today's dev release.
cc @asherf , I think this was your original feature request :) |
YAY!!!! |
Work towards #11554
Closed #11554
The rule
determine_setup_kwargs
determines thekwargs
that are either hardcoded inprovides,
or that are provided by the user's plugin for it. TheseSetupKwargs
won't have everything, only the foundation for theFinalizedSetupKwargs
.We've decided to add the logic of extraction of the long_description file contents here, inside the rule
generate_setup_py_kwargs
that returnsFinalizedSetupKwargs
. That will make sure that this new logic works regardless of if you're using a plugin hook or not.