From 420493f6338b6511cddb6b6bcafcdb33415afe4b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 2 Sep 2013 14:12:15 -0400 Subject: More simply resolve _dont_write_bytecode. --- setuptools/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'setuptools/__init__.py') diff --git a/setuptools/__init__.py b/setuptools/__init__.py index 48bc1a4b..fc9b7b93 100644 --- a/setuptools/__init__.py +++ b/setuptools/__init__.py @@ -94,10 +94,5 @@ def findall(dir = os.curdir): distutils.filelist.findall = findall # fix findall bug in distutils. # sys.dont_write_bytecode was introduced in Python 2.6. -_dont_write_bytecode = ( - (hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) - or ( - not hasattr(sys, "dont_write_bytecode") - and os.environ.get("PYTHONDONTWRITEBYTECODE") - ) -) +_dont_write_bytecode = getattr(sys, 'dont_write_bytecode', + bool(os.environ.get("PYTHONDONTWRITEBYTECODE"))) -- cgit v1.2.1