mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Fix compiler detection on Windows (#2136)
Signed-off-by: Toby Harradine <t.harradine@student.unsw.edu.au>
This commit is contained in:
parent
61652a0306
commit
17139ce439
5
setup.py
5
setup.py
@ -42,9 +42,8 @@ def check_compiler_available():
|
|||||||
m = ccompiler.new_compiler()
|
m = ccompiler.new_compiler()
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as tdir:
|
with tempfile.TemporaryDirectory() as tdir:
|
||||||
with tempfile.NamedTemporaryFile(prefix="dummy", suffix=".c", dir=tdir) as tfile:
|
with open(os.path.join(tdir, "dummy.c"), "w") as tfile:
|
||||||
tfile.write(b"int main(int argc, char** argv) {return 0;}")
|
tfile.write("int main(int argc, char** argv) {return 0;}")
|
||||||
tfile.seek(0)
|
|
||||||
try:
|
try:
|
||||||
m.compile([tfile.name], output_dir=tdir)
|
m.compile([tfile.name], output_dir=tdir)
|
||||||
except (CCompilerError, DistutilsPlatformError):
|
except (CCompilerError, DistutilsPlatformError):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user