Skip to content
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] python_requires; change package_id through attributes #15774

Closed
1 task done
antoinebardoz opened this issue Feb 28, 2024 · 2 comments
Closed
1 task done

[feature] python_requires; change package_id through attributes #15774

antoinebardoz opened this issue Feb 28, 2024 · 2 comments
Assignees

Comments

@antoinebardoz
Copy link

What is your suggestion?

Hi,

For regular Conan packages, we can change the package_id mode with attributes, such as:

package_id_embed_mode = "unrelated_mode"
package_id_non_embed_mode = "unrelated_mode"
package_id_unknown_mode = "unrelated_mode"

Unfortunately, this doesn't work for a python-require package. I have tried with the following:

def some_function():
    pass

class MyPythonReq(ConanFile):
    name = "python_tool"
    package_type = "python-require"

    package_id_embed_mode = "unrelated_mode"
    package_id_non_embed_mode = "unrelated_mode"
    package_id_unknown_mode = "unrelated_mode"

If one of my packages consumes this python-requirement, the package ID of the consumer changes if the version of python_tool changes. We would like to be able to set it in unrelated_mode using attributes.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded
Copy link
Member

Hi @antoinebardoz

I think what you request was added in Conan 2.1: https://docs.conan.io/2/changelog.html

Please check:

And let me know

@antoinebardoz
Copy link
Author

Fantastic, I'm very happy to hear this. This fixes our issue.

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

No branches or pull requests

2 participants