瀏覽代碼

Try setuptools first, then fallback to distutils.core

David Coppa 12 年之前
父節點
當前提交
a32b573ccb
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      setup.py

+ 5 - 1
setup.py

@@ -2,10 +2,14 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 
 
 from __future__ import print_function
 from __future__ import print_function
-from distutils.core import setup
 import pkg_resources
 import pkg_resources
 import sys
 import sys
 
 
+try:
+    from setuptools import setup
+except ImportError:
+    from distutils.core import setup
+
 try:
 try:
     import py2exe
     import py2exe
     """This will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package"""
     """This will create an exe that needs Microsoft Visual C++ 2008 Redistributable Package"""