Skip to content

Commit f2d1c5d

Browse files
committed
Environment variable to set compiler option
1 parent 3dca5f1 commit f2d1c5d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎setup.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ def run(self):
146146
"package_data": {"pyunity": [file[4:] for file in dataFiles]},
147147
"zip_safe": False
148148
}
149+
if os.getenv("PYUNITY_COMPILER", "") == "mingw":
150+
config["command_options"]["build_ext"]["compiler"] = ("setup.py", "mingw32")
151+
config["command_options"]["build_ext"]["define"] = ("setup.py", "MS_WIN64")
149152
else:
150153
dataFiles = [a for a in glob.glob("pyunity/**/*.*", recursive=True) if ".py" not in a]
151154
config = {

0 commit comments

Comments
 (0)