Not sure what gives, but if I have a `pex_binary(e...
# general
Not sure what gives, but if I have a
but no
I get this error when running the pex:
Copy code
ImportError: Error while finding module specification for 'helloworld.main' (ModuleNotFoundError: No module named 'helloworld')
Adding the python_library target solves it, but that may not be the most obvious thing, given the error message..
What I’m after really is, if it would be possible to catch this error when building the pex, as clearly it can’t run, so the result will be broken.
Hmm interesting one
Not sure if we can catch the error while building the pex
In general we can't catch missing dependencies and things like that
We could maybe hypothetically catch this one because the missing dependency is directly referenced by the
as its entry point
But even then not in all cases
we might misdetect - for example the entry point might be installed by a 3rd party requirement in some way we can't know about
👍 1
So that might be tricker than it looks at first
Ah, right. 👍🏽