From e0c8a312400a7a3071cc165ddd0577335b9a070c Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 9 Apr 2010 07:13:22 +0200 Subject: [PATCH] tiny cleanup in setup.py --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index bdc54033..9f752d4f 100644 --- a/setup.py +++ b/setup.py @@ -167,12 +167,13 @@ def compile_cython_modules(profile=False): print("ERROR: %s" % sys.exc_info()[1]) print("Extension module compilation failed, using plain Python implementation") +cython_profile = '--cython-profile' in sys.argv +if cython_profile: + sys.argv.remove('--cython-profile') + try: sys.argv.remove("--no-cython-compile") except ValueError: - cython_profile = '--cython-profile' in sys.argv - if cython_profile: - sys.argv.remove('--cython-profile') compile_cython_modules(cython_profile) setup_args.update(setuptools_extra_args) -- 2.26.2