Return a mapping of ABOUT data from this distribution fields.
(self)
| 644 | return self.license_expression and self.copyright and self.path_or_url |
| 645 | |
| 646 | def to_about(self): |
| 647 | """ |
| 648 | Return a mapping of ABOUT data from this distribution fields. |
| 649 | """ |
| 650 | about_data = dict( |
| 651 | about_resource=self.filename, |
| 652 | checksum_md5=self.md5, |
| 653 | checksum_sha1=self.sha1, |
| 654 | copyright=self.copyright, |
| 655 | description=self.description, |
| 656 | download_url=self.download_url, |
| 657 | homepage_url=self.homepage_url, |
| 658 | license_expression=self.license_expression, |
| 659 | name=self.name, |
| 660 | namespace=self.namespace, |
| 661 | notes=self.notes, |
| 662 | notice_file=self.notice_filename if self.notice_text else "", |
| 663 | package_url=self.package_url, |
| 664 | primary_language=self.primary_language, |
| 665 | qualifiers=self.qualifiers, |
| 666 | size=self.size, |
| 667 | subpath=self.subpath, |
| 668 | type=self.type, |
| 669 | version=self.version, |
| 670 | ) |
| 671 | |
| 672 | about_data.update(self.extra_data) |
| 673 | about_data = {k: v for k, v in sorted(about_data.items()) if v} |
| 674 | return about_data |
| 675 | |
| 676 | def to_dict(self): |
| 677 | """ |
no test coverage detected