Skip to content

Commit 696f3cc

Browse files
committed
refine command-wrapper for build-order
1 parent dcaea07 commit 696f3cc

4 files changed

Lines changed: 6 additions & 15 deletions

File tree

src/cpp_dev/conan/command_wrapper.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,13 @@ def conan_list(remote: str, name: str) -> Mapping[ConanPackageReference, dict]:
4949
)
5050
return json.loads(stdout)[remote]
5151

52-
ConanSettingName = Literal["os", "os-distro", "arch", "compiler", "compiler.cppstd", "compiler.version", "compiler.libcxx", "build_type"]
53-
ConanSettings = Mapping[ConanSettingName, str]
54-
55-
def conan_graph_buildorder(conanfile_path: Path, settings: ConanSettings) -> list[str]:
52+
def conan_graph_buildorder(conanfile_path: Path, profile: str) -> list[str]:
5653
stdout, _ = run_command_assert_success(
5754
"conan",
5855
"graph",
5956
"buildorder",
6057
str(conanfile_path),
58+
"-pr:a", profile,
6159
"--json",
6260
"--order-by", "recipe",
6361
)

src/cpp_dev/conan/config/profiles/ubuntu2404_dev_tooling

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/tests/cpp_dev/conan/test_command_wrapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ def test_conan_remote_login() -> None:
3838
def test_conan_graph_buildorder() -> None:
3939
with patch("cpp_dev.conan.command_wrapper.run_command_assert_success") as mock_run_command:
4040
mock_run_command.return_value = (json.dumps({}), None)
41-
conan_graph_buildorder("conanfile.txt", {"os": "Linux", "arch": "x86_64"})
41+
conan_graph_buildorder("conanfile.txt", "profile")
4242
mock_run_command.assert_called_once_with(
4343
"conan",
4444
"graph",
4545
"buildorder",
4646
"conanfile.txt",
47+
"-pr:a",
48+
"profile",
4749
"--json",
4850
"--order-by",
4951
"recipe",

src/tests/cpp_dev/conan/test_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ def test_initialize_conan(tmp_path: Path) -> None:
1717

1818
assert (tmp_path / "remotes.json").exists()
1919
assert (tmp_path / "settings.yml").exists()
20-
assert (tmp_path / "profiles" / "ubuntu2404_dev_tooling").exists()
20+
assert (tmp_path / "profiles" / "ubuntu-24.04").exists()

0 commit comments

Comments
 (0)