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 marisa/0.2.6 recipe #11877

Merged
merged 6 commits into from
Oct 19, 2022
Merged

Conversation

tuduongquyet
Copy link
Contributor

@tuduongquyet tuduongquyet commented Jul 23, 2022

  • Specify library name and version: marisa/0.2.6
  • marisa is the dependency of libeb

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

@tuduongquyet tuduongquyet changed the title add marisa recipe add marisa/0.2.6 recipe Jul 23, 2022
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@tuduongquyet tuduongquyet force-pushed the marisa/0.2.6 branch 2 times, most recently from c2e088a to 9313ac3 Compare July 26, 2022 07:37
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,120 @@
+cmake_minimum_required(VERSION 3.1)
Copy link
Member

Choose a reason for hiding this comment

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

DO not create a patch for it, instead, add as regular file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you show me how to do that? Any ref.?

Copy link
Member

Choose a reason for hiding this comment

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

Add as you did for other files in this PR:

git add CMakeLists.txt
git commit -s -m "Add Cmake file for marisa"
git push origin marisa/0.2.6

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use the upstream's build system? https://github.com/s-yata/marisa-trie#build-instructions we have some docs on this https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md#autotools

Also there's a year old PR s-yata/marisa-trie#43 so usually I would suggestion making a PR to share your implementation but they are not very active

Copy link
Member

Choose a reason for hiding this comment

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

Yes, @prince-chrismc approach is the better way.

Copy link
Contributor Author

@tuduongquyet tuduongquyet Aug 10, 2022

Choose a reason for hiding this comment

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

Why not use the upstream's build system? https://github.com/s-yata/marisa-trie#build-instructions we have some docs on this https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md#autotools

Also there's a year old PR s-yata/marisa-trie#43 so usually I would suggestion making a PR to share your implementation but they are not very active

The reason why I don't use upstream build system is:

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case the "Accepted" approach is something like https://github.com/conan-io/conan-center-index/blob/c4a7e6a366a1e600167da37f40be8cab13357358/recipes/giflib/5.2.x/CMakeLists.txt

There's some points in this CMake, like shared build, which are not required (CMake natively supports that option internal so you dont need to declare it) also there should not be any tests

description = "Matching Algorithm with Recursively Implemented StorAge "
license = ("BSD-2-Clause", "LGPL-2.1")
topics = ("algorithm", "dictionary", "marisa")
exports_sources = "patches/**", "CMakeLists.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will fix as your suggestion

recipes/marisa/all/conanfile.py Outdated Show resolved Hide resolved
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,120 @@
+cmake_minimum_required(VERSION 3.1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use the upstream's build system? https://github.com/s-yata/marisa-trie#build-instructions we have some docs on this https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md#autotools

Also there's a year old PR s-yata/marisa-trie#43 so usually I would suggestion making a PR to share your implementation but they are not very active

Comment on lines +79 to +80
self.cpp_info.names["cmake_find_package"] = "marisa"
self.cpp_info.names["cmake_find_package_multi"] = "marisa"
Copy link
Contributor

Choose a reason for hiding this comment

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

Upstream project does not have CMake targets

Suggested change
self.cpp_info.names["cmake_find_package"] = "marisa"
self.cpp_info.names["cmake_find_package_multi"] = "marisa"

@conan-center-bot
Copy link
Collaborator

All green in build 26 (72e93e84cbf492b4c627da8e6e910ed9a44bcc6e):

  • marisa/0.2.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-11877/recipes/marisa/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-11877/recipes/marisa/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-11877/recipes/marisa/all/conanfile.py", line 4, in <module>
        from conans import CMake
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

Copy link
Member

@danimtb danimtb left a comment

Choose a reason for hiding this comment

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

i know it requires some more work, but as this has been open for a while and the recipe is a new one, I prefer to have it accepted than dropping it all the way

@conan-center-bot conan-center-bot merged commit 5c33ec9 into conan-io:master Oct 19, 2022
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.

6 participants