From e45035cde3f38062e5ce9f81d8ee43cced8ffb6f Mon Sep 17 00:00:00 2001 From: Alex Turner Date: Fri, 4 Oct 2024 23:15:19 -0700 Subject: [PATCH] Fix up build --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index e4f75e5..a6d3a4b 100644 --- a/setup.py +++ b/setup.py @@ -20,16 +20,16 @@ def check_venv(): ) -def patch_out_asycio(): +def patch_out(): # On windows mock gets imported from _msvccompiler which then tries to import asyncio # which causes a name conflict on concurrent. This prevents that. - if sys.platform.startswith('win'): - asyncio_stub = type(sys)('asyncio') - sys.modules['asyncio'] = asyncio_stub + if sys.platform.startswith("win"): + sys.modules["unittest"] = type(sys)("unittest") + sys.modules["unittest.mock"] = type(sys)("mock") def check_compiler(): - patch_out_asycio() + patch_out() import distutils.ccompiler as cc plat = os.name compiler = cc.get_default_compiler(plat)