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

Use cpp_info.name lower case in pkg-config generator when defined #5988

Merged
merged 1 commit into from Oct 29, 2019

Conversation

@danimtb
Copy link
Member

@danimtb danimtb commented Oct 28, 2019

Changelog: Bugfix: Use cpp_info.name lower case in pkg-config generator when defined
Docs: omit

  • Refer to the issue that supports this Pull Request: closes #5984
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@danimtb danimtb added this to the 1.19.3 milestone Oct 28, 2019
@danimtb danimtb assigned danimtb and lasote and unassigned danimtb Oct 28, 2019
Copy link
Member

@memsharded memsharded left a comment

Yes, I think this is the least bad approach at the moment. Not happy about it, just impact minimization, but lets go with it.

for _, cpp_info in self.deps_build_info.dependencies:
ret["%s.pc" % cpp_info.name] = self.single_pc_file_contents(cpp_info)
for depname, cpp_info in self.deps_build_info.dependencies:
name = cpp_info.name.lower() if cpp_info.name != depname else depname
Copy link
Contributor

@SSE4 SSE4 Oct 29, 2019

Choose a reason for hiding this comment

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

so, if cpp_info.name == depname it won't go lowercase?

Copy link
Member Author

@danimtb danimtb Oct 29, 2019

Choose a reason for hiding this comment

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

that's what the logic says 😄

Copy link
Contributor

@SSE4 SSE4 Oct 29, 2019

Choose a reason for hiding this comment

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

yeah, but is it expected? AFAIK pkg-config file should be always in lower-case, right?

Copy link
Member Author

@danimtb danimtb Oct 29, 2019

Choose a reason for hiding this comment

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

I have seen that it is a very extended practice, but AFAIK pkg-config does not force the name to be lower-case

Copy link
Contributor

@SSE4 SSE4 Oct 29, 2019

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

None yet

4 participants