• 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/goals/run.py
1
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
import os
×
UNCOV
7
from collections.abc import Iterable
×
8

UNCOV
9
from pants.backend.makeself.goals.package import MakeselfArchiveFieldSet, package_makeself_binary
×
UNCOV
10
from pants.backend.makeself.subsystem import RunMakeselfArchive
×
UNCOV
11
from pants.backend.makeself.system_binaries import MakeselfBinaryShimsRequest
×
UNCOV
12
from pants.core.goals.run import RunRequest
×
UNCOV
13
from pants.core.util_rules.system_binaries import create_binary_shims
×
UNCOV
14
from pants.engine.process import Process
×
UNCOV
15
from pants.engine.rules import Rule, collect_rules, implicitly, rule
×
UNCOV
16
from pants.util.logging import LogLevel
×
17

18

UNCOV
19
@rule(desc="Run makeself archive", level=LogLevel.DEBUG)
×
UNCOV
20
async def run_makeself_archive(request: RunMakeselfArchive) -> Process:
×
21
    shims = await create_binary_shims(
×
22
        **implicitly(
23
            MakeselfBinaryShimsRequest(
24
                extra_tools=request.extra_tools or (),
25
                rationale="run makeself archive",
26
            )
27
        )
28
    )
29
    output_directories = []
×
30
    argv: tuple[str, ...] = (request.exe,)
×
31

32
    if output_directory := request.output_directory:
×
33
        output_directories = [output_directory]
×
34
        argv += ("--target", request.output_directory)
×
35

36
    return Process(
×
37
        argv=argv + (request.extra_args or ()),
38
        input_digest=request.input_digest,
39
        immutable_input_digests=shims.immutable_input_digests,
40
        output_directories=output_directories,
41
        description=request.description,
42
        level=request.level,
43
        env={"PATH": shims.path_component},
44
    )
45

46

UNCOV
47
@rule
×
UNCOV
48
async def create_makeself_archive_run_request(field_set: MakeselfArchiveFieldSet) -> RunRequest:
×
49
    package = await package_makeself_binary(field_set)
×
50

51
    exe = package.artifacts[0].relpath
×
52
    if exe is None:
×
53
        raise RuntimeError(f"Invalid package artifact: {package}")
×
54

55
    process = await run_makeself_archive(
×
56
        RunMakeselfArchive(
57
            exe=exe,
58
            input_digest=package.digest,
59
            description="Run makeself archive",
60
            extra_tools=field_set.tools.value or (),
61
        )
62
    )
63

64
    return RunRequest(
×
65
        digest=process.input_digest,
66
        args=(os.path.join("{chroot}", process.argv[0]),) + process.argv[1:],
67
        extra_env=process.env,
68
        immutable_input_digests=process.immutable_input_digests,
69
    )
70

71

UNCOV
72
def rules() -> Iterable[Rule]:
×
UNCOV
73
    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

© 2026 Coveralls, Inc