diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-30 06:58:57 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-30 06:58:57 -0500 |
commit | 61eb3e5f2d1bc9c6997073dca8db888b3d6eb410 (patch) | |
tree | 9084fdb8ff2ba5aaaba95474f440973e9e0daac2 /setup.py | |
parent | 2c883bf322dfaa6173efda3805b402b3c0ad1dbb (diff) | |
download | python-coveragepy-git-61eb3e5f2d1bc9c6997073dca8db888b3d6eb410.tar.gz |
Use Distribute for 3.x, stick with setuptools for 2.x
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 45 |
1 files changed, 18 insertions, 27 deletions
@@ -29,34 +29,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. @@ -94,6 +78,15 @@ setup( 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 +95,4 @@ setup( license = 'BSD', classifiers = classifier_list, url = __url__, - - **more_setup_args ) |