Skip to content

add package qtils 0.0.4 #25121

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

simbahebinbo
Copy link

Summary

Changes to recipe: qtils/0.0.4

Motivation

add a new package by cpp-libp2p

@CLAassistant
Copy link

CLAassistant commented Sep 3, 2024

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@simbahebinbo
Copy link
Author

Where can I check for assembly line errors?

@AbrilRBS
Copy link
Member

AbrilRBS commented Sep 5, 2024

Where can I check for assembly line errors?

When this PR runs once the approval process goes thru, you'll get the compilation logs summarized here :)

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for taking the time to add this new recipe.

There are some changes that will need to be made (You can base your recipe in the header_only package template in https://github.com/conan-io/conan-center-index/tree/master/docs/package_templates/header_only to get most of this already done for you!), but this first take looks good most of the way! Thanks :)


class PackageConan(ConanFile):
name = "qtils"
version = "0.0.4"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
version = "0.0.4"

This gets automatically set by the CI based on the conandata contents


def package(self):
include_folder = os.path.join(self.source_folder, "src")
copy(self, "*.hpp", dst=os.path.join(self.package_folder, "include"), src=include_folder, keep_path=True)
Copy link
Member

Choose a reason for hiding this comment

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

We'll need to package the LICENSE file from upstream here too, check how this is done in the header_only package template in https://github.com/conan-io/conan-center-index/tree/master/docs/package_templates/header_only

Comment on lines 22 to 26
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
Copy link
Member

Choose a reason for hiding this comment

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

No need for any if this as we're not building

from conan.tools.cmake import CMakeToolchain, CMakeDeps, cmake_layout
from conan.tools.files import copy,get

required_conan_version = ">=2.0.5"
Copy link
Member

Choose a reason for hiding this comment

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

We still need to support Conan 1 for now.

Suggested change
required_conan_version = ">=2.0.5"
required_conan_version = ">=1.53.0"

settings = "os", "compiler", "build_type", "arch"

def layout(self):
cmake_layout(self)
Copy link
Member

Choose a reason for hiding this comment

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

This shuold probably be a basic_layout if we're not doing anything special


def build(self):
# Only header files, no source files that need to be compiled, so skip the build step
pass
Copy link
Member

Choose a reason for hiding this comment

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

Missing a package_id() that calls self.info.clear() as is usually done for header-only libraries

@AbrilRBS AbrilRBS self-assigned this Sep 5, 2024
@AbrilRBS
Copy link
Member

AbrilRBS commented Sep 5, 2024

Also, the library seems to need set CMAKE_CXX_STANDARD to 20 and has find_package dependencies to boost etc, this should probably be reflected in the recipe unless there's a good reason not to (For example, if the dependencies are only used for testing, etc)

@simbahebinbo
Copy link
Author

@AbrilRBS
I made a revised version based on the template. Can you help review it? thank you.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 3 (6e0bde7ab52dcc5ac44cf78f5ec7b3d939815f8a):

  • qtils/0.0.4:
    All packages built successfully! (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 3 (6e0bde7ab52dcc5ac44cf78f5ec7b3d939815f8a):

  • qtils/0.0.4:
    All packages built successfully! (All logs)

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.

4 participants