I have a project set up like ```src/python/thing-...
# general
c
I have a project set up like
Copy code
src/python/thing-i-am-working-on/module.py
src/python/some-other-thing/other_module.py
when I try to run
pants setup-py src/python/thing-i-am-working-on::
I get this error and I’m not sure what to do about it
FAILURE: No exported target owner found for PythonLibrary(BuildFileAddress(src/python/some-other-thing/BUILD, some-other-thing))
Any thoughts on what could be going on here?
w
@cold-journalist-66984: Sorry for the trouble. “exported” means “has a provides clause that declares where it is exported to”
c
So do all of the sibling projects need to have a provides clause? For context, there is a root BUILD file at
src/python
and one in each of the sibling projects as well.
w
no: there is some neat magic there. the task will walk the dependencies of something exportable
if it finds something else exportable, it will declare a dependency on the exportable thing. otherwise, the first exportable module will own anything
so unless you want to further subdivide your graph of published packages, you only need one setup py per “root” thing you are publishing.
c
So that means my project must have a dependency on the sibling project that I’m not aware of yet, because it’s looking at that project, or am I misunderstanding something?
w
dependencies are required in Pants, yes… independent of setup_py or not, multiple targets must declare that they depend on one another
c
Great, thanks for all your help!
w
sure thing! if you’re just getting started on a python project, the new docsite will guide you through using the “v2” engine, which provides a nicer experience there: https://pants.readme.io/docs/
h
Hmm and that reminds me that I should update https://pants.readme.io/docs/python-setup-py-goal with more details about how ownership works in that arena
w
+1 … it’s pretty neat actually.
👍 1