From e3ffe9126fdead2c47a7a81346534e94219d9e90 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 5 Jul 2019 14:49:25 +0800 Subject: [PATCH] [Mod] make setup.py more simple --- setup.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 91044e60..ab20f5fb 100644 --- a/setup.py +++ b/setup.py @@ -121,15 +121,8 @@ else: ext_modules = [vnctptd, vnctpmd] -def get_env(key: str, default=None): - try: - return os.environ[key] - except KeyError: - return default - - def check_extension_build_flag(key: str, module: Extension): - value = get_env(key, None) + value = os.environ.get(key, None) if value is not None: global ext_modules if value == '1':