summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-07-09 09:55:22 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-07-09 09:55:22 -0400
commit829cde3cb6fcd15ebf884446b6a27d7e2dc7aadb (patch)
treebd50ea6052871f1e0cc5f282728acca00c462293
parent2dd34c19fdacc7d34665b0a7eb07cee065da36a8 (diff)
downloadpython-coveragepy-git-829cde3cb6fcd15ebf884446b6a27d7e2dc7aadb.tar.gz
Py3k: an explicit coverage.py script since setuptools can't make one for us.
-rw-r--r--Makefile9
-rw-r--r--checkeol.py1
-rw-r--r--scripts/coverage10
-rw-r--r--setup.py11
4 files changed, 25 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index fa887e64..aad68429 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,10 @@ clean:
-rm -f setuptools-*.egg
-rm -rf doc/_build/*
-LINTABLE_TESTS = \
+LINTABLE = \
+ coverage \
+ scripts/coverage \
+ setup.py \
test/coverage_coverage.py \
test/coveragetest.py \
test/test_api.py \
@@ -34,8 +37,8 @@ LINTABLE_TESTS = \
test/test_templite.py
lint:
- -python -x /Python25/Scripts/pylint.bat --rcfile=.pylintrc coverage $(LINTABLE_TESTS) setup.py
- python /Python25/Lib/tabnanny.py coverage test setup.py
+ -python -x /Python25/Scripts/pylint.bat --rcfile=.pylintrc $(LINTABLE)
+ python /Python25/Lib/tabnanny.py coverage scripts test setup.py
python checkeol.py
testready: $(TEST_ZIP) devinst
diff --git a/checkeol.py b/checkeol.py
index 68efc2fa..8b6f60c0 100644
--- a/checkeol.py
+++ b/checkeol.py
@@ -20,5 +20,6 @@ def check_files(root, patterns):
dirs.remove('.svn')
check_files("coverage", ["*.py"])
+check_files("scripts", ["*"])
check_files("test", ["*.py", "*,cover"])
check_file("setup.py")
diff --git a/scripts/coverage b/scripts/coverage
new file mode 100644
index 00000000..682258ba
--- /dev/null
+++ b/scripts/coverage
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+""" Coverage.py code coverage measurement.
+ http://nedbatchelder.com/code/coverage
+
+ Copyright 2004-2009, Ned Batchelder.
+"""
+
+import sys
+from coverage import main
+sys.exit(main())
diff --git a/setup.py b/setup.py
index af0412b8..dba86df5 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ if sys.hexversion < 0x03000000:
from setuptools import setup
from distutils.core import Extension
- setuptools_args = dict(
+ more_setup_args = dict(
entry_points = {
'console_scripts': [
'coverage = coverage:main',
@@ -45,7 +45,12 @@ if sys.hexversion < 0x03000000:
else:
# No setuptools yet for Py 3.x, so do without.
from distutils.core import setup, Extension
- setuptools_args = {}
+
+ more_setup_args = dict(
+ scripts = [
+ 'scripts/coverage',
+ ],
+ )
# Get or massage our metadata.
@@ -93,5 +98,5 @@ setup(
classifiers = classifier_list,
url = 'http://nedbatchelder.com/code/coverage',
- **setuptools_args
+ **more_setup_args
)