'Initialise an instance using a (valid) filename.'

def __init__(self, filename=None, sign=False, verify=False):

    self.sign = sign
    self.should_verify = verify
    self.buildver = u''
    self.pyver = [PYVER]
    self.abi = [u'none']
    self.arch = [u'any']
    self.dirname = os.getcwd()
    if (filename is None):
        self.name = u'dummy'
        self.version = u'0.1'
        self._filename = self.filename
    else:
        m = NAME_VERSION_RE.match(filename)
        if m:
            info = m.groupdict(u'')
            self.name = info[u'nm']
            self.version = info[u'vn'].replace(u'_', u'-')
            self.buildver = info[u'bn']
            self._filename = self.filename
        else:
            (dirname, filename) = os.path.split(filename)
            m = FILENAME_RE.match(filename)
            if (not m):
                raise DistlibException((u'Invalid    name    or    filename:    %r' % filename))
            if dirname:
                self.dirname = os.path.abspath(dirname)
            self._filename = filename
            info = m.groupdict(u'')
            self.name = info[u'nm']
            self.version = info[u'vn']
            self.buildver = info[u'bn']
            self.pyver = info[u'py'].split(u'.')
            self.abi = info[u'bi'].split(u'.')
            self.arch = info[u'ar'].split(u'.')
