From d8fff462863104a8b883612f80f91e8e20699f40 Mon Sep 17 00:00:00 2001 From: Adam Holmberg Date: Wed, 2 Dec 2015 15:56:14 -0600 Subject: [PATCH] short-circuit setup_requires for egg_info in pip context PYTHON-448 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 4fcbe350..2ece7e6d 100644 --- a/setup.py +++ b/setup.py @@ -189,6 +189,7 @@ try_extensions = "--no-extensions" not in sys.argv and is_supported_platform and try_murmur3 = try_extensions and "--no-murmur3" not in sys.argv try_libev = try_extensions and "--no-libev" not in sys.argv and not is_pypy and not is_windows try_cython = try_extensions and "--no-cython" not in sys.argv and not is_pypy and not os.environ.get('CASS_DRIVER_NO_CYTHON') +try_cython &= 'egg_info' not in sys.argv # bypass setup_requires for pip egg_info calls, which will never have --install-option"--no-cython" coming fomr pip sys.argv = [a for a in sys.argv if a not in ("--no-murmur3", "--no-libev", "--no-cython", "--no-extensions")]