I'm new to pants and uses pantsbuild python tutorials to learn about pants
The tutorial says:
The rule of thumb is that each directory of .py files has a BUILD file with a python_library target
I cannot understand why do I need BUILD file for each directory? Suppose that I have library with many directories and sub directories in it, why can't I have one BUILD file on the libraries main directory which sources
all of the relevant files of the library?
Comparing pants to setup.py of pip - I can create only one setup.py on the main folder and source
all of the files. Why is the concept of pants is different?
Also I have seen example of pants python project - each folder in it has BUILD file, and any BUILD file (that isn't the main BUILD file) declaring its own library containing the files of the same level its BUILD file. This lead to weird libraries names - it looks little bit "hacky"
Is there any other wrapping tool for PEX other that pants?