diff --git a/setup.py b/setup.py index c0d63b3c..2e1a164c 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ MACHINE = platform.machine() -CFLAGS = ['-O2'] +MODULES_CFLAGS = [os.getenv('UVLOOP_OPT_CFLAGS', '-O2')] _ROOT = pathlib.Path(__file__).parent LIBUV_DIR = str(_ROOT / 'vendor' / 'libuv') LIBUV_BUILD_DIR = str(_ROOT / 'build' / 'libuv-{}'.format(MACHINE)) @@ -301,7 +301,7 @@ def build_extensions(self): sources=[ "uvloop/loop.pyx", ], - extra_compile_args=CFLAGS + extra_compile_args=MODULES_CFLAGS ), ], classifiers=[