def __init__(self, filename=None, sign=False, verify=False):
self.sign = sign<EOL>self.should_verify = verify<EOL>self.buildver = '<STR_LIT>'<EOL>self.pyver = [PYVER]<EOL>self.abi = ['<STR_LIT:none>']<EOL>self.arch = ['<STR_LIT>']<EOL>self.dirname = os.getcwd()<EOL>if filename is None:<EOL><INDENT>self.name = '<STR_LIT>'<EOL>self.version = '<STR_LIT>'<EOL>self._filename = self.filename<EOL><DEDENT>else:<EOL><INDENT>m = NAME_VERSION_RE.match(filename)<EOL>if m:<EOL><INDENT>info = m.groupdict('<STR_LIT>')<EOL>self.name = info['<STR_LIT>']<EOL>self.version = info['<STR_LIT>'].replace('<STR_LIT:_>', '<STR_LIT:->')<EOL>self.buildver = info['<STR_LIT>']<EOL>self._filename = self.filename<EOL><DEDENT>else:<EOL><INDENT>dirname, filename = os.path.split(filename)<EOL>m = FILENAME_RE.match(filename)<EOL>if not m:<EOL><INDENT>raise DistlibException('<STR_LIT>'<EOL>'<STR_LIT>' % filename)<EOL><DEDENT>if dirname:<EOL><INDENT>self.dirname = os.path.abspath(dirname)<EOL><DEDENT>self._filename = filename<EOL>info = m.groupdict('<STR_LIT>')<EOL>self.name = info['<STR_LIT>']<EOL>self.version = info['<STR_LIT>']<EOL>self.buildver = info['<STR_LIT>']<EOL>self.pyver = info['<STR_LIT>'].split('<STR_LIT:.>')<EOL>self.abi = info['<STR_LIT>'].split('<STR_LIT:.>')<EOL>self.arch = info['<STR_LIT>'].split('<STR_LIT:.>')<EOL><DEDENT><DEDENT>
Initialise an instance using a (valid) filename.