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 pybind11/2.4.3 recipe #464

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Add pybind11/2.4.3 recipe #464

merged 1 commit into from
Apr 28, 2020

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Dec 11, 2019

Specify library name and version: pybind11/2.4.3

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

Fixes #424

@conan-center-bot
Copy link
Collaborator

Some configurations of 'pybind11/2.4.3' have failed:

  • Linux x86_64, Release, gcc 5, libstdc++
    • Hooks errors detected:
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] The conan-center repository doesn't allow the packages to contain CMake find modules or config files. The packages have to be located using generators and the declared cpp_infoinformation (https://github.com/conan-io/conan-center-index/wiki/Error-Knowledge-Base#KB-H016)
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] Found files:
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs

@madebr
Copy link
Contributor Author

madebr commented Dec 11, 2019

@uilianries
I've added "lib/cmake/pybind11" to self.cpp_info.builddirs but it is still failing.
The files in that directory are:

  • pybind11Tools.cmake: contains function to create a python module
  • FindPythonLibsNew.cmake: contains helper function to find the python executable and libraries
    It detects and sets more variables then FindPythonInterp.cmake and FindPythonLibs.cmake from cmake
    It is required by pybind11Tools.cmake

What do you suggest?

@danimtb
Copy link
Member

danimtb commented Dec 11, 2019

@madebr please check the changes done here https://github.com/conan-community/conan-pybind11/compare/release/2.3.0...danimtb:release/2.3.0_build_modules?expand=1 as a proof of concept for build modules

@madebr
Copy link
Contributor Author

madebr commented Dec 11, 2019

@danimtb
Thanks for the link.
The issue with KB-H016 is that it does not allow Find*.cmake files which it needs.

@conan-center-bot
Copy link
Collaborator

Some configurations of 'pybind11/2.4.3' have failed:

  • Linux x86_64, Release, gcc 5, libstdc++
    • Hooks errors detected:
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] The conan-center repository doesn't allow the packages to contain CMake find modules or config files. The packages have to be located using generators and the declared cpp_infoinformation (https://github.com/conan-io/conan-center-index/wiki/Error-Knowledge-Base#KB-H016)
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] Found files:
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs

@danimtb
Copy link
Member

danimtb commented Jan 3, 2020

@madebr yes, you can use them if those are correctly mapped in the self.cpp_info.builddirs. Please update the PR with those changes

@madebr
Copy link
Contributor Author

madebr commented Jan 11, 2020

@danimtb The only other recipe using self.cpp_info.builddirs is catch2.
In its build directory, there are: Catch.cmake, CatchAddTests.cmake and ParseAndAddCatchTests.cmake. No FindXXX.cmake file.

So I still do not know how to whitelist FindPythonLibsNex.cmake.

@danimtb
Copy link
Member

danimtb commented Jan 13, 2020

ok, I will give it a go myself. Sorry for that

@uilianries
Copy link
Member

The PR conan-io/hooks#145 puts pybind11 in the allow list for KB-H016

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

LGTM

@danimtb
Copy link
Member

danimtb commented Jan 15, 2020

@uilianries I think instead of allowing that via whitelist, we could check if cpp_info.build_modules adds those files and allow them. But maybe this is difficult to check in the hooks

@uilianries
Copy link
Member

@danimtb we can check if r"Find{self.name}" is there and reject, otherwise, we can allow.

@conan-center-bot
Copy link
Collaborator

Some configurations of 'pybind11/2.4.3' failed in build 3 (830f0f92b69f7fd560c0e27c9be9dd7880a41aee):

  • Linux x86_64, Release, gcc 5, libstdc++
    • Hooks errors detected:
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] The conan-center repository doesn't allow the packages to contain CMake find modules or config files. The packages have to be located using generators and the declared cpp_infoinformation (https://github.com/conan-io/conan-center-index/wiki/Error-Knowledge-Base#KB-H016)
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] Found files:
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs

@danimtb
Copy link
Member

danimtb commented Jan 15, 2020

@uilianries not sure about that as that might be tied to the name set in self.cpp_info.names["cmake_find_package"] not self.name. Maybe checking in lowercase mode?

@uilianries
Copy link
Member

@danimtb Lowercase sounds better!

@uilianries
Copy link
Member

@danimtb Thinking again, it will be better using self.cpp_info.names["cmake_find_package"] by default, because in some cases, the target name is not the same than the package name.

@danimtb
Copy link
Member

danimtb commented Jan 16, 2020

yes, names might be different although most times us just a casing change. Don't know if that is possible to detect... But I think allowing files declared in build_modules is fine. We can check it in the PR review

@kylemacfarlan
Copy link

@danimtb @uilianries Is there anything blocking this getting merged? I'd love to have pybind11 in conan center.

@conan-center-bot
Copy link
Collaborator

Some configurations of 'pybind11/2.4.3' failed in build 5 (830f0f92b69f7fd560c0e27c9be9dd7880a41aee):

  • Linux x86_64, Release, gcc 5, libstdc++
    • Hooks errors detected:
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] The conan-center repository doesn't allow the packages to contain CMake find modules or config files. The packages have to be located using generators and the declared cpp_infoinformation (https://github.com/conan-io/conan-center-index/wiki/Error-Knowledge-Base#KB-H016)
      • [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] Found files:
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs

@conan-center-bot
Copy link
Collaborator

All green in build 6 (830f0f92b69f7fd560c0e27c9be9dd7880a41aee)! 😊

@danimtb danimtb merged commit f97cd8b into conan-io:master Apr 28, 2020
@madebr madebr deleted the pybind11 branch April 28, 2020 11:46
@Croydon
Copy link
Contributor

Croydon commented Apr 28, 2020

Please archive https://github.com/conan-community/conan-pybind11 @SSE4 @danimtb or someone else, thanks 😄

@Croydon
Copy link
Contributor

Croydon commented Apr 28, 2020

Also these should probably be moved or closed https://github.com/conan-community/community/issues?q=is%3Aissue+is%3Aopen+pybind11

@danimtb
Copy link
Member

danimtb commented May 4, 2020

Done! Thanks for the reminder @Croydon

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.

[request] pybind/2.4.3
6 participants