diff --git a/setup.py b/setup.py index 01e372e91..f78781918 100755 --- a/setup.py +++ b/setup.py @@ -193,7 +193,7 @@ def setup_package(): root = os.path.abspath(os.path.dirname(__file__)) - if len(sys.argv) > 1 and sys.argv[1] == "clean": + if hasattr(sys, "argv") and len(sys.argv) > 1 and sys.argv[1] == "clean": return clean(root) with chdir(root):