Hello! I have a question about console entry point...
# pex
s
Hello! I have a question about console entry points, specifically the case where there are multiple matches and the script specification is ambiguous, similar to the case described here. I see that the fix is specific to the multi-platform use case, and when the distribution is platform specific. I was wondering why this restriction exists. I could have a simpler case where a pex contains packages A and B and both have an identical console entry point "X", for instance. How do I tell pex either at build or preferably run-time which X it should run?
1
b
@square-elephant-85438 how would you ensure you call the right console entrypoint if you installed A and B in the same venv? I think you'll find the answer to that question instructive. Console scripts should be unique to a project. The minute 2 different projects have the same console script, you have an ~unsolvable problem. You should try to fix the root problem of 2 different projects using the same console script name. If you can't, you should use `-m the.real:entrypoint`instead.
s
In the same venv, the entry point from the package installed the latest is what runs. Is there way I can do
-m the.real.entrypoint
at runtime in a pex?
b
s
That is EXACTLY what I was looking for, thanks a bunch! 🙌