https://pantsbuild.org/ logo
#general
Title
# general
h

high-yak-85899

03/16/2022, 5:53 PM
Is there any way to gain back the
entry_points
capability that exists with
setup.py
in pants? Maybe like some kind of path alias or something in
pants.toml
?
h

hundreds-father-404

03/16/2022, 5:56 PM
h

high-yak-85899

03/16/2022, 5:58 PM
Yes, but for use in the repo (and not just the distributed form of it). In our venv set up, I could do
run_my_tool
with the venv active. Now I have to do
./pants run potentially/long/path/to/my_tool.py
each time
h

hundreds-father-404

03/16/2022, 6:00 PM
Ah, have you seen setting up CLI aliases? https://www.pantsbuild.org/docs/reference-cli#section-alias A brilliant contribution from @curved-television-6568. We don't publicize it enough, I'm not sure where it should live in the docs.
h

high-yak-85899

03/16/2022, 6:01 PM
I definitely haven't. I think that's exactly what I'm needing!
🙌 1
I think it would be great somewhere near incremental adoption (or wherever one would talk about going from a
setup.py
like system to pants). Though I'm not sure how much others use entry points. We use them a lot at Astranis and the only reason people weren't complaining yet is because our venv usage hasn't been completely deprecated.
Just tried it out and it worked perfectly.
❤️ 2
h

hundreds-father-404

03/16/2022, 6:07 PM
Incremental adoption is definitely the best place I can think of too, other than if we added a "tips and tricks" page that sort of compliments https://www.pantsbuild.org/v2.10/docs/troubleshooting
3 Views