I'm sure I've got a little error somewhere. I'm tr...
# general
s
I'm sure I've got a little error somewhere. I'm trying out PEX binaries and am having a little trouble getting started. I have a directory like this:
Copy code
src/python/sirch/BUILD
src/python/sirch/sirch/*.py
src/python/sirch/sirch/BUILD
in the
src/python/sirch/BUILD
file I have the following:
Copy code
python_sources(
    name="sirch",
    sources=["sirch/*.py"]
)

docker_image(
    name="docker"
)

pex_binary(name="bin")
when I run
pants package src/python/etxpipelines/sirch:bin
it spits out a pex file super fast with no warnings, but when I go to unzip the pex file to inspect what ended up in it I don't see any of the first-party code from
src/python/sirch/*.py
or any of the third-party dependencies I would expect either. what am I missing here? I also tried putting a
pex_binary
target in
src/python/sirch/sirch/BUILD
and building the pex from there, but that didn't seem to change anything. seems like the
pex_binary
target isn't inferring that there are any dependencies?
1
r
I think you might be missing an entry script. Without any entry script you need to provide a manual dependency inside
pex_binary
s
okay got it, yeah I see now that pants probably isn't inferring any dependencies because there's no entry point. thank you!
💯 1