- 
                Notifications
    
You must be signed in to change notification settings  - Fork 376
 
Description
Context
One of the more useful tools in glob is being able to use the ** operator to match patterns at any point in the tree; however, that requires the recursive flag to be turned on in the glob.glob function: https://docs.python.org/3.9/library/glob.html#glob.glob
It appears that that has not been used:
Line 638 in f2f03ba
| for path in glob.glob(os.path.join(temp_project_path, glob_path)): | 
and
Line 770 in f2f03ba
| for path in glob.glob(os.path.join(temp_project_path, glob_path)): | 
However, the ** operator is used in the example in the docs:
https://github.com/zappa/Zappa/blame/f2f03ba8b58c9e2bdbbff7b5e8c905e3a8c08021/README.md#L951
Expected Behavior
An exclude_glob entry with a **, e.g. "**/__pycache__" should recurse through the directory tree to identify and eliminate matching paths
Actual Behavior
** operators are ignored by glob
Possible Fix
Add the recursive=True argument to each of the places where exclude_glob paths are used
Steps to Reproduce
- Identify a directory common to multiple paths in the project
 - Add a matching glob path to 
exclude_glob - Run 
zappa package - Observe that the paths have not been removed from the packaged project