(cls, location, package_only=False)
| 1381 | |
| 1382 | @classmethod |
| 1383 | def parse(cls, location, package_only=False): |
| 1384 | with zipfile.ZipFile(location) as zf: |
| 1385 | for path in ZipPath(zf).iterdir(): |
| 1386 | if not path.name.endswith(META_DIR_SUFFIXES): |
| 1387 | continue |
| 1388 | |
| 1389 | for metapath in path.iterdir(): |
| 1390 | if not metapath.name.endswith('PKG-INFO'): |
| 1391 | continue |
| 1392 | |
| 1393 | yield parse_metadata( |
| 1394 | location=metapath, |
| 1395 | datasource_id=cls.datasource_id, |
| 1396 | package_type=cls.default_package_type, |
| 1397 | package_only=package_only, |
| 1398 | ) |
| 1399 | |
| 1400 | # FIXME: this is NOT used |
| 1401 | class PypiSdistArchiveHandler(models.DatafileHandler): |
nothing calls this directly
no test coverage detected