1 Star 0 Fork 0

bisheng/apriltag

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
python_build_flags.py 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
ubuntu16 提交于 2024-02-22 19:35 . first commit
from __future__ import print_function
import sysconfig
import re
import numpy as np
conf = sysconfig.get_config_vars()
print('CFLAGS', end=';')
c_flags = []
# Grab compiler flags minus the compiler itself.
c_flags.extend(conf.get('CC', '').split()[2:])
c_flags.extend(conf.get('CFLAGS', '').split())
c_flags.extend(conf.get('CCSHARED', '').split())
c_flags.append('-I{}'.format(conf.get('INCLUDEPY', '')))
c_flags.append('-I{}'.format(np.get_include()))
c_flags.append('-Wno-strict-prototypes')
c_flags = [x for x in c_flags if not x.startswith('-O')]
print(' '.join(c_flags), end=';')
print('LINKER', end=';')
print(conf.get('BLDSHARED', '').split()[0], end=';')
print('LDFLAGS', end=';')
print(' '.join(conf.get('BLDSHARED', '').split()[1:]) + ' ' + conf.get('BLDLIBRARY', '') + ' ' + conf.get('LDFLAGS', ''), end=';')
print('EXT_SUFFIX', end=';')
ext_suffix = '.so'
if 'EXT_SUFFIX' in conf:
ext_suffix = conf['EXT_SUFFIX']
elif 'MULTIARCH' in conf:
ext_suffix = '.' + conf['MULTIARCH'] + '.so'
print(ext_suffix, end=';')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bishengsjtu/apriltag.git
git@gitee.com:bishengsjtu/apriltag.git
bishengsjtu
apriltag
apriltag
master

搜索帮助