Ai
7 Star 33 Fork 8

HXSecurity/DongTai

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.py 757 Bytes
一键复制 编辑 原始数据 按行查看 历史
st1020 提交于 2023-07-28 10:55 +08:00 . chore: change Cython build file
import glob
import multiprocessing
import os
import sys
from distutils.core import setup
from tempfile import gettempdir
from Cython.Build import cythonize
CPU_COUNT = multiprocessing.cpu_count()
if "-j" not in sys.argv:
sys.argv.append("-j")
sys.argv.append(str(CPU_COUNT))
dir_set = set(glob.glob("**/*.py", recursive=True))
migrations_dir_set = set(glob.glob("**/migrations/**/*.py", recursive=True))
dir_set -= migrations_dir_set
dir_set.remove("manage.py")
dir_set.remove("setup.py")
setup(
ext_modules=cythonize(
dir_set,
compiler_directives={"language_level": 3, "annotation_typing": False},
exclude_failures=True,
cache=os.path.join(gettempdir(), "cythoncache"),
nthreads=CPU_COUNT,
)
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/HXSecurity/DongTai.git
git@gitee.com:HXSecurity/DongTai.git
HXSecurity
DongTai
DongTai
develop

搜索帮助