Expand file patterns to a list of `package_data` paths. Parameters ----------- root: str The relative path to the package root from `HERE`. file_patterns: list or str, optional A list of glob patterns for the data file locations. The globs can be recursive if
(root, file_patterns=None)
| 598 | |
| 599 | |
| 600 | def _get_package_data(root, file_patterns=None): |
| 601 | """Expand file patterns to a list of `package_data` paths. |
| 602 | |
| 603 | Parameters |
| 604 | ----------- |
| 605 | root: str |
| 606 | The relative path to the package root from `HERE`. |
| 607 | file_patterns: list or str, optional |
| 608 | A list of glob patterns for the data file locations. |
| 609 | The globs can be recursive if they include a `**`. |
| 610 | They should be relative paths from the root or |
| 611 | absolute paths. If not given, all files will be used. |
| 612 | |
| 613 | Note: |
| 614 | Files in `node_modules` are ignored. |
| 615 | """ |
| 616 | if file_patterns is None: |
| 617 | file_patterns = ['*'] |
| 618 | return _get_files(file_patterns, _glob_pjoin(HERE, root)) |
| 619 | |
| 620 | |
| 621 | def _compile_pattern(pat, ignore_case=True): |
no test coverage detected