setup.py: Use setuptools when invoked with bdist_{egg,wheel}.
authorMarc Abramowitz <marc@marc-abramowitz.com>
Tue, 22 Oct 2013 18:07:51 +0000 (11:07 -0700)
committerMarc Abramowitz <marc@marc-abramowitz.com>
Tue, 22 Oct 2013 18:07:51 +0000 (11:07 -0700)
This makes it easier to build eggs and wheels of 0.19.x releases; the
master branch already uses setuptools.

setup.py

index d44d16b..727ebb6 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,10 @@
-from distutils.core import setup, Extension
+import sys
+if 'bdist_egg' in sys.argv or 'bdist_wheel' in sys.argv:
+    from setuptools import setup, Extension
+else:
+    from distutils.core import setup, Extension
 from distutils.sysconfig import get_python_lib
 import os, os.path
-import sys
 
 try:
     import platform