Fix Conan API compatibility
Verify Conan version x Python Requires feature
@@ -29,6 +29,13 @@ def load_cf_class(path, conan_api):
if Version(client_version) < Version("1.7.0"):
from conans.client.loader_parse import load_conanfile_class
return load_conanfile_class(path)
+ elif Version(client_version) < Version("1.14.0"):
+ return conan_api._loader.load_class(path)
+ elif Version(client_version) < Version("1.15.0"):
+ remotes = conan_api._cache.registry.remotes.list
+ for remote in remotes:
+ conan_api.python_requires.enable_remotes(remote_name=remote)
+ return conan_api._loader.load_class(path)
elif Version(client_version) < Version("1.16.0"):
remotes = conan_api._cache.registry.load_remotes()
conan_api.python_requires.enable_remotes(remotes=remotes)
