44 lines
1.3 KiB
Python
44 lines
1.3 KiB
Python
import os.path
|
|
from conan import ConanFile
|
|
from conan.tools.meson import Meson
|
|
from conan.tools.layout import basic_layout
|
|
|
|
class NiphredilRecipe(ConanFile):
|
|
name = "niphredil"
|
|
version = "0.1"
|
|
|
|
# Optional metadata
|
|
license = "CECILL-2.1/GPL-3.0"
|
|
author = "The Aquila Consortium"
|
|
url = "https://bitbucket.org/aquila-consortium/niphredil"
|
|
description = "The Niphredil code"
|
|
topics = ("cosmology", "data analysis")
|
|
revision_mode = "scm"
|
|
|
|
# Binary configuration
|
|
generators = "PkgConfigDeps", "MesonToolchain"
|
|
settings = "os", "compiler", "build_type", "arch"
|
|
options = {"shared": [True, False], "fPIC": [True, False]}
|
|
default_options = {"shared": False, "fPIC": True}
|
|
|
|
# Location of sources
|
|
exports_sources = "meson.build", "include/*", "src/*"
|
|
|
|
def requirements(self):
|
|
self.requires("elemmire/0.1#d825d82a24735d1849ec5b7c0129ed905e67e634")
|
|
|
|
def build_requirements(self):
|
|
self.tool_requires("meson/[~1.0]")
|
|
|
|
def layout(self):
|
|
basic_layout(self)
|
|
self.folders.build = os.path.join(self.folders.build, "meson")
|
|
|
|
def build(self):
|
|
meson = Meson(self)
|
|
meson.configure()
|
|
meson.build()
|
|
|
|
def package(self):
|
|
meson = Meson(self)
|
|
meson.install()
|