(self)
Ensures that all required elements of meta-data are supplied.

        Required fields:
            name, version, URL

        Recommended fields:
            (author and author_email) or (maintainer and maintainer_email)

        Warns if any are missing.
Ensures that all required elements of meta-data are supplied.
Ensures that all required elements of meta - data are supplied .
def check_metadata(self):
        """Ensures that all required elements of meta-data are supplied.

        Required fields:
            name, version, URL

        Recommended fields:
            (author and author_email) or (maintainer and maintainer_email)

        Warns if any are missing.
        """
        metadata = self.distribution.metadata

        missing = []
        for attr in ('name', 'version', 'url'):
            if not (hasattr(metadata, attr) and getattr(metadata, attr)):
                missing.append(attr)

        if missing:
            self.warn("missing required meta-data: %s"  % ', '.join(missing))
        if metadata.author:
            if not metadata.author_email:
                self.warn("missing meta-data: if 'author' supplied, " +
                          "'author_email' should be supplied too")
        elif metadata.maintainer:
            if not metadata.maintainer_email:
                self.warn("missing meta-data: if 'maintainer' supplied, " +
                          "'maintainer_email' should be supplied too")
        else:
            self.warn("missing meta-data: either (author and author_email) " +
                      "or (maintainer and maintainer_email) " +
                      "should be supplied")
def check_metadata ( self ) : metadata = self . distribution . metadata missing = [ ] for attr in ( 'name' , 'version' , 'url' ) : if not ( hasattr ( metadata , attr ) and getattr ( metadata , attr ) ) : missing . append ( attr ) if missing : self . warn ( "missing required meta-data: %s" % ', ' . join ( missing ) ) if metadata . author : if not metadata . author_email : self . warn ( "missing meta-data: if 'author' supplied, " + "'author_email' should be supplied too" ) elif metadata . maintainer : if not metadata . maintainer_email : self . warn ( "missing meta-data: if 'maintainer' supplied, " + "'maintainer_email' should be supplied too" ) else : self . warn ( "missing meta-data: either (author and author_email) " + "or (maintainer and maintainer_email) " + "should be supplied" )