Skip to content

[feature] Allow specifying deployer folder #18181

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

Open
1 task
aiyolo opened this issue Apr 25, 2025 · 2 comments
Open
1 task

[feature] Allow specifying deployer folder #18181

aiyolo opened this issue Apr 25, 2025 · 2 comments
Assignees

Comments

@aiyolo
Copy link

aiyolo commented Apr 25, 2025

What is your suggestion?

Currently, when specifying deployer folder, for example, runing the folloing comman

conan install . -s build_type=Debug --build=missing -d direct_deploy --deployer-folder third_party

the final deployer folder would be third_party/direct_deploy then the package folder.

It is better that removing the subdirectory direct_deploy, If users want to create that folder, they can use --deployer-folder third_party/direct_deploy instead.

Besides, I'd like that deployer folder can be set int the conf file.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@aiyolo aiyolo changed the title [feature] Allowing specify deployer folder [feature] Allow specifying deployer folder Apr 25, 2025
@memsharded memsharded self-assigned this Apr 25, 2025
@memsharded
Copy link
Member

Thanks for your suggestion @aiyolo

The direct_deploy generator hardcodes the "direct_deploy" folder in its implementation:

def direct_deploy(graph, output_folder):
    """
    Deploys to output_folder a single package,
    """
    output_folder = os.path.join(output_folder, "direct_deploy")
    conanfile = graph.root.conanfile
    conanfile.output.info(f"Conan built-in pkg deployer to {output_folder}")

That means that the Conan --deployer-folder argument cannot avoid this in anyway.
Also, this cannot be changed because it would be breaking behavior for users that rely on this functionality.

There are 2 alternatives to achieve something like this:

  • Do a mv command after the conan install with deployers
  • Or provide your own deployer. Note that the deployers are intended to be mostly modular and user provided. The built-in deployers are there for convenience, but they do not aim to be a general solution for production for all users. This is the reason the deployers can be provided by users, and shared and distributed easily with conan config install/install-pkg.

Adding a specific conf to implement something that is basically a mv command would be too overkill.

@aiyolo
Copy link
Author

aiyolo commented Apr 26, 2025

Thanks for your reply. I have learnt how to implement a custom deployer.
How can I achieve this?

Do a mv command after the conan install with deployers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants