def record_commit_info(pkg_dir, build_cmd=build_py):
    class MyBuildPy(build_cmd):
        ''' Subclass to write commit data into installation tree '''
        def run(self):
            build_py.run(self)
            import subprocess
            proc = subprocess.Popen('git rev-parse --short HEAD',
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE,
                                    shell=True)
            repo_commit, _ = proc.communicate()
            # We write the installation commit even if it's empty
            cfg_parser = ConfigParser()
            cfg_parser.read(pjoin(pkg_dir, '.git_commit_info.ini'))
            cfg_parser.set('commit hash', 'install_hash',
                                                    repo_commit.decode('ascii'))
            out_pth = pjoin(self.build_lib, pkg_dir, '.git_commit_info.ini')
            out_file = open(out_pth, 'wt')
            cfg_parser.write(out_file)
            out_file.close()
    return MyBuildPy
Creates a new file system object.
dataset/ETHPy150Open ipython/ipython-py3k/setupbase.py/record_commit_info--crossover with--dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/resolver/sqlite_blob_resolver_helper.py/SQLiteBlobResolverHelper.NewFileSystem