summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Trochalakis <yatiohi@ideopolis.gr>2008-11-01 14:22:34 +0200
committerMichael Trier <mtrier@gmail.com>2008-12-15 12:27:40 -0500
commit3942cdff6254d59100db2ff6a3c4460c1d6dbefe (patch)
tree7e02c9fda54c55b5ed729831ae3586b30dfbfb59
parentdc1fcf372878240e0a1af20641d361f14aea7252 (diff)
downloadgitpython-3942cdff6254d59100db2ff6a3c4460c1d6dbefe.tar.gz
Fixed packaging issue caused by ez_setup.py
ez_setup.py is not packaged with the rest of the code, this causes `easy_install gitpython` to fail with an ImportError. ez_setup is useful when setuptools are not present in the pythonpath. (cherry picked from commit e7c37c6e0b12d2b4f5001fb3ecfc250a682f6d57)
-rw-r--r--setup.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index db22b2ac..27107430 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,10 @@
-from ez_setup import use_setuptools
-use_setuptools()
-from setuptools import setup, find_packages
+try:
+ from setuptools import setup, find_packages
+except ImportError:
+ from ez_setup import use_setuptools
+ use_setuptools()
+ from setuptools import setup, find_packages
+
from distutils.command.build_py import build_py as _build_py
from setuptools.command.sdist import sdist as _sdist
import os