diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 50 |
1 files changed, 21 insertions, 29 deletions
@@ -21,7 +21,8 @@ Environment :: Console Intended Audience :: Developers License :: OSI Approved :: BSD License Operating System :: OS Independent -Programming Language :: Python +Programming Language :: Python :: 2 +Programming Language :: Python :: 3 Topic :: Software Development :: Quality Assurance Topic :: Software Development :: Testing """ @@ -29,34 +30,18 @@ Topic :: Software Development :: Testing # Pull in the tools we need. import sys -if sys.hexversion < 0x03000000: - # In Py 2.x, use setuptools. - from ez_setup import use_setuptools - use_setuptools() - - from setuptools import setup - from distutils.core import Extension - - more_setup_args = dict( - entry_points = { - 'console_scripts': [ - 'coverage = coverage:main', - ] - }, - - # We need to get HTML assets from our htmlfiles dir. - zip_safe = False, - ) +# Distribute is a new fork of setuptools. It's supported on Py3.x, so we use +# it there, but stick with classic setuptools on Py2.x until Distribute becomes +# more accepted. +if sys.hexversion > 0x03000000: + from distribute_setup import use_setuptools else: - # No setuptools yet for Py 3.x, so do without. - from distutils.core import setup, Extension + from ez_setup import use_setuptools - more_setup_args = dict( - scripts = [ - 'scripts/coverage', - ], - ) +use_setuptools() +from setuptools import setup +from distutils.core import Extension # Get or massage our metadata. @@ -93,7 +78,16 @@ setup( ext_modules = [ Extension("coverage.tracer", sources=["coverage/tracer.c"]) ], - + + entry_points = { + 'console_scripts': [ + 'coverage = coverage:main', + ] + }, + + # We need to get HTML assets from our htmlfiles dir. + zip_safe = False, + author = 'Ned Batchelder', author_email = 'ned@nedbatchelder.com', description = doclines[0], @@ -102,6 +96,4 @@ setup( license = 'BSD', classifiers = classifier_list, url = __url__, - - **more_setup_args ) |