加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
setup.py 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
from setuptools import Extension, setup
from Cython.Build import cythonize
import ISS.setup as ISS_setup
import numpy as np
import os
setups = [ISS_setup]
setup_dirs = ['ISS']
extensions = []
include_dirs = ['ISS/algorithms/planning/dubins/include']
for setup_, setup_dir_ in zip(setups, setup_dirs):
setup_ext = setup_.extensions
for ext_ in setup_ext:
ext_.name = setup_dir_ + '.' + ext_.name
ext_.sources = [setup_dir_ + '/' + source for source in ext_.sources]
ext_.include_dirs = [setup_dir_ + '/' + include_dir for include_dir in ext_.include_dirs]
extensions.append(ext_)
for ext_ in extensions:
print(ext_.name, ext_.sources, ext_.include_dirs)
ext_.include_dirs.append(np.get_include())
ext_.include_dirs += include_dirs
if not ext_.language:
ext_.language = 'c++'
if os.name == 'nt':
ext_.extra_compile_args = ["/O2"]
elif os.name == 'posix':
ext_.extra_compile_args = ["-O3"]
compiler_directives = {"language_level": 3, "embedsignature": True}
setup(
name="ISS",
ext_modules=cythonize(extensions, compiler_directives=compiler_directives),
# extra_compile_args=["/O3"],
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化