Skip to content

Commit 9284853

Browse files
committed
Generator Definition Fix
1 parent 6ef3b54 commit 9284853

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cppython/plugins/conan/builder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,13 @@ def _create_conanfile(conan_file: Path, dependencies: list[ConanDependency], nam
125125
"""Creates a conanfile.py file with the necessary content."""
126126
template_string = """
127127
from conan import ConanFile
128-
from conan.tools.cmake import CMake, cmake_layout
128+
from conan.tools.cmake import CMake, CMakeDeps, cmake_layout
129129
130130
class AutoPackage(ConanFile):
131131
name = "${name}"
132132
version = "${version}"
133133
settings = "os", "compiler", "build_type", "arch"
134134
requires = ${dependencies}
135-
generators = "CMakeDeps"
136135
137136
def layout(self):
138137
cmake_layout(self)

cppython/plugins/conan/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def _generate_consumer_files(self, conan_api: ConanAPI, deps_graph) -> None:
192192

193193
conan_api.install.install_consumer(
194194
deps_graph=deps_graph,
195-
generators=['CMakeToolchain', 'CMakeDeps'],
195+
generators=[], # Our conanfile.py template defines this
196196
source_folder=str(project_root),
197197
output_folder=str(self.core_data.cppython_data.build_path),
198198
)

0 commit comments

Comments
 (0)