maybe someone asked this already, but let me try: ...
# general
b
maybe someone asked this already, but let me try: how can python_sources() be recursive instead of adding one BUILD file in each subfolder?
βœ… 1
r
Copy code
python_sources(sources=["**/*.py"])
If you would like to ignore some other
.py
files then
Copy code
python_sources(sources=["**/*.py", "!ignore.py"])
πŸ™Œ 1
magic 1
πŸ‘ 1
w
If you're interested in some other answers about this subject. Search slack for "111"
b
Thanks! @average-father-89924 maybe this can help you
πŸ‘€ 1
c
notably, for this case, this would be more robust:
Copy code
python_sources(
    sources = [
        "**/" + default for default in
        python_sources.sources.default   
    ]
)
πŸ‘ 1
(if you’re able to use a recent enough version of pants..)