From c2cdc66eca3da56d2c090a69bd232e52d74839d7 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 8 Jul 2011 22:58:22 +0200 Subject: [PATCH] only invoke distribute's use_setuptools when there is no setuptools installed --- setup.py | 10 +++++++--- tox.ini | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 2285aff33..5ea5973ad 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,12 @@ import os, sys -if sys.version_info >= (3,0): +try: + from setuptools import setup +except ImportError: + if sys.version_info < (3,0): + raise from distribute_setup import use_setuptools use_setuptools() -from setuptools import setup + from setuptools import setup long_description = """ cross-project testing tool for Python. @@ -68,4 +72,4 @@ def make_entry_points(): return {'console_scripts': l} if __name__ == '__main__': - main() \ No newline at end of file + main() diff --git a/tox.ini b/tox.ini index 5764e3fb4..cc3576d5b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ envlist=py26,py27,py31,py32,py27-xdist,py25,py24 indexserver= pypi = http://pypi.python.org/simple testrun = http://pypi.testrun.org - default = http://pypi.testrun.org + default = http://pypi.python.org/simple [testenv] changedir=testing