Commit 5691fe38 authored by Ovidiu-Florin BOGDAN's avatar Ovidiu-Florin BOGDAN

Get info from metaingo file

parent 6935b2e8
from conans import ConanFile, CMake
import yaml
import re
import os.path
def getVersion():
regx = re.compile(r"^set\(.*VERSION\s(\"|')[0-9.]+(\"|')\)")
with open("CMakeLists.txt") as f:
for line in f:
if regx.match(line):
version ="\"[0-9\.]+\"", line)
version ="\"", "")
return version
return None
def getMetaField(field):
with open("metainfo.yaml") as f:
metainfo = yaml.load(
return metainfo[field]
return None
class KConfigConan(ConanFile):
name = "kconfig"
version = "5.50.0"
license = "GPLv2"
url = ""
description = "Persistent platform-independent application settings."
name = getMetaField('name')
version = getVersion()
license = getMetaField('license')
url = getMetaField('url')
description = getMetaField('description')
settings = "os", "compiler", "build_type", "arch"
maintainer: mdawson
description: Configuration system
name: kconfig
description: Persistent platform-independent application settings
license: GPLv2
tier: 1
type: functional
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment