Kaydet (Commit) 535f2d9a authored tarafından Greg Ward's avatar Greg Ward

Fix 'check_metadata()' so it grovels through the distribution's metadata

object, rather than through the distribution itself (since I moved the meta-
data out to a DistributionMetadata instance).
üst 87da1ea1
...@@ -107,23 +107,23 @@ class sdist (Command): ...@@ -107,23 +107,23 @@ class sdist (Command):
def check_metadata (self): def check_metadata (self):
dist = self.distribution metadata = self.distribution.metadata
missing = [] missing = []
for attr in ('name', 'version', 'url'): for attr in ('name', 'version', 'url'):
if not (hasattr (dist, attr) and getattr (dist, attr)): if not (hasattr (metadata, attr) and getattr (metadata, attr)):
missing.append (attr) missing.append (attr)
if missing: if missing:
self.warn ("missing required meta-data: " + self.warn ("missing required meta-data: " +
string.join (missing, ", ")) string.join (missing, ", "))
if dist.author: if metadata.author:
if not dist.author_email: if not metadata.author_email:
self.warn ("missing meta-data: if 'author' supplied, " + self.warn ("missing meta-data: if 'author' supplied, " +
"'author_email' must be supplied too") "'author_email' must be supplied too")
elif dist.maintainer: elif metadata.maintainer:
if not dist.maintainer_email: if not metadata.maintainer_email:
self.warn ("missing meta-data: if 'maintainer' supplied, " + self.warn ("missing meta-data: if 'maintainer' supplied, " +
"'maintainer_email' must be supplied too") "'maintainer_email' must be supplied too")
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment