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

assimp: cross-compatibility conan v1 & v2 #12063

Merged
merged 6 commits into from
Aug 11, 2022

Conversation

SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented Aug 5, 2022

Few points to notice in this PR, beyond usual migration diff:

  • patches to unvendor deps are slightly more complex, since we can't rely anymore on ${CONAN_LIBS} (but in the meantime they are more explicit).
  • No need to manually inject ASSIMP_ENABLE_DRACO with these patches.
  • rapidjson injection may break in the future, since cmake names of CMakeDeps in this recipe are wrong (should be RapidJSON for config file name, and rapidjson for the target: https://github.com/Tencent/rapidjson/blob/master/RapidJSONConfig.cmake.in).
  • the previous check of clipper major version in build() doesn't work in conan v2. I guess it should be checked in validate() now, but don't know how to proceed.
  • CMAKE_POLICY_DEFAULT_CMP0077 is injected to prevent CMake warnings.
  • bump dependencies

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

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2022

Hooks produced the following warnings for commit a63f2e9
assimp/5.1.6
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './contrib/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_encoding_transform.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

@SpaceIm
Copy link
Contributor Author

SpaceIm commented Aug 5, 2022

It breaks test_v1_package when assimp is static (test_package with CMakeDeps works fine), dependencies of assimp are not propagated in assimp-config.cmake file generated by cmake_find_package_multi. I can reproduce this error locally with conan 1.51.0. conan bug? Do we have to explicitly list dependencies in self.cpp_info.requires to support cmake_find_package_multi at consume time? (EDIT: yes, that's it !)

Likely same issue than #12030 (comment)

Is it a side effect of cmake_layout (I hope not, would be surprising to not have seperation of concerns between build layout which is an internal detail and packaging information)? Of conan.Conanfile?

/cc @memsharded @czoido @lasote

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2022

Hooks produced the following warnings for commit fa3f823
assimp/5.2.2
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './contrib/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_encoding_transform.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './contrib/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_decoding_transform.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
assimp/5.1.6
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './contrib/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_encoding_transform.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './contrib/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_decoding_transform.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
assimp/5.1.0
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './contrib/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_encoding_transform.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './contrib/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_normal_octahedron_canonicalized_decoding_transform.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

@conan-center-bot
Copy link
Collaborator

All green in build 6 (c3efb8d9251463b47062a702795ccddf7aa65eb1):

  • assimp/5.1.6@:
    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-12063/recipes/assimp/5.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12063/recipes/assimp/5.x/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-12063/recipes/assimp/5.x/conanfile.py", line 6, in <module>
        from conans import tools as tools_legacy
    ImportError: cannot import name 'tools' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • assimp/5.2.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-12063/recipes/assimp/5.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12063/recipes/assimp/5.x/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-12063/recipes/assimp/5.x/conanfile.py", line 6, in <module>
        from conans import tools as tools_legacy
    ImportError: cannot import name 'tools' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • assimp/5.1.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-12063/recipes/assimp/5.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12063/recipes/assimp/5.x/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-12063/recipes/assimp/5.x/conanfile.py", line 6, in <module>
        from conans import tools as tools_legacy
    ImportError: cannot import name 'tools' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • assimp/5.0.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-12063/recipes/assimp/5.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12063/recipes/assimp/5.x/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-12063/recipes/assimp/5.x/conanfile.py", line 6, in <module>
        from conans import tools as tools_legacy
    ImportError: cannot import name 'tools' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • assimp/5.0.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-12063/recipes/assimp/5.x/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-12063/recipes/assimp/5.x/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-12063/recipes/assimp/5.x/conanfile.py", line 6, in <module>
        from conans import tools as tools_legacy
    ImportError: cannot import name 'tools' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

@conan-center-bot conan-center-bot merged commit d4467fe into conan-io:master Aug 11, 2022
@SpaceIm SpaceIm deleted the assimp-conan-v2 branch August 11, 2022 06:29
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.

None yet

4 participants