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
|
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: 2024-07-12
diff --git old/setup.py new/setup.py
--- old/setup.py
+++ new/setup.py
@@ -89,12 +89,14 @@ setup_args = dict(
],
},
entry_points={
- # Install a script as "coverage", and as "coverage3", and as
- # "coverage-3.7" (or whatever).
+ # Install a default ‘python-coverage’ program, and versioned as
+ # ‘python3.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]:d}-coverage = {entry}".format(
+ version=sys.version_info, entry="coverage.cmdline:main"),
+ "python{version[0]:d}.{version[1]:d}-coverage = {entry}".format(
+ version=sys.version_info, entry="coverage.cmdline:main"),
],
},
extras_require={
diff --git old/tests/coveragetest.py new/tests/coveragetest.py
--- old/tests/coveragetest.py
+++ new/tests/coveragetest.py
@@ -387,7 +387,7 @@ class CoverageTest(
# their new command name to the tests. This is here for them to override,
# for example:
# https://salsa.debian.org/debian/pkg-python-coverage/-/blob/master/debian/patches/02.rename-public-programs.patch
- coverage_command = "coverage"
+ coverage_command = "python3-coverage"
def run_command(self, cmd: str) -> str:
"""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 :
|