@@ -27,6 +27,11 @@ def __init__(
2727 self .core_data : CorePluginData = core_data
2828 self .data : ConanData = resolve_conan_data (configuration_data , core_data )
2929
30+ self ._provider_file = self .core_data .cppython_data .tool_path / 'conan' / 'conan_provider.cmake'
31+ self ._provider_url = (
32+ 'https://raw.githubusercontent.com/conan-io/cmake-conan/refs/heads/develop2/conan_provider.cmake'
33+ )
34+
3035 @staticmethod
3136 def _download_file (url : str , file : Path ) -> None :
3237 """Replaces the given file with the contents of the url"""
@@ -59,20 +64,16 @@ def information() -> Information:
5964
6065 def install (self ) -> None :
6166 """Installs the provider"""
62- conan_provider = self .core_data .cppython_data .tool_path / 'conan' / 'conan_provider.cmake'
63-
6467 self ._download_file (
65- 'https://raw.githubusercontent.com/conan-io/cmake-conan/refs/heads/develop2/conan_provider.cmake' ,
66- conan_provider ,
68+ self . _provider_url ,
69+ self . _provider_file ,
6770 )
6871
6972 def update (self ) -> None :
7073 """Updates the provider"""
71- conan_provider = self .core_data .cppython_data .tool_path / 'conan' / 'conan_provider.cmake'
72-
7374 self ._download_file (
74- 'https://raw.githubusercontent.com/conan-io/cmake-conan/refs/heads/develop2/conan_provider.cmake' ,
75- conan_provider ,
75+ self . _provider_url ,
76+ self . _provider_file ,
7677 )
7778
7879 @staticmethod
@@ -87,8 +88,7 @@ def supported_sync_type(sync_type: type[SyncData]) -> bool:
8788 """
8889 return sync_type in CMakeGenerator .sync_types ()
8990
90- @staticmethod
91- def sync_data (consumer : SyncConsumer ) -> SyncData :
91+ def sync_data (self , consumer : SyncConsumer ) -> SyncData :
9292 """_summary_
9393
9494 Args:
@@ -99,6 +99,6 @@ def sync_data(consumer: SyncConsumer) -> SyncData:
9999 """
100100 for sync_type in consumer .sync_types ():
101101 if sync_type == CMakeSyncData :
102- return CMakeSyncData (provider_name = TypeName ('conan' ), top_level_includes = Path ( 'test' ) )
102+ return CMakeSyncData (provider_name = TypeName ('conan' ), top_level_includes = self . _provider_file )
103103
104104 raise NotSupportedError ('OOF' )
0 commit comments