-
Notifications
You must be signed in to change notification settings - Fork 949
/
conanfile_interface.py
50 lines (38 loc) · 1.17 KB
/
conanfile_interface.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
41
42
43
44
45
46
47
48
49
50
class ConanFileInterface:
""" this is just a protective wrapper to give consumers
a limited view of conanfile dependencies, "read" only,
and only to some attributes, not methods
"""
def __str__(self):
return str(self._conanfile)
def __init__(self, conanfile):
self._conanfile = conanfile
def __eq__(self, other):
"""
The conanfile is a different entity per node, and conanfile equality is identity
:type other: ConanFileInterface
"""
return self._conanfile == other._conanfile
def __ne__(self, other):
return not self.__eq__(other)
@property
def name(self):
return self._conanfile.name
@property
def buildenv_info(self):
return self._conanfile.buildenv_info
@property
def runenv_info(self):
return self._conanfile.runenv_info
@property
def cpp_info(self):
return self._conanfile.cpp_info
@property
def settings(self):
return self._conanfile.settings
@property
def context(self):
return self._conanfile.context
@property
def dependencies(self):
return self._conanfile.dependencies