ambitious-student-81104
09/24/2021, 9:20 PMsources=["*.py"]
in my python_library
target in order for my pex_binary
in the same BUILD to run successfully, or else it would ImportError: No module named path.to.entry_point
; but in some other cases I don't need that source=["*.py"]
for things to work. What's the magic here?witty-crayon-22786
09/24/2021, 9:22 PM./pants help python_library
sources
type: Iterable[str] | None
default: ('*.py', '*.pyi', '!test_*.py', '!*_test.py', '!tests.py', '!conftest.py', '!test_*.pyi', '!*_test.pyi', '!tests.pyi')
A list of files and globs that belong to this target.
Paths are relative to the BUILD file's directory. You can ignore files/globs by prefixing them with `!`.
Example: `sources=['example.py', 'test_*.py', '!test_ignore.py']`.
happy-kitchen-89482
09/24/2021, 9:23 PMtest_*.py
or *_test.py
?witty-crayon-22786
09/24/2021, 9:23 PMpython_library
, it avoids grabbing what look like test filesambitious-student-81104
09/24/2021, 9:24 PMtest_
witty-crayon-22786
09/24/2021, 9:25 PM