Skip to content

Commit b08e1ec

Browse files
authored
Merge pull request #3330 from theotherjimmy/correct-project-profiles
Fix project profile parsing
2 parents 7338280 + 5fac67b commit b08e1ec

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tools/project.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
from tools.tests import TESTS, TEST_MAP
1616
from tools.tests import test_known, test_name_known, Test
1717
from tools.targets import TARGET_NAMES
18-
from tools.utils import argparse_filestring_type, argparse_many, args_error
18+
from tools.utils import argparse_filestring_type, argparse_profile_filestring_type, argparse_many, args_error
1919
from tools.utils import argparse_force_lowercase_type
2020
from tools.utils import argparse_force_uppercase_type
2121
from tools.utils import print_large_string
2222
from tools.project_api import export_project, get_exporter_toolchain
23-
from tools.options import extract_profile
24-
23+
from tools.options import extract_profile, list_profiles
2524

2625
def setup_project(ide, target, program=None, source_dir=None, build=None, export_path=None):
2726
"""Generate a name, if not provided, and find dependencies
@@ -172,10 +171,11 @@ def main():
172171
dest="macros",
173172
help="Add a macro definition")
174173

175-
parser.add_argument("--profile",
176-
type=argparse_filestring_type,
177-
default=[],
178-
help="Toolchain profile")
174+
parser.add_argument("--profile", dest="profile", action="append",
175+
type=argparse_profile_filestring_type,
176+
help="Build profile to use. Can be either path to json" \
177+
"file or one of the default one ({})".format(", ".join(list_profiles())),
178+
default=[])
179179

180180
parser.add_argument("--update-packs",
181181
dest="update_packs",

0 commit comments

Comments
 (0)