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

Add properties to MakeDeps generator #16613

Merged

Conversation

vajdaz
Copy link
Contributor

@vajdaz vajdaz commented Jul 4, 2024

Changelog: Feature: MakeDeps generator generates make variables for dependencies and their components.
Docs: conan-io/docs#3794

Fixes #16572

If the receipt defines custom properties in the package_info() method
then these properties should appear as make variables, too. The pattern
of the make variable is

CONAN_PROPERTY_{dependency_name}_{property_name}
Furthermore handle case when _properties is None.
@CLAassistant
Copy link

CLAassistant commented Jul 4, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the contribution @vajdaz !

conan/tools/gnu/makedeps.py Outdated Show resolved Hide resolved
- _makefy_properties() always returns a dict
- Simplification of define_multiple_variable_value jinja2 macro
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good I think it can be moved out of draft and merged.
Many thanks!

conan/tools/gnu/makedeps.py Outdated Show resolved Hide resolved
@vajdaz vajdaz marked this pull request as ready for review July 8, 2024 20:23
It would break the makefile if we would create property values with
newlines. Therefore we output a warning message and skip such
properties.
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

conan/tools/gnu/makedeps.py Outdated Show resolved Hide resolved
@memsharded memsharded added this to the 2.6.0 milestone Jul 9, 2024
@memsharded memsharded merged commit 59bcd38 into conan-io:develop2 Jul 9, 2024
2 checks passed
@vajdaz vajdaz deleted the feature/makedeps-generator-properties branch July 9, 2024 21:37
@vajdaz
Copy link
Contributor Author

vajdaz commented Aug 1, 2024

Hi @memsharded,
The text in the release notes for 2.6.0 is a bit misleading. It says:

Feature: MakeDeps generator generates make variables for dependencies and their components. (#16613)

However, the feautre is that the generator generates make variables for the properties of the direct dependencies and their components.

@memsharded
Copy link
Member

You are right. The release notes are generated automatically from the PR Changelog comment in #16613. If you think it is worth to change the changelog, a PR to the docs can be done, but it is probably not a big issue.

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

Successfully merging this pull request may close these issues.

[feature] Add properties to MakeDeps generator
3 participants