添加cython编译配置

This commit is contained in:
zhiyang7 2021-12-22 10:31:35 +08:00
parent 8a6010381f
commit 515da982a1
2 changed files with 9 additions and 0 deletions

3
.gitignore vendored
View File

@ -6,3 +6,6 @@ douzero_checkpoints/
venv/ venv/
.idea/ .idea/
*.egg-info/ *.egg-info/
*.c
*.pyd
build/

View File

@ -1,4 +1,5 @@
import setuptools import setuptools
from Cython.Build import cythonize
VERSION = '1.1.0' VERSION = '1.1.0'
@ -21,6 +22,11 @@ setuptools.setup(
'torch', 'torch',
'rlcard' 'rlcard'
], ],
ext_modules = cythonize(
["douzero/dmc/*.py", "douzero/env/*.py", "douzero/evaluation/*.py", "douzero/radam/*.py"],
exclude="**/__init__.py",
language_level=3
),
requires_python='>=3.6', requires_python='>=3.6',
classifiers=[ classifiers=[
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",