alright one more hopefully easy one. so I've got a...
# general
s
alright one more hopefully easy one. so I've got a subpackage I'm trying to build a pex binary out of, the directory format is like this:
Copy code
src/python/pipelines/pipe1/pipe1/*.py
src/python/pipelines/pipe1/pipe1/BUILD # contains pex_binary target
when I run pants package
src/python/pipelines/pipe1/pipe1:bin
I get a pex file that includes all the appropriate first and 3rd party deps (awesome), but the import path for
pipe1
is not quite what I'm expecting. when I launch an interpreter using the generated pex file the required import path is
from pipe1.pipe1 import main
whereas I was expecting it to be
from pipe1 import main
any ideas on what I'd need to do to get the latter import path? it's odd to me that I'm even able to do
from pipe1.pipe1 import ...
as there's no
__init__.py
file at
src/python/pipelines/pipe1/
e
The tool here is
pants roots
play with this until that outputs the correct PYTHONPATH entries: + https://www.pantsbuild.org/docs/reference-source#root_patterns + https://www.pantsbuild.org/docs/source-roots
👀 1
s
thanks a million, I'll dig into those docs