only invoke distribute's use_setuptools when there is no setuptools installed

This commit is contained in:
holger krekel 2011-07-08 22:58:22 +02:00
parent bc66cd85b1
commit c2cdc66eca
2 changed files with 8 additions and 4 deletions

View File

@ -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()
main()

View File

@ -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