Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Support passing build variants from cli
Browse files Browse the repository at this point in the history
  • Loading branch information
frmdstryr committed Mar 24, 2023
1 parent 06a72bc commit 6098f21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions boa/cli/boa.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ def main(config=None):
default=22,
)

for k in ("perl", "lua", "python", "numpy", "r_base"):
conda_build_parser.add_argument(
"--{}".format(k),
dest="{}_variant".format(k),
help="Set the {} variant used by conda build.".format(k),
)

subparsers.add_parser(
"build",
parents=[parent_parser, build_parser, variant_parser],
Expand Down
6 changes: 6 additions & 0 deletions boa/core/run_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,12 @@ def run_build(args: argparse.Namespace) -> None:

cbc["target_platform"] = [variant["target_platform"]]

# Command line variant
for lang in ("perl", "lua", "python", "numpy", "r_base"):
key = lang + "_variant"
if hasattr(args, key):
cbc[lang] = [getattr(args, key)]

if not os.path.exists(config.output_folder):
mkdir_p(config.output_folder)

Expand Down

0 comments on commit 6098f21

Please sign in to comment.