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

Fixing issue #12040: Can't find SQLite3 using CMake with cmake_paths generator #12041

Closed
wants to merge 1 commit into from

Conversation

tuduongquyet
Copy link
Contributor

@tuduongquyet tuduongquyet commented Aug 4, 2022

fixes #12040


  • 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.

@conan-center-bot

This comment has been minimized.

@prince-chrismc
Copy link
Contributor

GitHub is super linking with linking issues, may you please update it to match https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

You have an extra bug: in there 🐛 😆 (no pun intended)

@uilianries
Copy link
Member

@tuduongquyet please, consider prince's comment about your next PRs.

The title should not contain the related issue, instead, add the package name + description, like:

[sqlite] Can't find ....

On the description body, you can add the keyword fixes #12040 or closes #12040 which will automatically managed bu Github, linking to that issue, and closing it once your PR is merged.

Besides that, your PR description is excellent, well detailed. Thank you for your contribution!

@uilianries
Copy link
Member

BTW, consider avoiding cmake_paths it will be deprecated on Conan 2.0. Please, consider moving to CMakeToolchain + CMakeDeps for your future projects. Here is a migration documentation to help you: https://docs.conan.io/en/latest/conan_v2.html

Copy link
Contributor

@jgsogo jgsogo left a comment

Choose a reason for hiding this comment

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

I'm surprised that this change fixes the issue... the content of that cpp_info.buildirs object should be the same before and now.

But if it fixes the issue... it is very welcome (although cmake_paths will be deprecated, as uilian said).

Anyway, looks like there are some issues to fix before reviewing and merging the PR

@conan-center-bot

This comment has been minimized.

@@ -223,4 +223,4 @@ def package_info(self):
self.cpp_info.components["sqlite"].set_property("cmake_target_name", "SQLite::SQLite3")
self.cpp_info.components["sqlite"].set_property("pkg_config_name", "sqlite3")

self.cpp_info.components["sqlite"].builddirs = [os.path.join("lib", "cmake")]
self.cpp_info.components["sqlite"].builddirs.append(os.path.join("lib", "cmake"))
Copy link
Contributor

@SpaceIm SpaceIm Aug 4, 2022

Choose a reason for hiding this comment

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

Suggested change
self.cpp_info.components["sqlite"].builddirs.append(os.path.join("lib", "cmake"))

can be removed actually (this folder lib/cmake contains a module file which is an internal detail for cmake_find_package generated file)

@toge it's a regression coming from #11383, I guess you've seen a hook warning, but this hook is wrong.

@SpaceIm
Copy link
Contributor

SpaceIm commented Aug 4, 2022

I'm surprised that this change fixes the issue... the content of that cpp_info.buildirs object should be the same before and now.

But if it fixes the issue... it is very welcome (although cmake_paths will be deprecated, as uilian said).

Anyway, looks like there are some issues to fix before reviewing and merging the PR

It's not the same content before and now, since builddirs default value is root package folder. It is used to populate CMAKE_PREFIX_PATH & CMAKE_MODULE_PATH in cmake_paths generator

@conan-center-bot
Copy link
Collaborator

All green in build 5 (0c6f8e3d045474c1407313984df798f1b399561a):

  • sqlite3/3.39.1@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.38.1@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.38.3@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.38.4@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.36.0@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.38.5@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.35.5@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.37.0@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.37.2@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.38.0@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.39.2@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • sqlite3/3.39.0@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-12041/recipes/sqlite3/all/conanfile.py", line 1, in <module>
        from conans import ConanFile, CMake, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

@ghost
Copy link

ghost commented Aug 5, 2022

I detected other pull requests that are modifying sqlite3/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@ghost ghost mentioned this pull request Aug 25, 2022
4 tasks
@SpaceIm
Copy link
Contributor

SpaceIm commented Aug 25, 2022

Can be closed. Fixed by #12078 and/or conan-io/conan#11883

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.

[conan.io/center] sqlite3/3.39.2: Can't find SQLite3 using CMake with cmake_paths generator
6 participants