From 515da982a12f472037f48299808a7b139e6aaa9a Mon Sep 17 00:00:00 2001 From: zhiyang7 Date: Wed, 22 Dec 2021 10:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0cython=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ setup.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index d16c110..39070f9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ douzero_checkpoints/ venv/ .idea/ *.egg-info/ +*.c +*.pyd +build/ diff --git a/setup.py b/setup.py index 554c30c..e0a5fa1 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import setuptools +from Cython.Build import cythonize VERSION = '1.1.0' @@ -21,6 +22,11 @@ setuptools.setup( 'torch', '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', classifiers=[ "Programming Language :: Python :: 3.9",