Skip to content

Commit

Permalink
Update conanfile consumer file
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-PLACET committed Jun 24, 2024
1 parent bdd14e0 commit bf88f63
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from conan import ConanFile
from conan.tools.files import copy, get
from conan.tools.build.cppstd import check_min_cppstd
from conan.tools.cmake import cmake_layout
import os


Expand All @@ -11,27 +12,31 @@ class SparrowRecipe(ConanFile):
author = "Quantstack"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/xtensor-stack/sparrow"

topics = ("arrow", "header-only")
settings = "os", "arch", "compiler", "build_type"
package_type = "header-library"
no_copy_source = True
exports_sources = "include/*", "LICENSE"
generators = "CMakeToolchain", "CMakeDeps"

def requirements(self):
self.test_requires("doctest/2.4.11")

def build_requirements(self):
self.tool_requires("cmake/3.29.0")

@property
def _min_cppstd(self):
return 20

def validate(self):
check_min_cppstd(self, self._min_cppstd)

def source(self):
get(self, **self.conan_data["sources"][self.version],
destination=self.source_folder, strip_root=True)

def layout(self):
cmake_layout(self)

def package(self):
print(f"current file folder: {os.path.dirname(__file__)}")
copy(self, "LICENSE",
dst=os.path.join(self.package_folder, "licenses"),
src=self.source_folder)
Expand Down

0 comments on commit bf88f63

Please sign in to comment.