def METHOD_NAME(self):
    """Ensures that all required elements of meta-data are supplied.
    Required fields:
        name, version
    Warns if any are missing.
    """
    metadata = self.distribution.metadata
    missing = []
    for attr in 'name', 'version':
        if not getattr(metadata, attr, None):
            missing.append(attr)
    if missing:
        self.warn("missing required meta-data: %s" % ', '.join(missing))