MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / GetDepend

Method GetDepend

tools/ng/environment.py:107–127  ·  view source on GitHub ↗

Check if dependency is satisfied. Args: env: SCons Environment depend: Dependency name or list of names Returns: True if dependency is satisfied

(env, depend: Any)

Source from the content-addressed store, hash-verified

105
106 @staticmethod
107 def GetDepend(env, depend: Any) -> bool:
108 """
109 Check if dependency is satisfied.
110
111 Args:
112 env: SCons Environment
113 depend: Dependency name or list of names
114
115 Returns:
116 True if dependency is satisfied
117 """
118 context = BuildContext.get_current()
119 if not context:
120 # Fallback to checking environment variables
121 if isinstance(depend, str):
122 return env.get(depend, False)
123 elif isinstance(depend, list):
124 return all(env.get(d, False) for d in depend)
125 return False
126
127 return context.get_dependency(depend)
128
129 @staticmethod
130 def SrcRemove(env, src: List[str], remove: List[str]) -> None:

Callers 3

GCCC99PatchFunction · 0.80
GetDependFunction · 0.80
DefineGroupMethod · 0.80

Calls 3

get_currentMethod · 0.45
getMethod · 0.45
get_dependencyMethod · 0.45

Tested by

no test coverage detected