Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fcaa2fb

Browse files
committed
fixed 'python setup.py foo' if setuptools installed
svn path=/trunk/matplotlib/; revision=1919
1 parent 0cdec6c commit fcaa2fb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@
5858
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
5959

6060
try:
61-
from setuptools.command import bdist_egg
62-
#from setuptools import setup # use setuptools if possible
61+
# check if we have a reasonably recent copy of setuptools
62+
from setuptools.command import bdist_egg
6363
has_setuptools = True
6464
except ImportError:
6565
from distutils.core import setup
6666
has_setuptools = False
67+
68+
if has_setuptools:
69+
from setuptools import setup
6770

6871
import sys,os
6972
import glob

0 commit comments

Comments
 (0)