require py2exe only if building executable with "python setup.py py2exe".

nanotube [2008-08-13 03:51]
require py2exe only if building executable with "python setup.py py2exe".
Filename
setup.py
diff --git a/setup.py b/setup.py
index dd03509..149d113 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,11 @@


 from distutils.core import setup
-import py2exe
+import sys
+
+if sys.argv[1] == 'py2exe':
+    import py2exe
+
 import version

 setup(
ViewGit