File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from setuptools import Extension , setup
66
77# No ZIP support for windows, building with zlib is a pain
8- ZIP_SUPPORT = platform .system () != "Windows"
8+ WINDOWS = platform .system () == "Windows"
9+ ZIP_SUPPORT = not WINDOWS
910
1011
1112def get_extensions () -> list [Extension ]:
@@ -37,6 +38,11 @@ def get_extensions() -> list[Extension]:
3738 "gambatte-core/libgambatte/include" ,
3839 ]
3940
41+ extra_compile_args = ["-DHAVE_STDINT_H" , "-DREVISION=0" ]
42+ if WINDOWS :
43+ # This relaxes MSVC's strictness to match GCC/Clang behavior
44+ extra_compile_args .append ("/permissive" )
45+
4046 gambatte_extension = Extension (
4147 "gambaterm.libgambatte" ,
4248 language = "c++" ,
@@ -45,7 +51,7 @@ def get_extensions() -> list[Extension]:
4551 "libgambatte_ext" ,
4652 numpy .get_include (),
4753 ],
48- extra_compile_args = [ "-DHAVE_STDINT_H" , "-DREVISION=0" ] ,
54+ extra_compile_args = extra_compile_args ,
4955 libraries = libraries ,
5056 sources = [
5157 * libgambatte_sources ,
You can’t perform that action at this time.
0 commit comments