Return a list of Package objects if any package_data were recognized for this `location`, or None if there were no Packages found. Raises Exceptions on errors. Include ``application`` packages (such as pypi) and/or ``system`` packages. Default to use application packages
(
location,
application=True,
system=False,
compiled=False,
package_only=False,
)
| 43 | |
| 44 | |
| 45 | def recognize_package_data( |
| 46 | location, |
| 47 | application=True, |
| 48 | system=False, |
| 49 | compiled=False, |
| 50 | package_only=False, |
| 51 | ): |
| 52 | """ |
| 53 | Return a list of Package objects if any package_data were recognized for |
| 54 | this `location`, or None if there were no Packages found. Raises Exceptions |
| 55 | on errors. |
| 56 | Include ``application`` packages (such as pypi) and/or ``system`` packages. |
| 57 | Default to use application packages |
| 58 | """ |
| 59 | if not filetype.is_file(location): |
| 60 | return [] |
| 61 | |
| 62 | return list(_parse( |
| 63 | location=location, |
| 64 | application=application, |
| 65 | system=system, |
| 66 | compiled=compiled, |
| 67 | package_only=package_only, |
| 68 | )) |
| 69 | |
| 70 | |
| 71 | def _parse( |