1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
Description: Rename public programs to be clear what they're for.
.
The upstream choice of ‘coverage’ is too broad a command name for a
Python-specific programmer tool.
.
Created to work with “entry points” feature of Python's Distutils.
Bug: https://bitbucket.org/ned/coveragepy/issue/272/
Author: Ben Finney <bignose@debian.org>
Last-Update: 2016-03-13
diff --git a/setup.py b/setup.py
index 010b5b7..7a2f598 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
@@ -67,12 +68,14 @@ setup_args = dict(
],
entry_points={
- # Install a script as "coverage", and as "coverage[23]", and as
- # "coverage-2.7" (or whatever).
+ # Install a default ‘python-coverage’ program, and versioned as
+ # ‘python2.7-coverage’, ‘python3-coverage’, etc.
'console_scripts': [
- 'coverage = coverage.cmdline:main',
- 'coverage%d = coverage.cmdline:main' % sys.version_info[:1],
- 'coverage-%d.%d = coverage.cmdline:main' % sys.version_info[:2],
+ "python-coverage = {entry}".format(entry="coverage.cmdline:main"),
+ "python{version[0]}-coverage = {entry}".format(
+ version=sys.version_info, entry="coverage.cmdline:main"),
+ "python{version[0]}.{version[1]}-coverage = {entry}".format(
+ version=sys.version_info, entry="coverage.cmdline:main"),
],
},
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index 3468b79..025a385 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -334,7 +334,7 @@ class CoverageTest(
ret_actual = script.command_line(shlex.split(args))
self.assertEqual(ret_actual, ret)
- coverage_command = "coverage"
+ coverage_command = "python-coverage"
def run_command(self, cmd):
"""Run the command-line `cmd` in a sub-process.
Local variables:
coding: utf-8
mode: diff
time-stamp-format: "%:y-%02m-%02d"
time-stamp-start: "^Last-Update:[ ]+"
time-stamp-end: "$"
time-stamp-line-limit: 20
End:
vim: fileencoding=utf-8 filetype=diff :
|