-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Allow conan.tools.* to be extended dynamically #17547
Comments
Hi @code-kungfu Thanks for the feedback. I'd like to understand a bit better the proposal. from conan.tools.cmake import CMake
from myorg_conan.tools.mything import MyTool
class Pkg(ConanFile):
def build(self):
mytool = MyTool(self) If the idea is not via |
Hello @memsharded Thank you for the reply. I should probably clarify what I mean by a fresh install of Conan. To my basic understanding of how Python works, when a Python application is packaged like that, the Python environment is frozen and not extensible via pip? I'm perfectly fine with the library lives in a separate namespace distinct from Conan, then it can be imported through a try-except block in the recipe. The only reason I suggested this, is I was under the impression a library would have to be under the top level conan namespace for a conan config or recipe object to be passed around. The RAD Studio support is based around a heavily modified version of conan.tools.microsoft, plus I have to ship a command line utility which assist in providing accurate environment details about the installed RAD Studio versions (Think vswhere).
Besides the actual support library, I'm also shipping templates for package creation, those I understand is already covered by the current pluggable infrastructure in Conan. Even though RAD Studio is a Windows only environment, targeting multiple platforms, the command line compilers which are invoked by MSBuild when running MSBuild externally, do work fine under Wine in a Linux container. |
Correct, this environment is not extensible, But this is not the main Conan distribution, but the majority of users will use Conan via
We are aware of users that used Conan packages to package the full toolchain (compilers, tools, etc). This might not always be trivial, for example for packaging VisualStudio build tools (both for the technical point of view, but also because licensing doesn't really allow to redistribute it), but we have even heard of users using MSBuild tools inside Conan packages. There are some working examples of toolchains like the
Templates for the |
What is your suggestion?
While working on RAD Studio support for Conan (In extension to the following question here: #13447), it would be really helpful if we could do the following in a fresh install of Conan:
As a third party, install a plugin package which extends the tools namespace, registers internally in Conan, gives full access to the Conan config & recipe object and allowing recipes to import conan.tools.MyPlugin functionality.
An obstacle which would have to be decided upon, would be
This feature is intended to avoid having to ship a customized version of Conan when supporting third party tools and to reduce the maintenance burden in the event the Conan team decides not to include support for a given tool stack.
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: