[Mod] make setup.py more simple

This commit is contained in:
nanoric 2019-07-05 14:49:25 +08:00
parent 9b503435bf
commit e3ffe9126f

View File

@ -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':