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 :my_func
shorthand for the entry_point
field
#11064
Add :my_func
shorthand for the entry_point
field
#11064
Conversation
f"{repr(request.sources.address)}, so it must have exactly one source, but it has " | ||
f"{len(binary_source_paths.files)}." | ||
) | ||
instructions_url = "https://www.pantsbuild.org/v2.1/docs/python-package-goal#creating-a-pex-file-from-a-pex_binary-target" |
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.
I don't think we want to bake "v2.1" into this URL, so let's just use https://www.pantsbuild.org/docs/python-package-goal#creating-a-pex-file-from-a-pex_binary-target.
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.
Stu proposed baking it in the other day: https://pantsbuild.slack.com/archives/C046T6T9U/p1603735964018700?thread_ts=1602610244.363000&cid=C046T6T9U
while it’s true that linking to v2.0 rather than v2.1 might get you older docs, it also won’t get you a broken link for removed/renamed features/pages
more likely to be correct on average i think.
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.
Also, we don't want to rewrite the docs for 2.0 - this feature will not be backported. We don't want to change the "default" version until 2.1.0 has landed.
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.
The trouble is, v2.1 docs will disappear eventually. We only have 5 versions back.
Probably we need an error URLs system, but for now hardcoding v2.1 is not a great idea.
# 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]
Problem
A user pointed out it's clunky to have to set
path.to.module:my_func
. They need to set the:my_func
portion so that it works withsetuptools
, so they can't use the default entry point when you setsources
and leave offentry_point
.Solution
Add a third option: an explicit
sources
field + explicitentry_point
field that starts with:
will be expanded topath.to.module:my_func
.