Skip to content

Commit d8d1e92

Browse files
committed
build-parallel: Rename --jobs option to --max-workers to avoid conflict
The --jobs option in the build-parallel command conflicted with the main program's option of the same name. This change renames the option to --max-workers (short form -m) and updates all references and help text accordingly, ensuring clear and unambiguous usage for users. Signed-off-by: Doug Hellmann <dhellmann@redhat.com>
1 parent 11dfca4 commit d8d1e92

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/fromager/commands/build.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,11 @@ def _build_parallel(
500500
help="url to a wheel server from where fromager can check if it had already built the wheel",
501501
)
502502
@click.option(
503-
"-j",
504-
"--jobs",
503+
"-m",
504+
"--max-workers",
505505
type=int,
506506
default=None,
507-
help="number of parallel jobs to run (default: unlimited)",
507+
help="maximum number of parallel workers to run (default: unlimited)",
508508
)
509509
@click.argument("graph_file")
510510
@click.pass_obj
@@ -513,7 +513,7 @@ def build_parallel(
513513
graph_file: str,
514514
force: bool,
515515
cache_wheel_server_url: str | None,
516-
jobs: int | None,
516+
max_workers: int | None,
517517
) -> None:
518518
"""Build wheels in parallel based on a dependency graph
519519
@@ -522,7 +522,7 @@ def build_parallel(
522522
Performs parallel builds of wheels based on their dependency relationships.
523523
Packages that have no dependencies or whose dependencies are already built
524524
can be built concurrently. By default, all possible packages are built in
525-
parallel. Use --jobs to limit the number of concurrent builds.
525+
parallel. Use --max-workers to limit the number of concurrent builds.
526526
527527
"""
528528
wkctx.enable_parallel_builds()
@@ -594,8 +594,10 @@ def build_parallel(
594594
", ".join(n.canonicalized_name for n in buildable_nodes),
595595
)
596596

597-
# Build up to jobs nodes concurrently (or all if jobs is None)
598-
with concurrent.futures.ThreadPoolExecutor(max_workers=jobs) as executor:
597+
# Build up to max_workers nodes concurrently (or all if max_workers is None)
598+
with concurrent.futures.ThreadPoolExecutor(
599+
max_workers=max_workers
600+
) as executor:
599601
futures = []
600602
for node in buildable_nodes:
601603
req = Requirement(f"{node.canonicalized_name}=={node.version}")

0 commit comments

Comments
 (0)