def _output_from_file(self, entry='git_describe'):
        """
        Read the version from a .version file that may exist alongside __init__.py.

        This file can be generated by piping the following output to file:

        git describe --long --match v*.*
        """
        try:
            vfile = os.path.join(os.path.dirname(self.fpath), '.version')
            with open(vfile, 'r') as f:
                return json.loads(f.read()).get(entry, None)
        except: # File may be missing if using pip + git archive
            return None
def _output_from_file ( self , entry = 'git_describe' ) : try : vfile = os . path . join ( os . path . dirname ( self . fpath ) , '.version' ) with open ( vfile , 'r' ) as f : return json . loads ( f . read ( ) ) . get ( entry , None ) except : return None
Read the version from a .version file that may exist alongside __init__.py.

        This file can be generated by piping the following output to file:

        git describe --long --match v*.*