In “setup.py” files, it sometimes seems that file-patterns work best when prepended with “**/”, and sometimes seem fine without it. Is there any information on which circumstances call for “**/”, and which don’t?
**/
means “under any directory or subdirectory”. It means it will pick up files named like that anywhere in the directory hierarchy.
/
refers to the root of the filesystem.
Hmm… So do I understand correctly then that “/" should be used in any case in which I want the pattern to match within any part of my game’s directory hierarchy, but that if I want to specify files within a specific directory–and it’s sub-directories?–then "/” is not required?
For example, suppose that I had the following:
"include_patterns" : [
"**/*.png",
"Sounds/*"
],
It should then include png-files from any directory, and all files within the “Sounds” directory, or any sub-directories that “Sounds” might have–correct?
Furthermore, if I were to instead specify the following:
"include_patterns" : [
"*.png",
"Sounds/*"
],
(That is, the same, but without “**/” in the first entry.) Would I then be correct in understanding that it would only match png-files within the main project-directory, but not in sub-directories?
I think this is right, yeah.
Indeed.
Ah, great–thank you for the confirmation!