Hi! I have a problem regarding entrypoints in pyth...
# general
a
Hi! I have a problem regarding entrypoints in python distributions. My folder structure looks like this:
Copy code
pants.toml
packages/
    projA/
        src/projA/
            __init__.py
            foo.py
            BUILD
        tests/
        pyproject.toml
        setup.py
        BUILD
The BUILD file in packages/projA has a python_distribution. I want to create an entrypoint projA.foo:bar, but I cannot tell the BUILD file from which folder to go. Do you have any idea how to fix this?
h
Possibly related, possibly not, but what are your source roots? I.e., what does
pants roots
show?
a
Hi! It shows
Copy code
.
packages/projA
packages/projA/src
packages/projA/tests
Let me know if this sounds weird to you
h
No that makes sense. So that tells me that your entry point of
projA.foo:bar
should work, as it is a correct
module:function
specification from the source root
packages/projA/src
a
Hmm ok. Do you maybe have another idea? Maybe I am the first one to try this case?
h
If you can create a toy repo that reproduces the layout and the problem, we can take a look at that. It’s hard to debug without the full picture.
a
Hi! Sorry for not coming back earlier to you. Here is a reproducer repository I created https://github.com/maxbartel/pants-entrypoint-toy/tree/main Thanks for your help here @happy-kitchen-89482!