-
Notifications
You must be signed in to change notification settings - Fork 9
/
conanfile.py
40 lines (32 loc) · 1.29 KB
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
from conans import ConanFile, python_requires
conan_tools = python_requires("conan-tools/[>=1.0.0]@includeos/stable")
class NaClConan(ConanFile):
name = 'NaCl'
version = conan_tools.git_get_semver()
license = 'Apache-2.0'
description='NaCl is a configuration language for IncludeOS that you can use to add for example interfaces and firewall rules to your service.'
url='https://github.com/includeos/NaCl'
scm = {
"type" : "git",
"url" : "auto",
"subfolder": ".",
"revision" : "auto"
}
def build(self):
#you need antlr4 installed to do this
self.run("antlr4 -Dlanguage=Python2 NaCl.g4 -visitor")
def package(self):
name='bin'
self.copy('*',dst=name+"/subtranspilers",src="subtranspilers")
self.copy('*',dst=name+"/type_processors",src="type_processors")
self.copy('*.py',dst=name,src=".")
self.copy('cpp_template.mustache',dst=name,src='.')
self.copy('NaCl.tokens',dst=name,src=".")
self.copy('NaClLexer.tokens',dst=name,src=".")
def package_id(self):
self.info.header_only()
def package_info(self):
self.env_info.path.append(os.path.join(self.package_folder, "bin"))
def deploy(self):
self.copy("*",dst="NaCl",src="NaCl")