build_fix_install_rpath.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:scm-workbench 作者: barry-scott 项目源码 文件源码
def getRPaths( self, filename ):
        all_rpaths = []
        res = subprocess.run( ['otool', '-l', filename], stdout=subprocess.PIPE, universal_newlines=True )
        state = self.ST_IDLE
        for line in res.stdout.split('\n'):
            words = line.strip().split()
            if state == self.ST_IDLE:
                if words == ['cmd','LC_RPATH']:
                    state = self.ST_RPATH

            elif state == self.ST_RPATH:
                if words[0:1] == ['path']:
                    path = words[1]
                    all_rpaths.append( path )
                    state = self.ST_IDLE

        return all_rpaths
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号