Skip to content

Commit

Permalink
py3: Avoid compiling renpy.compat.dictviews.
Browse files Browse the repository at this point in the history
This module won't work on 3.11, but won't be imported there
anyway, so there is no reason to import it.
  • Loading branch information
renpytom committed Oct 31, 2022
1 parent b4a76f1 commit 72815a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/setup.py
Expand Up @@ -56,7 +56,7 @@ def setup_env(name):
setup_env("CXX")

import setuplib
from setuplib import android, ios, emscripten, raspi, include, library, cython, cmodule, copyfile, find_unnecessary_gen, generate_all_cython
from setuplib import android, ios, emscripten, raspi, include, library, cython, cmodule, copyfile, find_unnecessary_gen, generate_all_cython, PY2

# These control the level of optimization versus debugging.
setuplib.extra_compile_args = [ "-Wno-unused-function" ]
Expand Down Expand Up @@ -173,7 +173,8 @@ def setup_env(name):
cython("renpy.style")

# renpy.compat
cython("renpy.compat.dictviews")
if PY2:
cython("renpy.compat.dictviews")

# renpy.styledata
cython("renpy.styledata.styleclass")
Expand Down
3 changes: 3 additions & 0 deletions module/setuplib.py
Expand Up @@ -53,6 +53,9 @@

if sys.version_info.major > 2:
gen += "3"
PY2 = False
else:
PY2 = True

if coverage:
gen += "-coverage"
Expand Down

0 comments on commit 72815a4

Please sign in to comment.