Created
June 26, 2024 14:31
-
-
Save jaraco/3cc2daf3dfbafa61ee8481d04c24b44e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/twine/package.py b/twine/package.py | |
index 99a826a..5e0d87e 100644 | |
--- a/twine/package.py | |
+++ b/twine/package.py | |
@@ -134,22 +134,11 @@ class PackageFile: | |
"Make sure the distribution is using a supported Metadata-Version: " | |
f"{', '.join(supported_metadata)}." | |
) | |
- # If pkginfo <1.11 encounters a metadata version it doesn't support, it may give | |
- # back empty metadata. At the very least, we should have a name and version, | |
- # which could also be empty if, for example, a MANIFEST.in doesn't include | |
- # setup.cfg. | |
missing_fields = [ | |
f.capitalize() for f in ["name", "version"] if not getattr(meta, f) | |
] | |
if missing_fields: | |
msg = f"Metadata is missing required fields: {', '.join(missing_fields)}." | |
- if cls._pkginfo_before_1_11(): | |
- msg += ( | |
- "\n" | |
- "Make sure the distribution includes the files where those fields " | |
- "are specified, and is using a supported Metadata-Version: " | |
- f"{', '.join(supported_metadata)}." | |
- ) | |
raise exceptions.InvalidDistribution(msg) | |
py_version: Optional[str] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment