mirror of
https://github.com/ryanvolz/radioconda.git
synced 2024-12-25 20:32:45 -05:00
Add '--' separator to explicitly pass extra arguments to build commands.
This commit is contained in:
parent
15f8c891bd
commit
373d93e450
2
.github/workflows/build_radioconda.yml
vendored
2
.github/workflows/build_radioconda.yml
vendored
@ -69,7 +69,7 @@ jobs:
|
||||
if [ "$OS_NAME" == "Windows" ]; then
|
||||
PATH=$CONDA_PREFIX/NSIS:$PATH
|
||||
fi
|
||||
python build_installer.py -v --conda-exe $MAMBA_EXE
|
||||
python build_installer.py -- -v --conda-exe $MAMBA_EXE
|
||||
|
||||
- name: Build metapackage
|
||||
shell: bash -l {0}
|
||||
|
@ -34,7 +34,8 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(
|
||||
description=(
|
||||
"Build installer package(s) using conda constructor."
|
||||
" Additional command-line options will be passed to constructor."
|
||||
" Additional command-line options following '--' will be passed to"
|
||||
" constructor."
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
@ -59,7 +60,13 @@ if __name__ == "__main__":
|
||||
),
|
||||
)
|
||||
|
||||
args, constructor_args = parser.parse_known_args()
|
||||
# allow a delimiter to separate constructor arguments
|
||||
argv = sys.argv[1:]
|
||||
if "--" in argv:
|
||||
i = argv.index("--")
|
||||
args, constructor_args = parser.parse_args(argv[:i]), argv[i + 1 :]
|
||||
else:
|
||||
args, constructor_args = parser.parse_args(argv), []
|
||||
|
||||
platform = spec_dir_extract_platform(args.installer_spec_dir)
|
||||
|
||||
|
@ -73,7 +73,8 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(
|
||||
description=(
|
||||
"Build environment metapackage using conda-build."
|
||||
" Additional command-line options will be passed to conda metapackage."
|
||||
" Additional command-line options following '--' will be passed to conda"
|
||||
" metapackage."
|
||||
)
|
||||
)
|
||||
parser.add_argument(
|
||||
@ -113,7 +114,13 @@ if __name__ == "__main__":
|
||||
help="Summary of the package. (default: %(default)s)",
|
||||
)
|
||||
|
||||
args, metapackage_args = parser.parse_known_args()
|
||||
# allow a delimiter to separate metapackage arguments
|
||||
argv = sys.argv[1:]
|
||||
if "--" in argv:
|
||||
i = argv.index("--")
|
||||
args, metapackage_args = parser.parse_args(argv[:i]), argv[i + 1 :]
|
||||
else:
|
||||
args, metapackage_args = parser.parse_args(argv), []
|
||||
|
||||
env_dict = read_env_file(
|
||||
args.env_file,
|
||||
|
Loading…
Reference in New Issue
Block a user