rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

fix: redirect entrypoints to py_console_script_binary

Open groodt opened this issue 1 year ago • 2 comments

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).

groodt avatar Jul 13 '24 04:07 groodt

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.

rickeylev avatar Jul 15 '24 01:07 rickeylev

@groodt, do you plan (have time) to clean this up before 1.0?

aignas avatar Oct 14 '24 01:10 aignas