Return True if packager should ignore the given file. We do not want to preload/embed a file if it is hidden (Win32) or if it matches any pattern specified in --exclude
(fullname)
| 154 | |
| 155 | |
| 156 | def should_ignore(fullname): |
| 157 | """Return True if packager should ignore the given file. |
| 158 | |
| 159 | We do not want to preload/embed a file if it is hidden (Win32) or |
| 160 | if it matches any pattern specified in --exclude |
| 161 | """ |
| 162 | if has_hidden_attribute(fullname): |
| 163 | return True |
| 164 | ignored = False |
| 165 | for pattern in excluded_patterns: |
| 166 | if pattern.startswith("!"): |
| 167 | if fnmatch.fnmatch(fullname, pattern[1:]): |
| 168 | ignored = False |
| 169 | else: |
| 170 | if fnmatch.fnmatch(fullname, pattern): |
| 171 | ignored = True |
| 172 | return ignored |
| 173 | |
| 174 | |
| 175 | def add(mode, rootpathsrc, rootpathdst): |
no test coverage detected