MCPcopy Create free account
hub / github.com/nodejs/node / GetBuildPhaseByType

Method GetBuildPhaseByType

tools/gyp/pylib/gyp/xcodeproj_file.py:2602–2617  ·  view source on GitHub ↗
(self, type)

Source from the content-addressed store, hash-verified

2600 self.SetProperty("productReference", file_ref)
2601
2602 def GetBuildPhaseByType(self, type):
2603 if "buildPhases" not in self._properties:
2604 return None
2605
2606 the_phase = None
2607 for phase in self._properties["buildPhases"]:
2608 if isinstance(phase, type):
2609 # Some phases may be present in multiples in a well-formed project file,
2610 # but phases like PBXSourcesBuildPhase may only be present singly, and
2611 # this function is intended as an aid to GetBuildPhaseByType. Loop
2612 # over the entire list of phases and assert if more than one of the
2613 # desired type is found.
2614 assert the_phase is None
2615 the_phase = phase
2616
2617 return the_phase
2618
2619 def HeadersPhase(self):
2620 headers_phase = self.GetBuildPhaseByType(PBXHeadersBuildPhase)

Callers 4

HeadersPhaseMethod · 0.95
ResourcesPhaseMethod · 0.95
SourcesPhaseMethod · 0.95
FrameworksPhaseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected