fix: redirect entrypoints to py_console_script_binary
entrypoints (originally from setuptools) AKA console_scripts (as defined in pyproject.toml) AKA py_console_scripts (as defined in rules_python) are a packaging standard.
It therefore makes sense to package this code alongside the other packaging rules code and not the python language rules code. The packaging rules code currently sits inside pypi. Looking at the code, we can see that it is packaging related because it extracts the contents of .dist-info directories, which originate from built distributions (wheels).
Yeah, I'll echo much of what Ignas said:
- Don't have kitchen sink bzl files. Over time, it incurs more unused loads.
- The above is especially true for the repo/loading/analysis phases. We want to avoid the repo-rule phase and loading-phases from causing loads of the other's code.
I'm -1 on moving the public symbol simply because it seems like needless churn. I guess if you really want to move it, OK. But I think we should keep the old location around for longer than typical because people are still upgrading from workspace->bzlmod, and if they don't have a stable load() path for the entry point replacements, it'll be pretty annoying to go through upgrading.
I'm fine with moving the implementation under python/private/pypi.
@groodt, do you plan (have time) to clean this up before 1.0?