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

yaml-cpp: fix msvc shared + modernize #10633

Merged
merged 2 commits into from
May 8, 2022

Conversation

SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented May 5, 2022

closes #10629


  • 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
Copy link
Collaborator

All green in build 1 (6258689c8a5a2c4681d65b18e663d9613a107040):

  • yaml-cpp/0.6.3@:
    All packages built successfully! (All logs)

  • yaml-cpp/0.7.0@:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 37fb8dd into conan-io:master May 8, 2022
@SpaceIm SpaceIm deleted the yaml-cpp-msvc-shared branch May 8, 2022 14:03
@SergeyKrivohatskiy
Copy link

SergeyKrivohatskiy commented May 12, 2022

This PR has broken compilation on MacOS
ImportError: cannot import name 'is_msvc' from 'conan.tools.microsoft'

Upd. Maybe I need a newer conan>=1.45.0. Will check
Upd. Updating conan helped

Full error:

yaml-cpp/0.6.3: Retrieving from remote 'conancenter'...
00:00:22  yaml-cpp/0.6.3: Retrieving from server 'conancenter'
00:00:22  yaml-cpp/0.6.3: Trying with 'conancenter'...
00:00:22  Downloading conanmanifest.txt
00:00:22  Downloading conanfile.py
00:00:22  Downloading conan_export.tgz
00:00:22  yaml-cpp/0.6.3: Downloaded recipe revision 0
00:00:22  ERROR: yaml-cpp/0.6.3: Cannot load recipe.
00:00:22  Error loading conanfile at '***/CONAN_CACHE_arm64/.conan/data/yaml-cpp/0.6.3/_/_/export/conanfile.py': Unable to load conanfile in ***/CONAN_CACHE_arm64/.conan/data/yaml-cpp/0.6.3/_/_/export/conanfile.py
00:00:22    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 171, in load_source
00:00:22      module = _load(spec)
00:00:22    File "<frozen importlib._bootstrap>", line 711, in _load
00:00:22    File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
00:00:22    File "<frozen importlib._bootstrap_external>", line 850, in exec_module
00:00:22    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
00:00:22    File "***/CONAN_CACHE_arm64/.conan/data/yaml-cpp/0.6.3/_/_/export/conanfile.py", line 1, in <module>
00:00:22      from conan.tools.microsoft import is_msvc, is_msvc_static_runtime
00:00:22  ImportError: cannot import name 'is_msvc' from 'conan.tools.microsoft' (***/lib/python3.9/site-packages/conan/tools/microsoft/__init__.py)

@uilianries
Copy link
Member

@SergeyKrivohatskiy is_msvc is available since conan 1.45.0, it's listed on the changelog.

@SergeyKrivohatskiy
Copy link

@uilianries Yep. Checked that already. Will leave the message anyway in case someone will face the same issue.

Thanks

@SpaceIm
Copy link
Contributor Author

SpaceIm commented May 12, 2022

The problem is that imports are evaluated before conan check of required_conan_version, so error is not very meaningful in this case.

@uilianries
Copy link
Member

@SpaceIm Excellent observation! Thank you for pointing it on Conan client.

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.

[package] yaml-cpp/0.7.0: Need to add YAML_CPP_DLL macro when using shared option on Windows.
6 participants