Andreas Stenius
Andreas Stenius
This comes from: https://github.com/pypa/pip/blob/71b168879e75796b61f524bfcedc99b1de72f58b/src/pip/_vendor/packaging/utils.py#L45-L50 ```python _canonicalize_regex = re.compile(r"[-_.]+") def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName: if validate and not _validate_regex.match(name): raise InvalidName(f"name is invalid: {name!r}") # This...
This may have been solved by https://github.com/pypa/pip/commit/767bb40755243e1519be262c44abbda81d06868b but we should still produce normalized package names according to what PyPA expects.
Hmm.. using an older Pants version (and thus older pex/pip) I think I get a more accurate error message (in this case, I think it is the same root cause):...
OK- took me way longer than I care to admit, but the root cause is the absence of `pantsbuild.pants` on PyPI. When I use pants version `2.18.0a0` it works, but...
This fails for building a `pex_binary`. Building `python_distribution` targets works fine. I can understand if _running_ the pex once built could be problematic, but building I think should work?
`:p`, what a great example target name 🤣
This comes from the fact that they indeed have rules registered by `pants.core`: https://github.com/pantsbuild/pants/blob/cbf43fc3acdf86b6a0017e06478c7461437b4ba0/src/python/pants/core/register.py#L76-L80 .. and the help extractor gets a list of all backends registering a certain rule, and...
I just realized, a better heuristic would be to take the rules module path into consideration, picking the register.py closest to itself, rather than just the shortest string.
> I implemented @kaos suggestion [here](https://github.com/pantsbuild/pants/issues/20981#issuecomment-2141342033) Nice! (I'd call it inspired by, my suggestion was rather vague, let me clarify.) To make the `HelpInfoExtracter.get_provider()` generically better, not just for subsystems,...
Do we still need the CAOF (`BuildSymbolFactory`)? What do they offer that a target generator can't? I love the `BuildSymbol` part of this sketch. :) 👍🏽