• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 19015773527

02 Nov 2025 05:33PM UTC coverage: 17.872% (-62.4%) from 80.3%
19015773527

Pull #22816

github

web-flow
Merge a12d75757 into 6c024e162
Pull Request #22816: Update Pants internal Python to 3.14

4 of 5 new or added lines in 3 files covered. (80.0%)

28452 existing lines in 683 files now uncovered.

9831 of 55007 relevant lines covered (17.87%)

0.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/python/pants/backend/makeself/system_binaries.py
1
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
UNCOV
3
from collections.abc import Iterable
×
UNCOV
4
from dataclasses import dataclass
×
5

UNCOV
6
from pants.backend.shell.subsystems.shell_setup import ShellSetup
×
UNCOV
7
from pants.backend.shell.util_rules.builtin import BASH_BUILTIN_COMMANDS
×
UNCOV
8
from pants.core.util_rules.system_binaries import (
×
9
    AwkBinary,
10
    BasenameBinary,
11
    BashBinary,
12
    BinaryPathRequest,
13
    BinaryShimsRequest,
14
    CatBinary,
15
    ChmodBinary,
16
    CksumBinary,
17
    CutBinary,
18
    DateBinary,
19
    DdBinary,
20
    DfBinary,
21
    DirnameBinary,
22
    DuBinary,
23
    ExprBinary,
24
    FindBinary,
25
    GzipBinary,
26
    HeadBinary,
27
    IdBinary,
28
    MkdirBinary,
29
    PwdBinary,
30
    RmBinary,
31
    SedBinary,
32
    ShBinary,
33
    SortBinary,
34
    TailBinary,
35
    TarBinary,
36
    TestBinary,
37
    TrBinary,
38
    WcBinary,
39
    XargsBinary,
40
)
UNCOV
41
from pants.engine.rules import Rule, collect_rules, rule
×
UNCOV
42
from pants.util.logging import LogLevel
×
43

44

UNCOV
45
@dataclass(frozen=True)
×
UNCOV
46
class MakeselfBinaryShimsRequest:
×
47
    """Request all the binaries needed to create or run makeself archive.
48

49
    Technically, you might need different sets of binaries for creating and running the makeself
50
    archive, but most of the binaries are the same, so we bundle them all in a single rule for
51
    simplicity.
52
    """
53

54
    extra_tools: tuple[str, ...]
55
    rationale: str
56

57

UNCOV
58
@rule(desc="Find binaries required for makeself", level=LogLevel.DEBUG)
×
UNCOV
59
async def get_binaries_required_for_makeself(
×
60
    request: MakeselfBinaryShimsRequest,
61
    shell_setup: ShellSetup.EnvironmentAware,
62
    awk: AwkBinary,
63
    basename: BasenameBinary,
64
    bash: BashBinary,
65
    cat: CatBinary,
66
    chmod: ChmodBinary,
67
    cksum: CksumBinary,
68
    cut: CutBinary,
69
    date: DateBinary,
70
    dd: DdBinary,
71
    df: DfBinary,
72
    dirname: DirnameBinary,
73
    du: DuBinary,
74
    expr: ExprBinary,
75
    find: FindBinary,
76
    gzip: GzipBinary,
77
    head: HeadBinary,
78
    id: IdBinary,
79
    mkdir: MkdirBinary,
80
    pwd: PwdBinary,
81
    rm: RmBinary,
82
    sed: SedBinary,
83
    sh: ShBinary,
84
    sort: SortBinary,
85
    tail: TailBinary,
86
    tar: TarBinary,
87
    test: TestBinary,
88
    tr: TrBinary,
89
    wc: WcBinary,
90
    xargs: XargsBinary,
91
) -> BinaryShimsRequest:
92
    return BinaryShimsRequest(
×
93
        paths=(
94
            awk,
95
            basename,
96
            bash,
97
            cat,
98
            chmod,
99
            cksum,
100
            cut,
101
            date,
102
            dd,
103
            df,
104
            dirname,
105
            du,
106
            expr,
107
            find,
108
            gzip,
109
            head,
110
            id,
111
            mkdir,
112
            pwd,
113
            rm,
114
            sed,
115
            sh,
116
            sort,
117
            tail,
118
            tar,
119
            test,
120
            tr,
121
            wc,
122
            xargs,
123
        ),
124
        requests=tuple(
125
            BinaryPathRequest(
126
                binary_name=binary_name,
127
                search_path=shell_setup.executable_search_path,
128
            )
129
            for binary_name in request.extra_tools
130
            if binary_name not in BASH_BUILTIN_COMMANDS
131
        ),
132
        rationale=request.rationale,
133
    )
134

135

UNCOV
136
def rules() -> Iterable[Rule]:
×
UNCOV
137
    return collect_rules()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc