diff setup.py @ 22198:77142de48ae4

cleanup: make sure we always access members of imported modules This will make sure we get import errors, even if demandimport is enabled. This will also mute some pyflakes 'imported but unused' warnings.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 15 Aug 2014 04:37:45 +0200
parents 0c88185c7d6c
children 198e2da3ee20
line wrap: on
line diff
--- a/setup.py	Fri Aug 15 20:28:51 2014 +0900
+++ b/setup.py	Fri Aug 15 04:37:45 2014 +0200
@@ -33,12 +33,14 @@
 except ImportError:
     try:
         import sha
+        sha.sha # silence unused import warning
     except ImportError:
         raise SystemExit(
             "Couldn't import standard hashlib (incomplete Python install).")
 
 try:
     import zlib
+    zlib.compressobj # silence unused import warning
 except ImportError:
     raise SystemExit(
         "Couldn't import standard zlib (incomplete Python install).")
@@ -56,6 +58,7 @@
 else:
     try:
         import bz2
+        bz2.BZ2Compressor # silence unused import warning
     except ImportError:
         raise SystemExit(
             "Couldn't import standard bz2 (incomplete Python install).")
@@ -129,6 +132,7 @@
 # py2exe needs to be installed to work
 try:
     import py2exe
+    py2exe.Distribution # silence unused import warning
     py2exeloaded = True
     # import py2exe's patched Distribution class
     from distutils.core import Distribution